By JJ Tamhankar

Microsoft Teams Alerts

Integrates with:

The MS Teams Alerts kit gives you a dynamic, easily customizable template to set up custom notifications to MS Teams Channels. This can be used to enable many different use-cases as they are relevant to your organization. Some of these include alerts when items are purchased, new trial accounts are created, feedback is received, commits made to a repository and a lot more!

This kit is intended as a starting point for configuring more complex alerts. In this kit, we create a simple, “Cat Fact of the Day” alert to send information from a source (in this case a rest api) to a specific Teams channel, because if there’s anything the internet loves, it's cats!

This kit will walk you step-by step to set up the proper configuration in your Teams account and setting up variables to pass into the API call.

API Docs: https://docs.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http

This template includes…

  • An action river to obtain the “Cat Fact of the day”.

  • An action river that posts this information to a Teams channel in the proper parametrized format.

  • A logic river that orchestrates both actions.

Configuring this template for use

  1. Creating an “app” – You must generate an auth token that corresponds to an app that has certain permissions: 

More information found here: https://docs.microsoft.com/en-us/graph/auth/auth-concepts?context=graph%2Fapi%2F1.0&view=graph-rest-1.0

  1. Variables

In this template, there are four variables, three of which come from the connection details that are used to make the api call to the relevant teams channel to post a message.

{team_id} – This is the unique identifier that corresponds to the team associated with your teams account. 

{channel_id} – This is the unique identifier associated with the channel that you are trying to post the message to.

This linkedIn post explains where to find your team and channel_id: https://www.linkedin.com/pulse/3-ways-locate-microsoft-team-id-christopher-barber-/

{authorization}  – This is the auth token that you generated in step (1).

{mail_alert_group_ms_teams} – This is an environment variable corresponding to a list of comma-separated email addresses that you wish to be notified if the river in question fails.

3. Connections

Templates are imported with ‘blank’ source and target connections. In order to use the template, you have two options:

  • Swap out blank connections with existing connections

  • Add credentials to the blank connections that come with the imported template.

Have questions about this template?

Contact our solutions team at helpme@rivery.io.

Minimize the firefighting.
Maximize ROI on pipelines.

icon icon