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.
- Go to Microsoft Flow
- Sign In with your Microsoft account or sign up for free
- Go to My Flows
- Click on Create from Blank
- In the first action you'll select When a feed item is published
- Paste the feed URL. In this case, I'm using https://blogs.msdn.microsoft.com/dotnet/feed/
- Add a new action
- 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!
- 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')['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:
Hope it helps.