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
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,603)