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

PyPI VersionLicensePython VersionsWheel StatusDownloads

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
  • List users
  • List conversations
  • Retrieve messages in a channel, direct or multi-person conversation
  • Retrieve conversation metadata

Install

pip install arcade_slack

pip installing the toolkit is only needed if you are self-hosting Arcade. You do not need to install the toolkit if you’re using Arcade Cloud.

Available Tools

These tools are currently available in the Arcade Slack toolkit.

Tool NameDescription
SendDmToUserSend a direct message to a user in Slack.
SendMessageToChannelSend a message to a channel in Slack.
GetMembersInConversationByIdRetrieve members of a conversation using its ID.
GetMembersInChannelByNameRetrieve members of a channel using its name.
GetMessagesInConversationByIdFetch the messages in a conversation using its ID.
GetMessagesInChannelByNameFetch the messages in a channel using its name.
GetMessagesInDirectMessageConversationByUsernameFetch the messages in a direct message conversation using the username of the other participant.
GetMessagesInMultiPersonDmConversationByUsernameFetch the messages in a multi-person direct message conversation using the usernames of the other participants.
GetConversationMetadataByIdRetrieve metadata of a conversation using its ID.
GetChannelMetadataByNameRetrieve metadata of a channel using its name.
GetDirectMessageConversationMetadataByUsernameRetrieve metadata of a direct message conversation using the username of the other participant.
GetMultiPersonDmConversationMetadataByUsernameRetrieve metadata of a multi-person direct message conversation using the usernames of the other participants.
ListConversationsMetadataList metadata for Slack conversations.
ListPublicChannelsMetadataList metadata for public channels in Slack.
ListPrivateChannelsMetadataList metadata for private channels in Slack.
ListGroupDirectMessageConversationsMetadataList metadata for group direct message conversations in Slack.
ListDirectMessageConversationsMetadataList metadata for direct message conversations in Slack.
GetUserInfoByIdRetrieve information of a user by their ID.
ListUsersList 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.

GetMembersInChannelByName


Get the members of a channel in Slack by the channel’s name.

Parameters

  • channel_name (string, required) The name of the channel 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 the results, specified as a time offset from the current time in the format ‘DD:HH:MM’.
  • latest_relative (string, optional) The latest message to include in the results, specified as a time offset from the current time in the format ‘DD:HH:MM’.
  • oldest_datetime (string, optional) The oldest message to include in the results, specified as a datetime string in the format ‘YYYY-MM-DD HH:MM:SS’.
  • latest_datetime (string, optional) The latest message to include in the results, specified as a datetime string in the format ‘YYYY-MM-DD HH:MM:SS’.
  • limit (int, optional) The maximum number of messages to return. Defaults to 200.
  • next_cursor (string, optional) The cursor to use for pagination.

GetMessagesInDirectMessageConversationByUsername


Get the messages in a Direct Message conversation with another user in Slack.

Parameters

  • username (string, required) The username of the user to get messages with.
  • oldest_relative (string, optional) The oldest message to include in the results, specified as a time offset from the current time in the format ‘DD:HH:MM’.
  • latest_relative (string, optional) The latest message to include in the results, specified as a time offset from the current time in the format ‘DD:HH:MM’.
  • oldest_datetime (string, optional) The oldest message to include in the results, specified as a datetime string in the format ‘YYYY-MM-DD HH:MM:SS’.
  • latest_datetime (string, optional) The latest message to include in the results, specified as a datetime string in the format ‘YYYY-MM-DD HH:MM:SS’.
  • limit (int, optional) The maximum number of messages to return. Defaults to 200.
  • next_cursor (string, optional) The cursor to use for pagination.

GetMessagesInMultiPersonDmConversationByUsername


Get the messages in a multi-person direct message conversation in Slack by the usernames of the participants (other than the currently authenticated user).

Parameters

  • usernames (list of strings, required) The usernames of the users to get messages with.
  • oldest_relative (string, optional) The oldest message to include in the results, specified as a time offset from the current time in the format ‘DD:HH:MM’.
  • latest_relative (string, optional) The latest message to include in the results, specified as a time offset from the current time in the format ‘DD:HH:MM’.
  • oldest_datetime (string, optional) The oldest message to include in the results, specified as a datetime string in the format ‘YYYY-MM-DD HH:MM:SS’.
  • latest_datetime (string, optional) The latest message to include in the results, specified as a datetime string in the format ‘YYYY-MM-DD HH:MM:SS’.
  • limit (int, optional) The maximum number of messages to return. Defaults to 200.
  • next_cursor (string, optional) The cursor to use for pagination.

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.

GetChannelMetadataByName


Get the metadata of a channel in Slack searching by its name.

Parameters

  • channel_name (string, required) The name of the channel to get metadata for.
  • next_cursor (string, optional) The cursor to use for pagination, if continuing from a previous search.

GetDirectMessageConversationMetadataByUsername


Get the metadata of a direct message conversation in Slack searching by the username of the other participant.

Parameters

  • username (string, required) The username of the user/person to get messages with.
  • next_cursor (string, optional) The cursor to use for pagination, if continuing from a previous search.

GetMultiPersonDmConversationMetadataByUsername


Get the metadata of a multi-person direct message conversation in Slack searching by the usernames of the participants (other than the currently authenticated user).

Parameters

  • usernames (list of strings, required) The usernames of the users to get messages with.
  • 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 to True.
  • 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 as the name of the application that’s requesting permission.

With a self-hosted installation of Arcade, you need to configure the Slack auth provider with your own Slack app credentials.