Integration-slack

Simply receive Slack webhooks by creating a Slack app

You need to create a Slack app and then connect it to your workspace to get slack webhooks. You do not need to have a paid workspace for this.

1. Create Slack App

First you have to create a Slack app and then enter your CustomJS Function URL under "Request URL" under "Event Subscriptions"

To do this, your function must contain at least this code so that Slack can test it.

return input.challenge;

Slack App
Slack App


2. Define Scopes

Depending on whether you want to interact on behalf of the user with whom you connect the app to your workspace or whether the app acts as a bot itself, you have to set scopes.

Slack App
Slack App

3. Copy Token

Now you can copy the token and insert it as a variable in the code stored within CustomJS. You then act either as an app bot or as the user with whom you installed your app.

Slack App
Slack App

Slack Bot Example

Learn how to send a welcome message to every new Slack user:
CustomJS Slack Bot Example