cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ksod
New Member

[Solved]Trigger flow only when a specific file property is updated

Hello, 

 

I am working on a workflow in power automate that creates a planner task when a user is assigned to a document in a SharePoint document library. Triggered by 'when a file is created or modified (properties only)' with the condition that the "assigned to" value is not empty in the SP. It then creates a task and assigns it to the users specified via the dynamic content 'Assigned To". The flow works, but it creates a task every time a file property is modified and results in duplicates of the same task. How can I prevent this from happening? I.E. only make it to where the flow is triggered when the "assigned to" value is updated/prevent duplicates?

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MarconettiMarco
Super User
Super User

Hello @ksod ,

please add the following expression in the Trigger Condition:

@not(equals(triggerOutputs()?['body/AssignedTo'], null))

Please replace "AssignedTo" with your unique name column.

 

MarconettiMarco_0-1659972148881.png

MarconettiMarco_1-1659972172894.png

 

 

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

BR,

Marco

View solution in original post

3 REPLIES 3
MarconettiMarco
Super User
Super User

Hello @ksod ,

please add the following expression in the Trigger Condition:

@not(equals(triggerOutputs()?['body/AssignedTo'], null))

Please replace "AssignedTo" with your unique name column.

 

MarconettiMarco_0-1659972148881.png

MarconettiMarco_1-1659972172894.png

 

 

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

BR,

Marco

This worked! It now only creates a planner task when the 'Assigned to' value is changed. Thanks.

Hello @ksod ,

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

BR,

Marco

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,500)