Slack Webhook Walkthrough¶
Use case: As tasks for the batch pipelines in a journey change status, Observability sends the message "Task <name> is now <completed>. Link: <Personalized link to run details in Observability>"
to you, directly in Slack.
Step 1: Generate an incoming webhook URL in Slack¶
Start by following the instructions outlined in the Slack documentation to generate an incoming webhook URL.
The URL will look something like this when you're done: https://hooks.slack.com/TXXXXX/BXXXXX/EXAMPLE
Copy this URL to use in the next step.
Step 2: Set up your Observability rule¶
When you have your personalized Slack webhook URL, log into Observability, select your project, and open the Journeys page.
- Select the journey you want to define the rule for, then select the Rules tab.
- Click Add Rule.
- Use the drop-downs to fill in the rule predicate: When task status is Completed for any component in journey.
- Click Add Action and select Web Request.
-
Fill in the Send Web Request fields.
- Select
POSTas the Method. -
URL is the URL you copied in Step 1 above.
For example:
https://hooks.slack.com/TXXXXX/BXXXXX/EXAMPLE -
Use the following Payload:
-
Slack does not require headers for calling its webhook, so leave this field blank.
- Select
-
Click Save.
Now, you'll receive a message directly in Slack as tasks for the batch pipelines in this journey are completed.
Note
Task status rules only trigger for batch pipeline components.