cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

How to create a PowerAutomate which will be triggered on created/modifed metadata of a document?

I would like to create a PowerAutomate which needs to be triggered on created/modified metadata of a document. I dont want the PowerAutomate will be triggered when I modify the content of a Word document and auto-save is on. When auto-save is on in Word it will trigger each auto save the PowerAutomate. It costs me to much api requests from my license.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hello @KLD ,

if the document library has only a small amount of metadata, you could create 'hidden' column for each of them and keep them synchronized. That way you could add a trigger condition that would check if the data in both of the columns (the main one and the hidden one) is the same and run only if it's different (and synchronize them again).

Below is an example of a trigger condition using 2 such metadata columns:

@or(not(equals(triggerOutputs()?['body/Column1'],triggerOutputs()?['body/Column1_copy'])),not(equals(triggerOutputs()?['body/Column2'],triggerOutputs()?['body/Column2_copy'])))

more readable format:
@or(
    not(equals(triggerOutputs()?['body/Column1'],triggerOutputs()?['body/Column1_copy'])),
    not(equals(triggerOutputs()?['body/Column2'],triggerOutputs()?['body/Column2_copy']))
)

But if it's many metadata columns then the solution could get quite complicated.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]

View solution in original post

1 REPLY 1
Super User II
Super User II

Hello @KLD ,

if the document library has only a small amount of metadata, you could create 'hidden' column for each of them and keep them synchronized. That way you could add a trigger condition that would check if the data in both of the columns (the main one and the hidden one) is the same and run only if it's different (and synchronize them again).

Below is an example of a trigger condition using 2 such metadata columns:

@or(not(equals(triggerOutputs()?['body/Column1'],triggerOutputs()?['body/Column1_copy'])),not(equals(triggerOutputs()?['body/Column2'],triggerOutputs()?['body/Column2_copy'])))

more readable format:
@or(
    not(equals(triggerOutputs()?['body/Column1'],triggerOutputs()?['body/Column1_copy'])),
    not(equals(triggerOutputs()?['body/Column2'],triggerOutputs()?['body/Column2_copy']))
)

But if it's many metadata columns then the solution could get quite complicated.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (17,108)