Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Trigger an MS Flow if a file is published

(0) ShareShare
ReportReport
Posted on by

I'd like to have the team to work on documents stored in a specific sharepoint folder undisturbed. However, whenever they think that a document is to leave the draft status and is ready for plublication (i.e. whenever they publish a document) I would like to trigger an approval flow. My approach boils down to this:

1- get the file details using a SharePoint: When a file is created or modified (properties only action)

2- Setup a condition that would test whether the Approval Status was changed to Pending.

3A - If it is set to Pending, then start the approval flow

3B - If it is not set to pending, then ingore the trigger - since it is caused by another event

 

 

I can't figure out how to write the condition, i.e. how to set it up so that i can test the Approve Status Value. (identify whether the trigger is fired by a publish action)

 

Any thoughts?

  • jlni01 Profile Picture
    3 on at
    Re: Trigger an MS Flow if a file is published

    Any solution to this? My closest attempt is

     

    1.) When a file is created

    2.) start Approval flow

    3a.) Set content approval status: Submit

    3b.) Set content approval status: Approve

    BadGateway error because file is "Draft"

    ----

    Janky solution:

    1.) When a file is created

    Here user must manually Check-In file and then Publish file (this must happen immediately and before the approver clicks "approve")

    2.) start Approval flow

    3a.) Set content approval status: Submit

    3b.) Set content approval status: Approve

    File is published

     

    Thus, no good solution yet. Have checked many forum posts and tinkered with many options in PowerAutomate with no success.

  • stevejhh Profile Picture
    5 on at
    Re: Trigger an MS Flow if a file is published

    Same here... Have you found a solution?

  • stefgerardi Profile Picture
    4 on at
    Re: Trigger an MS Flow if a file is published

    Hi, I would like to do the same but only when a news post is published on SharePoint. I've set up a flow on power apps and it works but it sends out a notification via email and teams as soon as I create a new post, which is not what i want because i dont even get a chance to name the post and it straight away sends out a notification whilst the post is still a draft before even publishing it. Can anyone help me out? I am not able to view the link listed above either.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Trigger an MS Flow if a file is published

    i've found an alternative here: https://powerusers.microsoft.com/t5/Flow-Cookbook/Publish-approval-manual-flow/td-p/79600

    this is needed since Flow doesn't yet support publish triggers

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1