Forum Discussion
How to Send an Email when added a News Post in SharePoint Online site
Hi Mbryant705, sorry I realised I completely forgot to follow up on this post, so also apologies to everyone else involved in the thread.
In a very simple Flow, I can send an email notification when a news item is published. There are a couple of things to be aware of:
- Site Pages won't normally appear in the list of libraries in the trigger, therefore you need to select "Enter a custom value" and then type in Site Pages
- The published state of a document is held within a metadata field called "Promoted state". 1 = in Draft, 2 = Published. If it's a standard site page, not a news item, the Promoted state will be 0.
I can create a condition so that if the Promoted state = 2 (News Item is published) then I can send an email to the required user(s). I can alternatively use the Flow actions to send out a push notification, send a message to Teams etc however you want to get your notification out.
An example Flow is attached to this post. I hope that helps.
Hi Matt Weston,
I have done the setup for sending mail when a news post is published. Most of the time the Flow works great but sometimes it doesn't trigger, especially if users change pictures when creting the news post.
It is not even shown as failed in flow. I use "when a file is created(proprties only)" since the client doesnt want notifications for updates. Can it be that the promoted state =2 happen to be changed to something else for some reason when publishing? Have you got some ideas on what can be wrong or troubleshooting steps?
Best regards
/Fredrik