cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sunithav
Level: Powered On

Trigger flow when an item in SharePoint list is modified

Hi,

 

Looking for best practice in terms of trigger to used to start a flow only when an item in SharePoint list is modified.

 

We have used "When an existing item is modified" trigger which is supplied as part of an template to send notifications when items in SharePoint list undergo modification. This flow doesn't trigger for all the notifications. And read in one of threads in power automate community that this trigger is not supported in SharePoint connector.

 

"When an item is created or modified" triggers is used, Could someone please recommend the best condition to be used to differentiate "item created" and "item modified" events when a flow triggers. 

 

Thanks,

SV

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Trigger flow when an item in SharePoint list is modified

Hi @sunithav you can do it by using Compose controls to compare the created and modified dates. then use a condition that if the output of the created compose is equal to the output of then modified compose then do something, otherwise do something else.

 

compare-date-time.png

 

My example just uses the date as a comparison but you could use time as well.

 

compare-date-time2.png

 

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Trigger flow when an item in SharePoint list is modified

Hi @sunithav you can do it by using Compose controls to compare the created and modified dates. then use a condition that if the output of the created compose is equal to the output of then modified compose then do something, otherwise do something else.

 

compare-date-time.png

 

My example just uses the date as a comparison but you could use time as well.

 

compare-date-time2.png

 

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

View solution in original post

sunithav
Level: Powered On

Re: Trigger flow when an item in SharePoint list is modified

Thanks Rob for your response. 

 

Learnt from threads in power automate community that there is a possibility of "Created" and "Modified" values differ by second(s) even when an item is created. I personally haven't seen this happening. Have you experienced this issue ever? 

 

Thanks,

SV

Super User
Super User

Re: Trigger flow when an item in SharePoint list is modified

@sunithav 

It is true that the created and modified times can be different for a new item in a SharePoint list.

The solution presented by @RobElliott allows you to ignore the difference by stripping out the seconds part of the date/time.  While that solution may not be accurate enough for all applications, it should be good enough for most.

 

 

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

Scott
sunithav
Level: Powered On

Re: Trigger flow when an item in SharePoint list is modified

Thanks Scott, for your response.  Came across few more thread which talked about checking version number to distinguish between item created and modified event. I will use this along with the approach Rob has suggested. I'm looking for a fool proof solution as we have lot of flows to be triggered when items in SharePoint list modified. 

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,599)