1Go to https://api.slack.com/apps and log in to your account.
2Click Create New App > From scratch.
3Enter the app name and select your workspace, and then click Create App as shown in the following image:
Enable the events API
1From the navigation bar, go to Event Subscriptions.
2Turn on the toggle switch to enable events.
3In the Request URL field, enter the service URL that you get after publishing the process.
Slack sends a challenge request to verify the URL as shown in the following image:
Subscribe to the event
1In the Subscribe to bot events section, click Add Bot User Event and add one of the following events as required:
- message.channels - to receive messages from public channels.
- message.groups - for private channels.
The event allows your app to receive messages from channels it belongs to as shown in the following image:
Set the required OAuth scopes
1Go to OAuth & Permissions.
2In the Bot Token Scopes section, click Add an OAuth Scope and add one of the following OAuth scopes:
- channels:history — to read public channel messages.
- groups:history — to read messages from private channels, if needed.
- chat:write — if your bot needs to send messages.
3In the Redirect URLs section, click Add New Redirect URL and add the redirect URLs in <Cloud Application Integration POD URL>/oauthcallback format and save the URLs. For example, https://na1.dm-us.informaticacloud.com/oauthcallback as shown in the following image: