How to Send an Email when added a News Post in SharePoint Online site

Copper Contributor

How do you Send an Email to notify a user whenever a new News Post is created in SharePoint Online site?

Please help on how to do this. What are the ways.

news.png

23 Replies

Hi @John Edward Paredes there are a number of ways that you could tackle this. You could create a Flow which has a trigger on the Site Pages library to send an email to a user/set of users to inform them that some activity has taken place.

 

Alternatively, you could use the out-of-the-box Alerts mechanism as displayed in the attached screenshot. This way you can specify whether the alerts are sent out immediately, daily summary or weekly summary.

If they use the SharePoint mobile app today (iOS  or Android), they'll be notified of news posts by people they work closely with (powered by the graph).

 

We're also currently have notifications enabled for sites you follow within Microsoft (and will be rolling this out in the future to TR, then production).

 

We've built a feature to email people that don't have the mobile app installed if a notification "should" go to them (based on graph, site following, etc.) but we haven't yet figured out the right way to integrate that into the authoring process and create the right notification settings.

 

If you have thoughts on what you think the right experience is, we'd love to hear them. Thanks! fyi @Debjani Mitra

Flow would be my recommended way of solving this

@Matt Weston Hi Matt, The OOTB solution you provided is not helping. When I try to set an alert on News page, then I get alerted whenever changes are on News.aspx and it is published but not when there is any news post added. Am I missing something? How can I set an alert for myself/other users to get alerted on the News post releases? TIA.

Hi @pdang , if you're looking for alerts when only when a news item is published then you're better off working with Microsoft Flow to achieve this. The OOTB method will send alerts when an item is added to the library regardless of whether it is published or not.

 

I'll post an example Flow later today just in case you need it.

Hi Matt,

Can you post some Pointers on how to do this please?

Thanks

Martin

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 thank you for the info, this worked for me to send notifications, but I wanted to ask if you knew a way to add the functionality of adding the content of the news post to the email you send, similar to the way it sends when you use the "send by email" option at the top of the News post page after you publish it? 

 

I can use the "description" dynamic content from the original trigger to put the text into the email, but if there are any images or other things added, that doesn't cover it. 

 

Thanks in advance! 

Hi @KevinO1984 that's a great question and a good extension of what we've already done.

 

As my trigger is "When a file is created or modified (properties only)" I'm able to see the properties of the page coming back. If I've used another trigger, I'll need to use the action "Get File Properties" to get the same info.

 

There are two properties which I could use to add some more info to my email:

  • Banner Image URL
  • Description

Banner Image URL will take the image url of the image which I have assigned as the header of my news page. If I have no header, this field will be populated with the first image that it finds on the page. This is how the rollup image to the news web part works. You can take this URL and use it within HTML in our email.

 

The Description takes the first paragraph from the news item, so again you can use this to add into your email. I don't think there's a native way of grabbing the entire news article from the properties as it doesn't get tagged as metadata, but I'll have a look to see if there are other options which we can explore.

@Matt Weston 

 

That helps a lot, thank you for taking the time to explain it to me. I was able to get the link to the image to show up, now i just need to figure out how to code it so it show up in HTML or something. 

 

Have a great day! 

Hi Matt. Is there anyway you could share this Flow?

As I understand it, you have designed a Flow that can send an email, when a news post have been published 🙂 Would really like to use that.

Hi @fvp11, I've blogged and vlogged it 🙂

 

https://youtu.be/24MgEZn6Y7c

 

https://collab365.community/using-flow-sharepoint-news-notifications/

 

If you need any help, please don't hesitate to let me know.

The out-of-the-box alerts which are delivered by SharePoint are always a sticking point with customers. They do the job, but don't really look that engaging. Enter Microsoft Flow, where we can take the metadata associated with a News Item and format an email as we need

Hi @Matt Weston that looks great!

 

Correct me if I'm wrong but that only works per site? It wouldn't pickup a news post that was rolled up to the site?


I.e. if I had a site called IT and site called "Main Intranet", I'd have to have a flow per site for the news email?

Hi @DaithiG that's correct, however you've got me thinking now if I could do something around the content roll up. Let me see what I can come up with 🙂

Thanks @Matt Weston ! 

 

It's a pity there's no inbuilt way to schedule a news digest and email it to staff.

@John Edward Paredes 

 

Hello,

 

My question and current issue is- i am composing a sharepoint where i need to include a particular person to only receive email notification once i include their email as owner of the particular subject +add new template.

 

I can`t use alerts tab, as i do not want to alert all people using the sharepoint each time- just one person in particular, because those vary.

 

I created a column with settings to enter the email of a person, but when i include my email for testing- i receive no email.

 

I see as workaround only option is to "share" the subjected topic with a person. However, i am pretty sure that there should be a setting to send email to the person "assigned to" automatically.

 

This is in "new experience" view, column type is "People or Group". 

@Zinaida you can do this with a flow in Power Automate. The trigger would be a SharePoint "When an item is created or modified" trigger. You'd then have a condition that would check whether you'd added anything into the Owner column. If you hadn't then nothing would happen. But if you had entered the owner's email address in the Owner column then it would  grab that and use it to send an email to the Owner with any other data you needed to send them.

 

ownerEmail.png

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Hi Matt,

 

I love this! Thank you thank you, Matt, for sharing.  The cherry on top of the cake would be sending notifications to all the people that follow that site otherwise it seems like you have to enter each individual's name into the flow. Any way to pull that basedo on the site viewers if "following" is not an option? 

 

@Matt Weston 

@Matt Weston This solution works like charm for Outlook web client but it does not work for desktop. Can you please help us in anyway?

Thanks,

Neha