OCT 27, 2021

The Slack Alerts Kit gives you a dynamic, easily customizable template to set up custom notifications to slack 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 slack 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 slack account and setting up variables to pass into the API call.

This kit includes…

  • An action river to obtain the “Cat Fact of the day”
  • An action river that posts this information to a slack channel in the proper parametrized format
  • A logic river that orchestrates both actions

Minimum RPU Consumption: 1

Configuring this Kit for use

Slack Setup
  1. Set up a new slack app (if one hasn’t been configured already) in your organization’s workspace.
  2. On the Features page, toggle “Activate Incoming Webhooks” to ‘ON’.
  3. Click “Add New Webhook to Workspace”.
  4. Pick the channel where this alert will post to (or create a channel called daily_cat_facts, for the purposes of this kit).
  5. Retrieve your “Incoming Webhook URL” which you will use to configure the connection parameter for this kit (shown below).

When ready to use the kit, you will click on the “Use Kit” button atop this page and be redirected to a connections portal where you will need to create a new custom Slack channel connection. 

After selecting “Add New”, fill out the “Connection Name” line and then add a new parameter key called “webhook_url”. Then, from step 5 of the Slack Setup instructions, add the Incoming Webhook URL as the value. Select “Save” and then “Next” to start using the Slack Alerts Kit! 

Configuring This Kit for More Complex Alerts

As you may have noticed, the body of the “Post to Slack” action river is parametrized, meaning that the variable passed into the body can be drawn from any source (as long as it can be parsed as a string-type and is less than 13mb in size):

In order to modify what is passed into the body, simply edit the variable name in the variables tab of the action.

Make sure that the variable is referenced in the body of the request with the same spelling and case sensitivity.

Then, in the Logic River (“Slack Alerts Sample Logic”), ensure that the output variable of any prior step outputs to the name of the variable(s) that you set in the action.

The variables can be generated from an action river (as in the example) or a SQL/Script step:

This Kit can be downloaded and used multiple times within a Rivery account. In order to keep track of each iteration, we recommend using the naming convention “Slack Alert – Source – Channel_name“ for the logic rivers. 

Have questions about this Kit?

Set up a meeting with a Rivery solutions engineer.

Consult with us

Lets us show you why the world's top brands choose Rivery.
icon icon