- 24 Nov 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Slack Message
- Updated on 24 Nov 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
You can configure a Workflow with a Slack Message event. Before using this event the first time, you must configure Slack to send Webhook Events to Axonius.
A Slack message event is sent each time a Slack message is sent using a Slack - Send Direct Message to Assets or Slack - Send Message to Channel enforcement action.
A workflow configured with this event as a trigger runs on each user that sent a Slack message. You can also add a Slack Message event anywhere else in the workflow, where relevant.
Configuring Slack to Send Webhook Events to Axonius
In System Settings, under External Integrations> Workflow Events, a different Axonius URL is defined for each third-party product supported by Axonius.
Before adding a Slack event to a workflow the first time (or after the URL has changed in the System Settings), you must configure the Axonius webhook URL for Slack in the Slack application so that the Slack app can send webhook events to the Axonius webhook URL, and trigger Enforcement Center workflows.
Then, when a webhook event occurs, Slack sends an HTTP POST request to this URL.
It also requires you to enable Incoming Webhooks, and for Interactive messages, to also enable Interactivity.
You need to configure the third-party system Webhook event only once, unless the Axonius webhook URL for that system changes.
To configure Slack to send webhook events to Axonius
In Axonius: Navigate to System Settings>External Integrations> Workflows Events, and in the Product dropdown, select Slack.
In Slack:
- Create a new Slack App:
- In the Slack API Apps dialog, click Create New App.
- From the Create an app dialog that opens, type an App Name and select the Axonius workspace and click Create App.
- Enable incoming webhooks on the Slack app:
- From the list of apps, select the app, and in the left navigation pane, under Features, click Incoming Webhooks.
- In the Incoming Webhooks dialog that opens, toggle on Activate Incoming Webhooks.
- Enable interactive webhooks on the Slack app - In the left navigation pane, under Features, click Interactivity & Shortcuts and in the dialog that opens, turn on the Interactivity toggle.
- Subscribe Axonius to be notified of Slack events:
In the left pane, under Features, click Event Subscriptions.
In the dialog that appears, toggle On Enable Events.
In the Axonius Workflows Events dialog, click the Copy icon near the displayed URL (see screen below) and paste it into Request URL in the Event Subscriptions dialog in Slack. Slack sends a request with a challenge parameter to you. Once Axonius responds with the challenge value, Slack verifies the URL and provides a signature key.
- Create a new Slack App:
In Axonius: Copy the signature key into Signing Secret (see screen below). Axonius sends the signing secret to Slack to verify that the webhook came from Slack.