cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JosephGray
New Member

News notifications to be put out once a day

Hey all,

In my organisation, we have recently transitioned to using a SharePoint site for communicating our news out to others. As part of this process, we created (googled) the attached flow to allow everyone to be notified after each new post to the site rather than using the weekly digest as people end up missing content. It has been working well but a few people have been saying that the news is too regular for their liking. I was wondering if anyone had any ideas as to how I could maybe store the links from each promotedstate update and then put them all out in a HTML email each day? Or if there are any other workarounds that I don't know about?

 

Thanks!Normal_flow_white.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ekarim2020
Memorable Member
Memorable Member

You could create an email newsletter, something similar to this:

SharePointNews.jpg

You can use Get Items to return a list of all the news items based on a filter query:

ekarim2020_6-1627333906198.png

Then parse each of the news items returned by Get Items, append news item properties to a string variable:

ekarim2020_3-1627332913038.png

The final string variable will contain all your news items:

ekarim2020_4-1627332950439.png

which can then be sent in a Send an email action:

ekarim2020_5-1627333031939.png

Example:

Note the List Name is Site Pages, and the format of the filter query. The filter query an OData Filter query .  The operations can eq, be lt, gt, ge, le, ne (Equal to, Less Than, Greater Than, Greater than or Equal to, Less than or Equal to, No Equal to).

ekarim2020_0-1627332684899.png

You can check if any news items were returned by Get Items:

ekarim2020_1-1627332761415.png

Value: length(outputs('Get_items')?['body/value']). If value is greater than 0 then news items were returned by Get Items action.

Parse each news item:

ekarim2020_10-1627328261530.png

Value: outputs('Get_items')?['body/value']

Building text of each news item by extracting the news item properties in to a compose action:

ekarim2020_4-1627327989903.png

How the above maps to the email newsletter:

ekarim2020_3-1627327941689.png

 

The Description in the email contains only the first 250 characters or so of the news item text. The {Link} contains the URL to the full text of the news item.

Append each news item into a string variable so you can send all the news items in a single email:

ekarim2020_6-1627328110574.png

Send email, add the varEmailBody string variable as dynamic content:

ekarim2020_9-1627328206646.png

This was one of the first Power Automate projects I did mainly as a learning exercise. But the recipients wanted more than plain text emails, so I eventually I converted it to a HTML newsletter. It was a lot of work for me as I didn't have in-depth experience of HTML or CSS. I used the SharePoint digest email as the starting point for the email template:

NewsletterWeeklyHTML.png

Hope this helps.

Ellis

Ellis

________________________________________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
ekarim2020
Memorable Member
Memorable Member

You could create an email newsletter, something similar to this:

SharePointNews.jpg

You can use Get Items to return a list of all the news items based on a filter query:

ekarim2020_6-1627333906198.png

Then parse each of the news items returned by Get Items, append news item properties to a string variable:

ekarim2020_3-1627332913038.png

The final string variable will contain all your news items:

ekarim2020_4-1627332950439.png

which can then be sent in a Send an email action:

ekarim2020_5-1627333031939.png

Example:

Note the List Name is Site Pages, and the format of the filter query. The filter query an OData Filter query .  The operations can eq, be lt, gt, ge, le, ne (Equal to, Less Than, Greater Than, Greater than or Equal to, Less than or Equal to, No Equal to).

ekarim2020_0-1627332684899.png

You can check if any news items were returned by Get Items:

ekarim2020_1-1627332761415.png

Value: length(outputs('Get_items')?['body/value']). If value is greater than 0 then news items were returned by Get Items action.

Parse each news item:

ekarim2020_10-1627328261530.png

Value: outputs('Get_items')?['body/value']

Building text of each news item by extracting the news item properties in to a compose action:

ekarim2020_4-1627327989903.png

How the above maps to the email newsletter:

ekarim2020_3-1627327941689.png

 

The Description in the email contains only the first 250 characters or so of the news item text. The {Link} contains the URL to the full text of the news item.

Append each news item into a string variable so you can send all the news items in a single email:

ekarim2020_6-1627328110574.png

Send email, add the varEmailBody string variable as dynamic content:

ekarim2020_9-1627328206646.png

This was one of the first Power Automate projects I did mainly as a learning exercise. But the recipients wanted more than plain text emails, so I eventually I converted it to a HTML newsletter. It was a lot of work for me as I didn't have in-depth experience of HTML or CSS. I used the SharePoint digest email as the starting point for the email template:

NewsletterWeeklyHTML.png

Hope this helps.

Ellis

Ellis

________________________________________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,041)