Send Smart Action notifications to Slack
This example shows you how to integrate Slack incoming webhooks to receive notifications in your workspace when a Smart Action e.g "Reject application" is triggered.
Create your Forest Admin slack app
Follow Slack's guide to create a new app in your workspace and start sending messages using Incoming Webhooks.

At the end of this guide, make sure your Slack app has the following features activated:
Incoming Webhooks
Interactive Components
Bots
Permissions

Once your Slack app has its shiny Incoming Webhook URL, you will be able to send your message in JSON as the body of an application/json POST request.
Connect your app from a Slack channel of your choice

Set up the webhook from your admin backend
Install the node.js Slack SDK
From your project's directory, simply run
Add the Incoming Webhook URL to your .env
This Incoming Webhook URL contains a secret key, please make sure it does not appear in your code.
Create the Smart Action and initialize the Incoming Webhook
Smart Action declaration
Smart Action logic
To learn more about error handling of Slack Interactive Webhooks, please visit the Slack changelog.
Last updated
Was this helpful?