/ microsoft flow

Microsoft Flow: Email Me When My Latest Post Is Older Than 10 Days

This started with the idea of getting more involved, share more and learn more. So I set a goal to write at least 2 blog posts per month. Since I'm starting this journey, I need that much time to think about the content and write a decent enough post worth publishing.

Alright, I've been playing with Microsoft Flow and it's pretty nice, although it's got some limitations. So my first idea as a "Hello World" was to create a flow to send me an email when a new blog post was published in a specific blog I follow, for example, the .NET Blog.

Pretty basic steps to achieve this.

  1. Go to Microsoft Flow
  2. Sign In with your Microsoft account or sign up for free
  3. Go to My Flows
  4. Click on Create from Blank
  5. In the first action you'll select When a feed item is published
  6. Paste the feed URL. In this case, I'm using https://blogs.msdn.microsoft.com/dotnet/feed/
  7. Add a new action
  8. Select your preferred email provider or use SMTP

At the end, that's how my first flow is looking like.

I wanted to go a bit further, though. I wanted to track my blog and notify me when my latest blog post was more than 10 days old, so I had enough time to reach my goal of writing 2 posts per month. That's when I hit some road blocks.

Here's my requirement: I want it to check every morning if my latest post is older than 10 days then send me an email if it is. Easy hey!

  1. Create new flow from blank
  • Trigger is now a Schedule - Recurrence
  • Select Frequency as Day and Interval 1
  • New Action: RSS - List all RSS feed items
  • Paste my feed: https://passos.com.au/rss/
  • FIRST ROADBLOCK: How to get the latest item in the feed?
  • Click + New step
  • Click Add a condition
  • Click Edit in advanced mode
  • Set Condition to : @less(string(body('List_all_RSS_feed_items')[0]['publishDate']), adddays(utcnow(), -10))
  • This will check if the publish date of the first item in array is older than 10 days
  • Add Action to send email
  • SECOND ROADBLOCK: couldn't get the first item to send in the email. If I pick the feed item it generates a loop and it would send several emails

And that's how my "Remind me to write a new blog post" flow is looking like:

Stephen Siciliano created a Flow template based on this idea mentioned in the Microsoft Flow's blog

Hope it helps.


Buy me a coffeeBuy me a coffee
Thiago Passos

Thiago Passos

I'm Thiago Passos, a Solution Architect working for SSW sharing what I've been working with and learning. Love technology, dancing and I get unfriendly when I'm hungry.

Read More