Create a bot in Slack
- UpdatedFeb 1, 2024
- 2 minutes to read
- Washington DC
- Virtual Agent
You must create a self-configured bot in the targeted workspace in Slack to be able to integrate with the Virtual Agent.
Before you begin
Role required: none
Note: Users must have permissions to create a bot in the targeted workspace.
Procedure
- Log in to Slack API.
- Navigate to Your Apps and click Create New App.
- Enter an App Name, select your Slack Workspace and click Create App.
-
Configure Interactive Components.
- Navigate to Interactivity > Shortcuts in the left menu and turn on Interactivity.
-
Update the Request URL.
If you are setting up your self-configured bot on an ServiceNow instance, then the request URL must be https://<instance-name>/api/now/v1/cs/adapter/slack/actions.
- Click Save.
-
Configure Event Subscriptions.
- Click Event Subscriptions in the left menu and turn on Enable Events.
-
Update the Request URL.
If you are setting up your self-configured bot on a ServiceNow instance, then the request URL must be https://<instance-name>.service-now.com/api/now/v1/cs/adapter/slack/events.
-
Wait for the Request URL to get verified.
-
Under Subscribe to bot events, click Add Bot User
Event and add
message.im
. - Click Save.
- Navigate to the Incoming Webhook tab and slide the Activate Incoming Webhooks toggle switch to enable it.
-
Configure OAuth & Permissions.
- Click OAuth & Permissions from the left menu and navigate to Scopes > Bot Scopes.
-
Select Add an OAuth Scope and add the following
scopes:
- chat:write
- files:read
- files:write
- im.history
- incoming-webhook
- team:read
- users:read
- users:read.email
-
Navigate to OAuth & Permissions, click Install to Workspace, and click Allow.