Trigger a flow when news is posted

There is no specific trigger action for whenever SharePoint news is posted. This article explains how you could work around this by using a trigger condition expression.

Original request

Communication website – automatic e-mail when someone has published a new entry?

Power Users Community thread: Communication website.

First Published

In this example we will only trigger a Power Automate flow when a SharePoint Online News Post is posted and when the First Published Date and the Last Modified Date values are within the same minute. After it is triggered we will use the title, published date and the description in an e-mail.

In other words, it is only triggered when you post the news the first time. Or when you republish very quickly ;).

Republishing is out of scope of this example.

PromotedState Enum

In this example we will be looking for News Posts. News Posts are stored in the Site Pages library just like regular pages.

You can identify News Posts by using the PromotedState field value. We will only be using PromotedState value 2, which is a published News Post.

LabelValueDescription
NotPromoted0Regular client side page
PromoteOnPublish1Page that will be promoted as news article after publishing
Promoted2Page that is promoted as news article

The flow setup

1. Add the When an item or a file is modified trigger action. Make sure you use the Site Pages library.

itemmodified

2. Add the following expression in settings.

promotedstate_firstpublisheddate

3. Add a Send an email (v2) action. Use the fields from the page you want to use.

newsgotpublished

In this example we are using a Send an email action. However, for this scenario you could also use the News Digest feature. Other options could be a Teams message or another kind of notification. Just try it out, be creative 🙂

Happy testing!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.