We have the following SharePoint document library:-
now we want to run a flow only when the user Publish the document (when its status is changed from Draft to Pending), so i tried this trigger condition:-
@equals(triggerOutputs()?['body/{_ModerationStatus}'],2)
but the flow will never get executed. any advice?
@johnjohn123 I believe when using the trigger you have used will not contain the moderationStatus. Consider using the trigger "When a file is created or modified (properties only)" instead.
The Trigger condition should be:
@equals(triggerOutputs()?['body/{ModerationStatus}'],'Pending')
@PowerRanger
you are correct using "file is created or modified (properties only)" solved my issue.Thanks
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 462 Super User 2025 Season 2
Tomac 456 Moderator
abm abm 243 Most Valuable Professional