To set up Slack notifications through Webhooks, start by creating a Slack app that exposes a webhook, and then configure the integration. We will guide you through these processes:
Click this link to go to the slack app's page.
Choose the channel in which you would like to install it, and then you will be redirected to Jscrambler app home in the selected workspace.
You will see that a webhook has already been created.
If you wish to create webhooks for other integrations with the same or other channels you can click on Create Incoming Webhook and you will once again be asked to choose a channel.
If you wish to test if the webhook is working you can click in the Test Webhook button.
A message will appear afterwards in the channel associated with that webhook.
This documentation can be accessed by clicking in the Documentation button.
If changes to the webhook list don't appear then you can refresh it by clicking in this button.
To perform the next few steps in the Jscrambler Dashboard (described in the following section) you can click in the Setup Instructions button.
A textbox then appears with a simple explanation of what to do next. This shows you the webhook URL only once, make sure you save it if you want to use it later. If you wish for a more detailed explanation you can click on the documentation URL which will redirect you to the next section of this page.
Finally, if you wish to remove the webhook you have to click on the red Remove button.
A textbox then appears explaining that you need to revoke the webhook in the app's configuration page. This is an essential step to remove the webhook. If this step is not done then you'll receive an error message restating that you must.
Go to the Integrations page of your Jscrambler application and create a new Slack integration.
Specify the following fields:
Note: if you'd like to send "Protection Failure" and "Real-time Notification" messages go to separate Slack channels and create two Slack webhooks and two Slack Integration drivers (one for each type of message, with a different webhook URL).
Finally, click on "Create".
Jscrambler will now send notifications to your chosen Slack workspace.
What happens if I already have a webhook setup for a channel and I add another one to the same channel?
The first webhook is replaced by the second one in the App Home, which only accepts one webhook per channel, but the webhook still exists (you can see it on the configurations page of the app). We recommend you to revoke the older webhook on app configuration page (we only want one webhook per channel).
If I set up a Slack Integration with the "Emit on Protection Failed" option on and the "Emit on Real-time Notification" option off, can I alter this Slack Driver's configurations afterwards?
Absolutely! You will be able to edit your Slack Driver's options as you so choose. You will also be able to update your webhookURL, which is recommended whenever the current webhook of a channel is updated, the current webhook being the one that appears in the App Home.
What happens when on the app's configuration page I revoke a webhook from a channel with multiple webhooks attributed to it?
If the revoked webhook is the most recent one, the webhook showing on App Home should stop working (because it is always the latest). However, having multiple webhooks for the same channel is a scenario that should be avoided.
What happens when I test the current webhook of a channel with multiple webhooks attributed to it?
Only the current webhook is tested (the latest created), the older webhooks should be removed to avoid confusion.
If I use a webhook that was replaced by a newer one in a channel, will it still work?
Yes, the previous webhook still works, and will only stop working when revoked. Still, when this happens, it's advised to update the Driver's webhookURL to the newer one and revoke the older webhooks in the app's configuration page, to keep it short and straightforward.
If I want to remove the current webhook of a channel that has multiple webhooks in the configuration page, how do I know which one to revoke?
What you should do in this situation is, before removing the current webhook from the App Home, revoke all the webhooks associated with the channel. You will be able to remove it from the App Home by just revoking the last one on app's configuration page, however this is not recommended, you should only keep one webhook active per channel in the configuration page.
Can I send notifications for the same channel on multiple Jscrambler apps (using multiple Slack Drivers)?
Yes, they just need to share the same webhook.
I didn't save the webhook URL, can I see it again? No, you'll need to remove it and create another one.