Forum Discussion
How to Send an Email when added a News Post in SharePoint Online site
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.
- Neha_RathiApr 29, 2020Copper Contributor
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
- ALDINA3003Jan 30, 2020Brass Contributor
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?
- DaithiGDec 03, 2019Steel Contributor
Thanks Matt Weston !
It's a pity there's no inbuilt way to schedule a news digest and email it to staff.
- Matt WestonDec 02, 2019Iron Contributor
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 🙂
- DaithiGNov 29, 2019Steel Contributor
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? - Matt WestonNov 28, 2019Iron Contributor
Hi fvp11, I've blogged and vlogged it 🙂
https://collab365.community/using-flow-sharepoint-news-notifications/
If you need any help, please don't hesitate to let me know.
- fvp11Nov 27, 2019Copper ContributorHi 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. - KevinO1984Apr 18, 2019Copper Contributor
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!