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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Posting news in Sharep...
Power Automate
Unanswered

Posting news in Sharepoint. Flow triggers only once in Draft state

(0) ShareShare
ReportReport
Posted on by 21

Hello

 

I created new Flow for the Sharepoint site, which should send an email when new post is Published.

But it doesn't send an email if the post is in the Draft state already. As I understand my Flow already triggered, when the new post swtched to the Draft state and after that when I press publish button it doesn't trigger.

It does work when a post still isn't in the Draft state.

 

Could you plese tell me how can I fix it?

 

Thanks

Annotation 2019-06-26 110437.jpg

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,485 Most Valuable Professional on at

    The only real difference between a draft and published is that the published version is a major version and the minor version is draft.  Taht means the when a file is created won't fire when the page is published.  YOu'll need to change your flow to fire when the files is created or modified and then check to see if the version is a major version or not.

     

    The problem is I don't know any way to retrieve the current version number of the document.  So I don't know how you determine whether this is a major published version or not.

  • Pstork1 Profile Picture
    69,485 Most Valuable Professional on at

    Here are two workarounds that should work.

    1. You can retrieve the current version # of the document using the Send an HTTP request to SharePoint action. Then you can have your FLOW only send the email when a major version is published.
    2. If you run the FLOW connector as an account that only sees the major versions then the File create Trigger will only fire when a major version is Published.

    I suspect #2 is the better choice but it means creating and running the Flow with a different user context that has lessor permissions to the site. Not sure if that's convenient.  #1 will also work but it requires changing the trigger and will lead to more Flow runs.

  • zigfridus Profile Picture
    21 on at

    Thank you for your answer. I've tried to get the file's version from HTTP request but it wasn't successful. 

    Could you please tell me what is wrong in this request:

    _api/web/GetFolderByServerRelativeUrl('/SitePages')/Files('FullFileName')?$select=FileLeafRef,OData__UIVersionString

  • Pstork1 Profile Picture
    69,485 Most Valuable Professional on at

    Take a look at John Liu's blog post on getting the version number.

     

    http://johnliu.net/blog/2018/5/microsoft-flow-sharepoint-trigger-on-specific-fields-changed-via-sp-http-request

  • Pstork1 Profile Picture
    69,485 Most Valuable Professional on at

    I played around with it a little since John's post is for List items.  Here's the right REST call

    https://acmee3.sharepoint.com/sites/FlowDemos/_api/web/GetFolderByServerRelativeUrl('SitePages')/Files('Home.aspx')?$select=FileLeafRef,UIVersionLabel

    Two changes from yours.

    1. Remove the slash form Site pages.  It needs to be server relative not absolute.
    2. retrieve UIVersionLabel.  If that value is a whole number its major (ie. 1.0, 2.0, 3.0)
  • zigfridus Profile Picture
    21 on at

    I'm very sorry for the delay.

    I've got another important task and have to complete it.

    After that I'll try to do that You adviced me.

    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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard