cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ACPBSCi
Resolver I
Resolver I

Why does my flow keep triggering?

I am a flow newbie.

I have a workflow with a manual trigger so that every time an item is created or updated, it will run. It will populate a text column with the folder path, then replace the "/" in the folder path with a ", " and populate a text Keywords column. That seems to work, but I noticed the workflow keeps triggering. It's like it registers the fact that two columns were updated as a new modification and triggers the workflow again.

Again, I am new at this.

I want my workflow to run either when new content is uploaded to my library OR when I want it to run.

1 First Action.png2 Second Action.png3 Third Action.png4 Fourth Action.png

 

I really don't know what I'm doing. I can't explain why I built the flow this way except that when I try taking actions out or rearranging them, it breaks.

Is there a reason why this setup would make my flow trigger up to 5 or 7 times?

1 ACCEPTED SOLUTION

Accepted Solutions

@ACPBSCi 

So, if I understand correctly, you have a manual Flow that updates an item.  You also have a Flow that runs when an item is changed.  You run the manual Flow and the automated Flow that runs on change kicks off.  And, if the automated Flow also updates the item, you go into an infinite loop.

Take a look at this blog that I posted a day or so ago.

The issue is that the Automated Flow will run, as designed, when an update is made even if that update is from another Flow or the Flow that is updating the item.  You can use the technique that I describe in my blog to stop this behavior.  In my blog, I mention setting a value in an multi-line append text column.  In your case, you will want to do this in both of your Flows but you'll only need the trigger condition in the automated Flow.

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

4 REPLIES 4
ScottShearer
Super User III
Super User III

@ACPBSCi 

Do you have another Flow that runs when the document is changed?

Is that the workflow that keeps triggering?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Hi, @ScottShearer.

Good suggestion, but sadly no. I had 2 workflows in that environment that were on. The Instant workflow only runs when I manually kick it off. It runs once, updates my content, and finishes. It's the automated one that keeps looping. I've been a Nintex and SharePoint Designer workflow developer for years, so I have a good background in process automation. I just don't understand flow. My research indicates that I need an "apply to each" action, but I'm not sure why if I only want to update the properties of the item the workflow is running on. I also have an "apply to each" action in my instant workflow. What is the logic behind that?

I don't understand why I can't copy the actions in my instant workflow and create an automated workflow and get the same result with the identical development. What do you recommend?

@ACPBSCi 

So, if I understand correctly, you have a manual Flow that updates an item.  You also have a Flow that runs when an item is changed.  You run the manual Flow and the automated Flow that runs on change kicks off.  And, if the automated Flow also updates the item, you go into an infinite loop.

Take a look at this blog that I posted a day or so ago.

The issue is that the Automated Flow will run, as designed, when an update is made even if that update is from another Flow or the Flow that is updating the item.  You can use the technique that I describe in my blog to stop this behavior.  In my blog, I mention setting a value in an multi-line append text column.  In your case, you will want to do this in both of your Flows but you'll only need the trigger condition in the automated Flow.

 

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Hi, @ScottShearer, thank you for your response. It appears that I need to create a flag, have the flow set the flag, then read the flag to determine if it needs to run again. That is a good solution, it's a pity we need it. I can't fathom why the workflow would trigger when there was already an instance running on the same item. It's a mystery. I hope they fix that.

Also, I will check out your blog for other tips and tricks. Like I said, flow is a new tool for me and I'm struggling to find my way around.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (13,670)