cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mthiru
Helper II
Helper II

SMPT connector for email sending out multiple emails when an sharepoint list is updated

Hello,

 

I have created a flow when an item is modified or created on a share point list with a condition to look at a status of a column where the status is equal to completed. If yes, the share point list gets updated for an overall on boarding status to complete and subsequently and send out an email.

 

I using an SMTP connector for emails as we have exchange on prem. However, I am getting repeated notifications/emails from this flow. How do I prevent this from happening. We just need one email once the overall process/workflow is completed.

 

Our email inbox is getting burdened with all these notifications. Please see attached for screen shots.Capture 1.PNGCapture 2.PNGCapture 3.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @mthiru ,

 

Your flow with trigger when an item is created or modified and you update the item in your flow, so the flow would run into infinite loop tosend the emails.

 

Hope the solution in the link below could help you:

https://powerusers.microsoft.com/t5/General-Power-Automate/Email-trigger-flow-stuck-in-infinite-loop...

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
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

5 REPLIES 5
v-alzhan-msft
Community Support
Community Support

Hi @mthiru ,

 

Your flow with trigger when an item is created or modified and you update the item in your flow, so the flow would run into infinite loop tosend the emails.

 

Hope the solution in the link below could help you:

https://powerusers.microsoft.com/t5/General-Power-Automate/Email-trigger-flow-stuck-in-infinite-loop...

 

Best Regards,

Alice

 

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

@v-alzhan-msft 

 

Great suggestion.

 

I will create a yes/no column as you suggested. I have a question for step 3, you mention that if the flow is trigger from flow/system, how do I identify this....flow run by flow rather then when it is triggered by an actual user in which case its a valid trigger? 

 

3.every time modify the item from flow use the Update item action, set the "ModifiedByFlow" column to Yes..

Hi @mthiru ,

 

Every time when add or modify an item in the sharepoint manually, set the "ModifiedByFlow" column to No.

And in your flow, the "Updated item" action would always set the "ModifiedByFlow" column to yes.

So if the flow with when an item is created or modified trigger runs, it would check for the "ModifiedByFlow" column to see if it is eauql to true, if yes, the item is modified by flow in the "updated item" action. if no, the item is created or modified by manually in the sharepoint.

 

Please take a try to create the flow.

 

Best Regards,

Alice

 

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

Thanks @v-alzhan-msft 

 

I did as you said, I've added columns to end previous loops and they work as suggested. However, to end this the process flow I have send out an email notification to the team of closure however the final email alert goes into an infinity loop.

 

Here is how my flow looks with three conditions and i continue with many other conditions. Most recently the three conditions i have tried with are:

 

Condition 1: addminutes(triggerBody()?['Modified'],2) is not equal to true

Condition 2: equals(triggerBody()?['OnboardingStatus#Id'],2)is equal to true

Condition 3: body('Get_item')?['ModifiedbyFlow']is equal to true

 

A previous flow updates condition 3 to yes.

 

Capture 4.PNG

All good! I added another update item and updated a column to end this flow. 

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,333)