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 / Trigger flow when Shar...
Power Automate
Unanswered

Trigger flow when SharePoint page is published

(2) ShareShare
ReportReport
Posted on by 8

I need to trigger a flow (send an email) when a SharePoint page is published.  I currently have it configured (in development) to trigger on file creation, which means if it autosaves with no content, the email is sent out.  I need it to wait until the creator finishes the page (published).  Any idea on how to accomplish this?  Thanks in advance!

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @ApolloC,

     

    Could you show a bit more about the SharePoint Page? The Page in Site Pages or the Page of Word document in SharePoint Library?

    Further, could you please share a screenshot of your flow’s configuration?

    For the Page in Site Pages, there is no trigger or action about “When a SharePoint Page is published” in Microsoft Flow recently. Besides, there is no way to check if the SharePoint Page has published.

     

    For the Page of Word document in SharePoint Library, if you create a new document in library by “New” button, it will be saved automatically.

     

    Best regards,

    Kris

  • ApolloC Profile Picture
    8 on at

    Well, I'm using the "News" webapp to create a modern page.  After the auto-save (or save button), the .aspx is added to the Site Pages page library.  If there are images on the page, those are saves to Site Assets --> SitePages at the same time.

     

    I don't understand what you're trying to tell me about a "Word document".

     

    It looks to be a huge hassle to include images.  The flow is super simple..."When an item is created -> Send an email".  I enter the site and list name for the trigger, and added my email and a few dynamic fields in the action.  I haven't bothered to customize it much yet because it's appearing as if the desired functionality is not yet available.  I've also tried using the "When a file is created in afolder" trigger as well...this one isn't very reliable (often doesn't trigger) and when it does, has the same undesirable result of sending the email after the "auto-save".

  • Community Power Platform Member Profile Picture
    on at

    I wanted to do the same thing as you. I wondered if I could do this:

     

    @equals(coalesce(triggerBody()?['FirstPublishedDate'], ''), triggerBody()?['Modified'])

     

    which compares the FirstPublishedDate to the Modified field, and if they are the same then the page has just been published. However the two field values did not exactly match:

     

    Modified                    2017-11-07T12:41:34-08:00
    FirstPublishedDate   2017-11-07T12:41:33-08:00

     

    Also I think that FirstPublishedDate is only available on news pages, not site pages.

     

    So it would be great if there could be a flow to act on publishing a page.

  • ApolloC Profile Picture
    8 on at

    My FirstPublishedDate field is null...so no use to me.

  • Sofie_D Profile Picture
    260 on at

    Did you ever find a solution for this? I need to have a flow run every time a page is published as well.

  • Lordipswich1 Profile Picture
    4 on at
  • prousername Profile Picture
    2 on at

    I was able to accomplish this by looking at the Promoted State field on the site page.  I use this to make a draft of a status report at the beginning of the week, then publish the report at the end of the week.  Stakeholders are notified only at publishing, people that need to contribute to the status report are notified of the draft.

     

    My trigger looks like this followed by a conditional that ignores the Templates folder and only continues if the Promoted State is greater than 1.

     

    Trigger: When a file is created or modified (properties only)

    Library Name: Site Pages

    Folder: /SitePages

    Condition: Folder path doesn't contain Templates & Promoted Status > 1

     

    Power Automate screenshot showing how to determine when a news item in Sharepoint has publishedPower Automate screenshot showing how to determine when a news item in Sharepoint has published

     

    The "Yes" path is when the content is published.  The "No" path is when it is a draft or modified.  YMWV on how to make the "No" path work right for your organization.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard