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

update item get infinite email

Hi everyone

I have a flow which trigger is when an item is created/modified and I was successfully in create condition to separately send email for each item created or modified

Capture.PNG

1/ However, for the update item  it will cause infinite email 
2/ If I change to approval before sending , the flow will always go to create branch (due to version number in sharepoint list setting always= 1, without approval, no new modified item was created so the trigger will go wrong).

 

Anyone has suggestion for these issues?

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

HI @Vontovius 

 

You can create a column named email sent in SP of type yes/ no and update it after the email is being sent. In the trigger, you can add a trigger condition to run the flow only if the value of the yes/ no column is no. 

 

https://www.c-sharpcorner.com/article/conditionally-triggering-ms-flow-based-on-columns-value/ 

 

Hope this Helps!

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!

alrez
Community Support
Community Support

Hi,

 

In addition to Yashag's suggestion, you could also change the trigger of the flow from "When an item is created or modified" you could switch it to "When an item is created". As of now you are triggering the SharePoint item whenever you modify the SharePoint item and you are modifying the SharePoint item in the middle of the run. You need to track another value that is changing between runs in order to stop this loop.

 

Regards,

 

Alex

 

-------

 

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

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,077)