0

We have the following SharePoint document library:

image.png

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) 

enter image description here

But the flow will never get executed. Any advice?

1
  • check the field name '_ModerationStatus' , is the internal name _ModerationStatus ? try it using _ModerationStatus0 in the trigger condition Commented Sep 1, 2022 at 1:58

2 Answers 2

1

"When a file is created or modified in a folder" trigger does not return Approval Status column value in triggerOutputs.

Instead use "When a file is created or modified (properties only)" trigger.

Then use trigger condition like:

@equals(triggerOutputs()?['body/{ModerationStatus}'],'Pending') 

enter image description here

0

You can try this flow:
flow

====================
If the answer is helpful, please click "√" on the left panel of the answer and kindly upvote it.

1
  • User already using SharePoint default content approval on document library Commented Sep 1, 2022 at 8:25

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.