1

I have created a new flow which run when item is created or modified inside SharePoint list. But I do not want this flow to run when item is created.

I only want it to run when the item is further modified. So how can I define a Power Automate Trigger condition where Created does not equal Modified?

3 Answers 3

2

Go into the settings for the trigger, and add the following Trigger Condition.

@not(equals(triggerBody()['Created'],triggerBody()['Modified']))

Screen capture of trigger condition

2

You can do this using Trigger Conditions in Power automate flow. You can use the expression like below:

@not(equals(triggerOutputs()?['body/Created'], triggerOutputs()?['body/Modified']))

Follow the steps:

  1. Go to settings of trigger in flow:

enter image description here

  1. Click "Add" under "Trigger Conditions", paste the formula and click "Done".

enter image description here

Similar thread: Run flow only on modified SharePoint item

0

I've had similar problems myself. And while the above answer does work most of the time, it does not if the item has been updated before the workflow runs.

Since Power Automate is an external system from SharePoint, the triggers work on a timer, and not instantly. As such, it is possible for a person to create an item, then update the item (within about a minute), then the original trigger runs, and the item, although 'technically' created for this workflow, has different created/modified times due to the fact that the lookup for these triggers is when the workflow actually runs, not when the item was actually created/modified.

The best answer would be for microsoft to add a dtg stamp to the workflow execution so the workflow could lookup the data at the time of the instatiation. However, until then, if this is absolutely needed, recommend the following workaround.

  • Add column 'Updated' (Yes/No), default no
  • In workflow, if Updated is No, update to 'yes', then quit.
  • In workflow, if Updated is Yes, then continue.

Stupid workaround, but it does in fact work. Happy to hear any other experiences/information anyone has on this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.