Slack
Description: Enable agents to interact with Slack by sending messages, retrieving user and conversation information.
Author: Arcade
Code: GitHub
Auth: User authorization via the Slack auth provider
The Arcade Slack toolkit provides a comprehensive set of tools for interacting with Slack. With these tools, you can build agents and AI applications that can:
- Send direct messages to users
- Send messages to channels
- Retrieve members of conversations
- Access conversation messages
- Manage conversation metadata
- Retrieve user information
Install
pip install arcade_slack
Available Tools
Tool Name | Description |
---|---|
SendDmToUser | Send a direct message to a user in Slack. |
SendMessageToChannel | Send a message to a channel in Slack. |
GetMembersInConversationById | Retrieve members of a conversation using its ID. |
GetMembersInConversationByName | Retrieve members of a conversation using its name. |
GetMessagesInConversationById | Fetch the messages in a conversation using its ID. |
GetMessagesInChannelByName | Fetch the messages in a channel using its name. |
GetConversationMetadataById | Retrieve metadata of a conversation using its ID. |
GetConversationMetadataByName | Retrieve metadata of a conversation using its name. |
ListConversationsMetadata | List metadata for Slack conversations. |
ListPublicChannelsMetadata | List metadata for public channels in Slack. |
ListPrivateChannelsMetadata | List metadata for private channels in Slack. |
ListGroupDirectMessageConversationsMetadata | List metadata for group direct message conversations in Slack. |
ListDirectMessageConversationsMetadata | List metadata for direct message conversations in Slack. |
GetUserInfoById | Retrieve information of a user by their ID. |
ListUsers | List all users in the authenticated Slack team. |
If you need to perform an action that’s not listed here, you can get in touch with us to request a new tool, or create your own tools with the Slack auth provider.
SendDmToUser
Send a direct message to a user in Slack.
Parameters
user_name
(string, required) The Slack username of the person you want to message. Slack usernames are ALWAYS lowercase.message
(string, required) The message you want to send.
SendMessageToChannel
Send a message to a channel in Slack.
Parameters
channel_name
(string, required) The Slack channel name where you want to send the message. Slack channel names are ALWAYS lowercase.message
(string, required) The message you want to send.
GetMembersInConversationById
Get the members of a conversation in Slack by the conversation’s ID.
Parameters
conversation_id
(string, required) The ID of the conversation to get members for.limit
(int, optional) The maximum number of members to return. Defaults to 200.next_cursor
(string, optional) The cursor to use for pagination.
GetMembersInConversationByName
Get the members of a conversation in Slack by the conversation’s name.
Parameters
conversation_name
(string, required) The name of the conversation to get members for.limit
(int, optional) The maximum number of members to return. Defaults to 200.next_cursor
(string, optional) The cursor to use for pagination.
GetMessagesInConversationById
Get the history of a conversation in Slack.
Parameters
conversation_id
(string, required) The ID of the conversation to get history for.oldest_relative
(string, optional) The oldest message to include, in ‘DD:HH:MM’ format.latest_relative
(string, optional) The latest message to include, in ‘DD:HH:MM’ format.oldest_datetime
(string, optional) The oldest message to include, in ‘YYYY-MM-DD HH:MM:SS’ format.latest_datetime
(string, optional) The latest message to include, in ‘YYYY-MM-DD HH:MM:SS’ format.limit
(int, optional) The maximum number of messages to return. Defaults to 200.next_cursor
(string, optional) The cursor to use for pagination, if continuing from a previous search.
GetMessagesInChannelByName
Get the messages in a channel in Slack.
Parameters
channel_name
(string, required) The name of the channel to get messages for.oldest_relative
(string, optional) The oldest message to include, in ‘DD:HH:MM’ format.latest_relative
(string, optional) The latest message to include, in ‘DD:HH:MM’ format.oldest_datetime
(string, optional) The oldest message to include, in ‘YYYY-MM-DD HH:MM:SS’ format.latest_datetime
(string, optional) The latest message to include, in ‘YYYY-MM-DD HH:MM:SS’ format.limit
(int, optional) The maximum number of messages to return. Defaults to 200.next_cursor
(string, optional) The cursor to use for pagination, if continuing from a previous search.
GetConversationMetadataById
Get the metadata of a conversation in Slack searching by its ID.
Parameters
conversation_id
(string, required) The ID of the conversation to get metadata for.
GetConversationMetadataByName
Get the metadata of a conversation in Slack searching by its name.
Parameters
conversation_name
(string, required) The name of the conversation to get metadata for.next_cursor
(string, optional) The cursor to use for pagination, if continuing from a previous search.
ListConversationsMetadata
List metadata for Slack conversations (channels and/or direct messages) that the user is a member of.
Parameters
conversation_types
(list of str, optional) The type(s) of conversations to list. Defaults to all types. Each must be one of: ‘public_channel’, ‘private_channel’, ‘multi_person_direct_message’, or ‘direct_message’.limit
(int, optional) The maximum number of conversations to list. Defaults to 200.next_cursor
(string, optional) The cursor to use for pagination.
ListPublicChannelsMetadata
List metadata for public channels in Slack that the user is a member of.
Parameters
limit
(int, optional) The maximum number of channels to list. Defaults to 200.
ListPrivateChannelsMetadata
List metadata for private channels in Slack that the user is a member of.
Parameters
limit
(int, optional) The maximum number of channels to list. Defaults to 200.
ListGroupDirectMessageConversationsMetadata
List metadata for group direct message conversations in Slack that the user is a member of.
Parameters
limit
(int, optional) The maximum number of conversations to list. Defaults to 200.
ListDirectMessageConversationsMetadata
List metadata for direct message conversations in Slack that the user is a member of.
Parameters
limit
(int, optional) The maximum number of channels to list. Defaults to 200.
GetUserInfoById
Get the information of a user in Slack.
Parameters
user_id
(string, required) The ID of the user to get.
ListUsers
List all users in the authenticated user’s Slack team.
Parameters
exclude_bots
(bool, optional) Whether to exclude bots from the results. Defaults toTrue
.limit
(int, optional) The maximum number of users to return. Defaults to 200.next_cursor
(string, optional) The cursor to use for pagination.
Auth
The Arcade Slack toolkit uses the Slack auth provider to connect to users’ Slack accounts.
With the hosted Arcade Engine, there’s nothing to configure. Your users will see Arcade (demo)
as the name of the application that’s requesting permission.
The hosted Arcade Engine is intended for demo and testing purposes only, not for production use. To use Arcade and Slack in production, you must use a self-hosted instance of the Arcade Engine.
With a self-hosted installation of Arcade, you need to configure the Slack auth provider with your own Slack app credentials.