Slack
Last updated
Last updated
Incoming webhooks are a way to post messages from Widgelix into Slack. Creating an incoming webhook gives you a unique URL to which you send your notifications. You can use all the usual formatting to make the messages stand out.
The setup is straightforward - you create a Slack App and then use it to generate a unique webhook URL. Follow the steps in this article to obtain the URL for Slack notifications.
Pick a name, choose a workspace to associate your app with (bear in mind you'll probably be posting lots of test messages, so you may want to create a channel for sandbox use), then click Create New App and choose from scratch. If you've already created an app, you can use that one.
You'll be redirected to the settings page for your new app (if you're using an existing app, you can load its settings via your app's management dashboard).
From here, select Incoming Webhooks, and toggle Activate Incoming Webhooks to on.
Now that incoming webhooks are enabled, the settings page should refresh and some additional options will appear. One of those options is a very helpful button called Add New Webhook to Workspace — click it!
What this button does is trigger a shortcut version of the installation flow for Slack apps, one that is completely self-contained so that you don't have to actually build any code to generate an incoming webhook URL. You'll see something like the following:
Go ahead and pick a channel that the app will post to, then select Authorize. If you need to add the incoming webhook to a private channel, you must first be in that channel.
You'll be sent back to your app settings, where you should see a new entry under the Webhook URLs for Your Workspace section. Your webhook URL will look something like this:
That URL is your new incoming webhook, one that's specific to a single user and a single channel.
Let's see how you can actually use that webhook to post a message.
Keep it secret, keep it safe. Your webhook URL contains a secret. Don't share it online, including via public version control repositories. Slack actively searches out and revokes leaked secrets.
Go to your created rule, and paste your Slack Webhook URL into URL field of Slack notification option: