cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Run a flow automatically

Hi to all,

 

First time posting on flow community, so please excuse if question is not very perceptible.

 

In my company we are making a new flow based on a sharepoint library, and using the trigger each time a document is created or changed we run an approval flow.

 

On that approval flow we can have an acceptance or a refusal from the user and based on that a field is updated in the document properties, so if document is approved goes to next approver, if not goes back to registered status.

 

The question here is that the first step of this flow when the document is changed or created is if the status is equal to registered if yes then go trough the flow if not stop, so my colleagues are asking if is possible to having a refussal and since the status is change back to registered the flow will run again automatically or not?

 

On my test I see that the flow doesn't rerun so we need to go to the document and make a change to the metadata and the flow will pick it up and run, if the metadata is changed by the flow there is no rerun.

 

Is my understanding correct only manual changes to documents are making the flow run?

Do we need to have a manual input on the document?

Is it possible to make it rerun without any user intervention?

 

Just to add some information this refusal from the user is because he identified something that is not correct so the previous persons in the approval route need to revise the information, at some previous steps if user refuses the status changes to reject or is send to archive directly.

 

Thank you for your help in advance.

 

Regards,

MFelix

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Run a flow automatically


@MFelix wrote:

1. Is my understanding correct only manual changes to documents are making the flow run?

 

2. Do we need to have a manual input on the document?

 

3. Is it possible to make it rerun without any user intervention?

 


1. No, you can have Flow trigger based upon document chanages made by Flow as well.

2. No, see above.

3. Yes, you can Run flows on a scheduleManually trigger a flow or put the Flow actions within an Apply to each loop

Approval documentation:

View solution in original post

Highlighted
Community Support
Community Support

Re: Run a flow automatically

Hi @MFelix ,

 

Thanks for updating.

 

As the Status will be updated depending on other answers, you could add a Condition directly after the Trigger to check if the Status is Register or not.

 

If it is Register, run the following actions, if no, do nothing.

 

Further, as I previously suggested, add action to update the Status to Register if the approval request is not Approved so that the flow could run again.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Highlighted
Super User II
Super User II

Re: Run a flow automatically


@MFelix wrote:

1. Is my understanding correct only manual changes to documents are making the flow run?

 

2. Do we need to have a manual input on the document?

 

3. Is it possible to make it rerun without any user intervention?

 


1. No, you can have Flow trigger based upon document chanages made by Flow as well.

2. No, see above.

3. Yes, you can Run flows on a scheduleManually trigger a flow or put the Flow actions within an Apply to each loop

Approval documentation:

View solution in original post

Highlighted
Frequent Visitor

Re: Run a flow automatically

Hi @Brad_Groux,

Thank you for the reply and web links.

What do you think can be happening for the flow not being rerun when my flow change the status to registered? Why aren't the changes made from flow recognizer in the modified trigger?

Thank you.

Regards
MFelix
Highlighted
Super User II
Super User II

Re: Run a flow automatically

I'd have to review your Flow to possibly provide a reason for your Flow not rerunning when an item is created or modified. What is your initial trigger?

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: Run a flow automatically

Hi @Brad_Groux ,

 

check below the image.

Flow.png

 

The flow is much bigger but this is the point where we have the need to rerun automatically.

 

If you need any additional information tell me.

 

I appreciate your time and effort on this.

 

Regards,

MFelix

Community Support
Community Support

Re: Run a flow automatically

Hi @MFelix ,

 

You mentioned that “if not goes back to registered status”, will the status be changed to other value once the flow is triggered?

 

If so, you could consider adding action Update file properties under If No branch of the approval action.

 

Then the Status will be updated back to Registered, and the flow will be triggered again.

 

Hope this could be helpful.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Run a flow automatically

Hi @v-yamao-msft ,

 

The flow starts tu run when someone put a status of Registered, then  during the flow it will change to several other status depending on the answers. But for this particular choice it has to go back to Registered.

 

When I read your post I started to think on one thing. Since I start the flow with a Registered Status, and the flow continues to run and changing status but the final status is Registered again (for this choice in the flow) for automation purposes the document didn't had any changes so it doesn't restart?

 

Is my understanding correct?

 

Regards,

MFelix

Highlighted
Community Support
Community Support

Re: Run a flow automatically

Hi @MFelix ,

 

Thanks for updating.

 

As the Status will be updated depending on other answers, you could add a Condition directly after the Trigger to check if the Status is Register or not.

 

If it is Register, run the following actions, if no, do nothing.

 

Further, as I previously suggested, add action to update the Status to Register if the approval request is not Approved so that the flow could run again.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: Run a flow automatically

Hi @v-yamao-msft ,

 

thank you for your time and answer just two points/questions:

  • I refer in my post that it goes back to register when rejected but it's when approval, so the status changed back to register is already there.
  • Regarding the place where I make the register check I have it in the 4th step not immeaatly after the trigger do you think I should make it after the trigger?

One addtional question:

  • Do you know why when I finish the update of the file properties instead of getting the user name that (started the flow) on the modified by, I'm getting the name of the user who created the flow?

Regards,

MFelix

Highlighted
Frequent Visitor

Re: Run a flow automatically

Hi,
@Brad_Groux and @v-yamao-msft

Thank you for your help it was a good guidance I was able to solve my issue, some part of the errors believe was driven by some network errors not recognising the changes.

Regards,
MFelix

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (6,924)