DEV Community

Bala Madhusoodhanan
Bala Madhusoodhanan

Posted on

3 1

Automate Weekly Newsletter

Last week the blog was to automate the Microsoft RSS feed. This week the concept is same but the power automate flow is simplified and the RSS feed that is automated is with security podcast SmashingSecurity

Implementation:

  • Collection of data: The RSS connector would enable you to get a JSON data which we would manipulate in the following steps

Image description

  • Condition: Instead of leveraging filter array, condition is leveraged to pull the needed content. We will Parse the Publish Date field from the RSS feed leveraging function as below. Grabbing the last published feed would be using the [0] index and the object is ['publishDate']
body('List_all_RSS_feed_items')[0]?['publishDate']
Enter fullscreen mode Exit fullscreen mode

Compare the latest publishDate and validated if its published in the last 7 days.

addDays(utcNow(),-7)

Image description

  1. Yes - If the condition above is satisfied , post the message in a Microsoft TEAMS channel

Image description

  1. If the condition is not met then no action
  • Email Composition Mapping the Subject of email as the RSS feed title
body('List_all_RSS_feed_items')[0]?['title']
Enter fullscreen mode Exit fullscreen mode
  • Extracting Test for body of email The split() function returns an array of substrings. We have used 2 delimiters with the split function ('Sponsored by:' or 'Episode links:'). [0]: This specifies that we want to access the first item in the resulting array, which is the substring before "Sponsored by:".[1]: This specifies that we want to access the second item in the resulting array, which is the substring after "Episode links:".
split(split(body('List_all_RSS_feed_items')[0]?['summary'],'Sponsored by:')[0],'Episode links:')[1]
Enter fullscreen mode Exit fullscreen mode

The simplified PowerAutomate flow would be

Image description

The result !! automated the PodCast summary as a weekly newsletter to the team to learn and enrich the knowledge ....

Image description

Please say "thank you" by commenting on this post!

Everyone is welcome

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay