cancel
Showing results for 
Search instead for 
Did you mean: 

Flow with "When an item is created or modified" triggers old events

SCENARIO

========

When you create a flow with SharePoint trigger like "When an item is created or modified", you want your flow only triggers when the new item is created or modified. However, when you turn off the flow, make modification to the items, then turn on the flow, the flow still triggers for that item's modifications.

This is a known issue of this kindly of trigger. 

The trigger "When an item is created or modified" uses the triggerstate property to define when was the last trigger time. This is implemented in the back-end process.

As the trigger tries to check from the triggerstate regardless the flow is turn on or off, when you turn on the flow, the process when scan for all modified items based on the trigger state.

 

For example: 

1- You create a flow "When an item is created or modified" => Send me an email.

When the flow is triggered, it stores a triggerstate property in the API call as triggerstate="2020-12-10T12:12:12:000Z"
2- Now you turn off the flow, during one day, you make changes to the items in the list set in the trigger.

3- You turn on the flow at "2020-12-11T12:12:12:000Z"

4- The system check for new data to fire the trigger, but the system scan from the triggerstate="2020-12-10T12:12:12:000Z" to the 

timstamp when the checking process starts. ( "2020-12-11T12:12:12:000Z")

 

At the moment, this is a known issue as the Sharepoint connector use A polling trigger (such as the recurrence trigger) and use the triggerstate as time for starting the scan.

You can learn more about this at:

Troubleshoot common issues with triggers - Power Automate | Microsoft Docs

Schema reference for trigger and action types - Azure Logic Apps | Microsoft Docs

Create web APIs & REST APIs for Azure Logic Apps - Azure Logic Apps | Microsoft Docs

 

WORKAROUND

==========

Set the start timestamp for the trigger in the TRIGGER CONDITION:

@greater(triggerBody()?['Modified'],'2020-12-15T05:46:12Z')

This syntax will make sure the flow only trigger when the item is modified after '2020-12-15T05:46:12Z ( the time when we will turn on the flow)

image.png

Hope this helps you understand about the triggering behavior of Sharepoint connector.

 

David Nguyen

 

 

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • SharePoint, Microsoft 365 and Power Platform Developer | Contributor on SharePoint StackExchange
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/