Access Public GitHub Repo Feeds in Power Automate

Kevin CrouchDocumentation, General, How-To, MicrosoftLeave a Comment

Have you ever wanted to get a simple notification when there is a new Release for your favorite PowerShell Module or other Public Repo on GitHub? In this post we’ll talk about how you can use Power Automate to watch for new releases and trigger events on these and send out Teams messages, Emails, or even Kick off an Azure Function or similar automation.

Table Of Contents

Introduction

In my previous post, we did some automation with client-side scripts and Microsoft Graph to update Outlook Auto-Responses on a schedule. Today we will be going in a different direction for something with almost no code in it at all – Power Automate.

Power Automate is an excellent tool that can monitor for changes, run actions on a schedule, process events, or just run a multi-step process when you hit a button. It does all of this with you having to write no, or minimal, code by using Service Connectors and abstracting out Events and Actions that you might need to take. This post assumes that you are somewhat familiar with Power Automate, for an introduction to Power Automate, check out this Microsoft Docs Article, or this Microsoft Learn Course on Automate.

There are hundreds of supported app and service connectors including Twitter, Office 365 Outlook, and the connector that seems like it would help us most for this goal: GitHub.

Available triggers for GitHub are based on Issues or Pull Requests

However, when you look at the GitHub connector, it only supports a few triggers related to Issues and Pull Requests, and if we check the GitHub Connector triggers documentation, then even those would require an API key. Since these are public repos, instead of repos we own, we won’t have any way to get a API key anyway.

We definitely need some other direction.

GitHub supports Atom Feeds

After some searching around, I found that GitHub support Atom Feeds by appending .atom to certain URLs.

From what I could find, these are supported on Releases, Tags, and Commits. To get the feed, simply take the URL for the feeds and append .atom to the end.

Discovering & Testing RSS/Atom feeds

If you are still having a hard time finding the URL, I found this Edge Extension to discover Atom URLs for the current page, and a Chrome Version as well.

To test what the content of the feeds was, I used rssatom.com to check I had a valid Atom or RSS feed URL that worked publicly.

Now, armed with these feed URLs, we have… no connector for Atom Feeds directly… damn… we were so close…

But! Atom Feeds are mostly compatible with RSS Feeds. Compatible enough that we can actually use the RSS Feed connector to receive the feeds and throw our events! We just won’t be able to access all of the fields.

Connecting the Connectors

The useful fields available to us are below:

  • Feed Entry Title
  • Feed Entry Primary Link
  • Feed Entry Links
    • A list of the links in the entry
  • Feed Entry Summary
    • Roughly the “text” of the Feed Entry
  • Feed Entry Update and Published Dates

Here is a full listing and link to the RSS Feed Connector documentation

So from here, we can use the RSS Feed trigger, build some variables, and send it to the Teams Connector. From this, I refined the formatting a bit, and ended up with this.

This sends through notifications to Teams that look like this:

Install Instructions

You can download this here to import this into your own environment and start getting your own notifications from Public Repos.

You can also use this as a guide to set up alerts on any other RSS feeds or most Atom feeds as well. Since this is already in Power Automate, you could also use hundreds of different connectors to connect to other services like Azure Automation, DevOps, Blob Storage, FTP, Slack, Todoist, or even invoke a Web API.

Conclusion

In this post, we found a way to work around some limitations of the GitHub Connector, made a Power Automate flow that can be easily duplicated to subscribe to many feeds, and used Power Automate to post notifications to Teams Channels.

Image result for so much win jim halpert

What kind of workflows would you like to automate? Let me know what kind of things you are doing with Power Platform on the Discord below. For some ideas of automations you might be able to use, go Browse Power Automate Templates, Search Connectors, or check out the Power Automate Community.

If you have questions, are having problems, or just want to chat over something, for the best response you can reach me and several other IT Pros on the WinAdmins Discord as @PsychoData or you can reach me on Twitter.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.