LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • BDK Book Library
  • AWS S3
    • Copy Item To a Folder
    • Create Folder In Another Folder
    • Delete Item
    • Download a File
    • Get Folder At a Path
    • Get Root folder From a Bucket
    • Get Buckets From S3
    • Get a Folder's Items
    • Move Item To a Folder
    • Rename Item
    • Upload File To a Folder
  • HTTP
    • DELETE Request
    • GET Request
    • HEAD Request
    • PATCH Request
    • POST Request
    • PUT Request
  • Microsoft Excel
    • Clear the Worksheet Range
    • Create a Table on a Worksheet Range
    • Create a Worksheet Range in a Sheet
    • Delete a Column from the Table
    • Delete a Row from the Table
    • Get the Cell's Color
    • Get the Cell's Formula
    • Get the Cell's Value
    • Get the Column's Cells from the Table
    • Get the Column Count in a Table
    • Get the Column Count in a Worksheet Range
    • Get the File's Sheets
    • Get the Following Row Range In a Worksheet Range
    • Get the Row's Cells from the Table
    • Get the Row's Cells From the Worksheet Range
    • Get the Row Count in a Table
    • Get the Row Count in a Worksheet Range
    • Get the Sheet's Tables
    • Get the Sheet's Used Range
    • Get the Worksheet Range's Rows
    • Get the Worksheet Range from the Table
    • Insert a New Column in the Table
    • Insert a New Row in the Table
    • Read the Content from a Table
    • Read the Content from a Worksheet Range
    • Retrieve the Columns from the Table
    • Retrieve the Rows from the Table
    • Retrieve the Worksheet Range from a Table
    • Set the Cell's Content to a Value
    • Set the Cell's Formula to a Formula Value
    • Write the Content in a Table
    • Write the Content in a Worksheet Range
  • Microsoft Outlook
    • Delete Emails
    • Download an Attachment
    • Forward an Email
    • Get a User's Events
    • Get an Email's Attachments
    • Get Event's Attachments
    • Get Email Folders for a User
    • Get Email Folders
    • Get Events in Calendar
    • Get Events
    • Get Outlook Emails
    • Mark Emails
    • Move Outlook Emails
    • Reply to an Email
    • Send an Email
  • Microsoft SharePoint
    • Add a Column to a SharePoint List
    • Add an Item to a SharePoint List
    • Copy an Item to a Folder
    • Create a Folder in a Document Library
    • Create a Folder in Another Folder
    • Create a List in a SharePoint Site
    • Delete a Column from a List
    • Delete a List in SharePoint
    • Delete an Item from a List
    • Delete an Item from a Document Library
    • Download a File
    • Edit an Item
    • Get a Folder
    • Get a Folder's Items
    • Get a Root Folder from a Document Library
    • Get a SharePoint List as a Table
    • Get Items from a Document Library
    • Get Items from a SharePoint List
    • Get Document Libraries
    • Get Sites from SharePoint
    • Move an Item to a Folder
    • Rename a Column in a List
    • Rename a SharePoint List
    • Rename a SharePoint Item
    • Retrieve Column Definitions from a SharePoint List
    • Retrieve Lists within a SharePoint Site
    • Upload a File to a SharePoint Document Library
  • OpenWeather
    • Get the Current Temperature
  • Slack
    • Read Messages
    • Retrieve a Channel
    • Retrieve a User
    • Send a Message
  • ServiceNow
    • Create Record
    • Delete Records
    • Retrieve Records
    • Update Record
  • Truckmate
    • Create An Order in Truckmate
    • Update An Order in Truckmate
  • Twilio
    • To Read Some SMS Messages
    • To Send an SMS Message
Powered by GitBook
On this page
  • Overview
  • Prerequisites
  • Connectivity
  • Procedures
  • Automation Examples

Was this helpful?

Export as PDF

Slack

A BDK Book containing automation procedures for Slack.

Last updated 4 days ago

Was this helpful?

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:

  1. Create a Slack App: If you haven't already, you'll need to create a Slack App in your workspace.

    • Go to the and click "Create New App."

    • Choose to build it "From scratch" or use a manifest.

  2. 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

  3. Install to Workspace: Install (or reinstall if you changed scopes) your app to your development workspace. This will generate the Bot User OAuth Token.

  4. 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.

Procedures

The following procedures are available in the Slack BDK Book:

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

For more detailed steps on app creation and token generation, refer to the official .

: Reads messages from either a slack user or channel.

: Fetches information about a Slack channel.

: Fetches information about a specific user in Slack.

: Sends a message to a channel or user in Slack.

Slack API documentation on authentication
Read Messages
Retrieve a Channel
Retrieve a User
Send a Message
Slack API site

Before using the Book’s procedures in an automation, you must learn the Book by adding it to your agent. Follow the steps below to get started.

  1. In the left navigation bar, click on Books.

  2. Click on + New Book.

  3. Search for the Book's name. Click on the version tagged with bdk.

Note: If the Book requires connectivity, you will be prompted to provide configuration details.

  1. Click Add to finish adding your Book.

After learning a Book, publish your agent and create a new Playground. Previously created Playgrounds will not be able to recognize the new Book.