web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SharePoint Library Fil...
Power Automate
Answered

SharePoint Library File Content Approval Status Change not triggering flow

(0) ShareShare
ReportReport
Posted on by 21
Hi,
I have a sharepoint library with content approval enabled. I want a flow to trigger when a file is changed to Approved status.
 
I am using this trigger condition : @equals(triggerOutputs()?['body/_ModerationStatus'], 'Approved'), but no joy.....
 
I have also tried these conditions : @equals(triggerOutputs()?['body/ModerationStatus'], 'Approved') & @equals(triggerOutputs()?['body/ModerationStatus'], '0')
 
But I cant get the trigger to work when I approve a file in the librbary.
 
Anyone have any ideas? suggestion on what I can do to test or troubleshoot, as I am out of ideas and cant seem to find anything on the googler...
 
Thanks.
Categories:
I have the same question (0)
  • Verified answer
    MP-20111946-0 Profile Picture
    21 on at
    I think I figured it out.
    I had the check in/out enabled. when I disabled check in/out, I was able to get the trigger to run using the status "Pending". I assume this was because you cant edit a file thats checked in already...
     
  • MP-20111946-0 Profile Picture
    21 on at
    I am back stuck with this trigger command again. Check in is disable.
     
    I had it working but lost the trigger action code and now I cant find teh right one again. I have tried the following and no joy. any suggestions or ideas?
     
    @equals(triggerOutputs()?['body/_ModerationStatus'], 'Draft')
    @equals(triggerOutputs()?['body/ModerationStatus'], '3')
    @equals(triggerOutputs()?['body/ModerationStatus'], 'Draft')
    @equals(triggerOutputs()?['body/OData__ModerationStatus'], 'Draft')
     
  • Suggested answer
    MP-20111946-0 Profile Picture
    21 on at
    Figured it out... eventually.
    I needed to remove the body/ from the code: @equals(triggerOutputs()?['body/{ModerationStatus}'], 'Draft').
    This is what worked: @equals(string(triggerBody()?['{ModerationStatus}']), 'Draft')

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard