Tools
Slack
Prerequisites
The following example requires the slack-sdk
library.
Get a Slack token from here.
Example
The following agent will use Slack to send a message to a channel, list all channels, and get the message history of a specific channel.
cookbook/tools/slack_tools.py
Toolkit Params
Parameter | Type | Default | Description |
---|---|---|---|
token | str | - | Slack API token for authentication |
send_message | bool | True | Enables the functionality to send messages to Slack channels |
list_channels | bool | True | Enables the functionality to list available Slack channels |
get_channel_history | bool | True | Enables the functionality to retrieve message history from channels |
Toolkit Functions
Function | Description |
---|---|
send_message | Sends a message to a specified Slack channel |
list_channels | Lists all available channels in the Slack workspace |
get_channel_history | Retrieves message history from a specified channel |
Information
- View on Github