Skip to content

How to receive Azure Updates directly into your Slack

Photo by brotiN biswaS: https://www.pexels.com/photo/selective-focus-photography-of-magazines-518543/

Microsoft provides a handy RSS feed for its Azure updates at https://azurecomcdn.azureedge.net/en-us/updates/feed/. This feed includes all updates related to services arriving with Preview and General Available status. As this is great information for everyone who is interested from Azure, I wanted to make this feed’s information available to everyone on our Slack (our companies main communication channel).

Slack offers built-in RSS readers, but I thought of implementing a reader by myself so I could better customize where and how the updates appear in Slack. So, I started implementing RSS reader as a Consumption-type Logic Apps application. The application reads new items from the RSS feed once a day and posts a message to Slack for each item. Messages are formatted slightly to make it easier to distinguish between those in Preview and General Available statuses.

Logic App

RSS reader with minor logic

I started by creating a recurring Logic App application. Logic App already provides an action suitable for reading RSS, which can identify “new items” from the stream. After a brief test, I found that the recognition wasn’t working correctly, so I decided to solve the duplication issue differently. I set the RSS reader to run every day at 00:01 UTC. Additionally, in the Since parameter in Logic Apps, I set the previous day’s UTC time.

formatDateTime(addDays(utcNow(), -1), 'yyyy-MM-dd')
PublishDate is not suitable value to determine which items are new.

Now, the Since parameter ensures that the RSS reader fetches only the items accumulated within one day and sends them to Slack. In addition to scheduling, I wanted to format the messages slightly better to make it easier to identify updates in different statuses. I started implementing branching in Logic Apps with the Condition Action, which can compare a given value and make True/False branches based on the value. For comparison, I used the Feed title field and the Contains Preview condition. Thus, items containing the word “Preview” end up in the True branch and all other updates in the False branch.

Formatting Messages for Slack

Slack supports formatting similar to .MD files. For example, you can add bold by placing asterisks around the desired text. Additionally, I wanted to further distinguish messages from each other by using emojis. You can insert emojis directly into post Slack message action, and apparently, they end-up correctly into Slack. For sending Slack messages, I used the Post message (V2) action, which is found in Logic Apps and has been reliable.

Rocker icon is used for In Preview items

The RSS reader has been running reliably for a few days now, with execution times ranging between 3-4 seconds. With such integration running once a day and consuming 3-4 seconds, the practical cost is only a few cents per month.

RSS reader in action. Gold ribbon is used for others than In Preview items

Summary

Using Logic Apps makes it easy and efficient to create integrations between systems, as long as the integration doesn’t require too much logic and Logic Apps support the target systems out of the box. If complex logic is needed in the Logic Apps, I would quickly resort to implementing it using Azure Functions or with another tool, that supports “proper” programming language. However, for such a simple RSS reader, Logic Apps is excellent choice.

Leave a Reply

Your email address will not be published. Required fields are marked *