Slack
A BDK Book containing automation procedures for Slack.
Overview
The Slack BDK Book provides a set of automation procedures designed to interact with the Slack messaging platform. Adding this Book to a Kognitos agent enables it to perform operations such as reading messages, sending messages, and retrieving information about specific channels and users.
Prerequisites
Learning the Slack Book (BDK)
Connectivity
Connecting to the Slack Book requires an OAuth Token that your application will use to make API calls and receive events.
Obtaining Your OAuth Token
The primary token you'll need is a Bot User OAuth Token. To obtain one:
Create a Slack App: If you haven't already, you'll need to create a Slack App in your workspace.
Go to the Slack API site and click "Create New App."
Choose to build it "From scratch" or use a manifest.
Add Scopes: Navigate to "OAuth & Permissions" in your app's settings. Under "Bot Token Scopes", add the following permissions (scopes) for this Book:
channels:history
channels:join
channels:read
chat:write
chat:write.public
conversations.connect:read
conversations.connect:write
files:write
groups:read
groups:write
im:history
im:read
im:write
im:write.topic
mpim:history
mpim:read
mpim:write
mpim:write.topic
users.profile:read
users:read
users:read.email
users:write
Install to Workspace: Install (or reinstall if you changed scopes) your app to your development workspace. This will generate the Bot User OAuth Token.
Copy Your Token: Once installed, you'll find the
xoxb-
token on the "OAuth & Permissions" page. Copy this token and add it to Kognitos when learning the Book.
For more detailed steps on app creation and token generation, refer to the official Slack API documentation on authentication.
Procedures
The following procedures are available in the Slack BDK Book:
Read Messages: Reads messages from either a slack user or channel.
Retrieve a Channel: Fetches information about a Slack channel.
Retrieve a User: Fetches information about a specific user in Slack.
Send a Message: Sends a message to a channel or user in Slack.
Automation Examples
retrieve a channel from slack with
the channel name is "general"
the message is "Hello, this is my first slack message!"
send the message to the channel
read the channel's messages
Last updated
Was this helpful?