Slack

Description: Enable agents to interact with Slack

Author: Arcade

Code: GitHub

Auth: User authorization

PyPI VersionLicensePython VersionsWheel StatusDownloads

The Slack toolkit provides a comprehensive set of tools for interacting with the Slack platform, enabling users and AI applications to efficiently manage conversations and user information. With this toolkit, you can:

  • Retrieve detailed information about users, including their IDs, usernames, and emails.
  • List all users in your Slack team and get users in specific conversations.
  • Send messages to channels, direct messages, or multi-person conversations.
  • Access messages and metadata from various conversations, including channels and direct messages.
  • Manage and list conversations, including public and private channels.

This toolkit streamlines communication and enhances collaboration within Slack.

Available Tools

Tool NameDescription
Slack.GetUsersInfoGet the information of one or more users in Slack by ID, username, and/or email.
Slack.ListUsersList all users in the authenticated user's Slack team.
Slack.SendMessageSend a message to a Channel, Direct Message (IM/DM), or Multi-Person (MPIM) conversation
Slack.GetUsersInConversationGet the users in a Slack conversation (Channel, DM/IM, or MPIM) by its ID or by channel name.
Slack.GetMessagesGet messages in a Slack Channel, DM (direct message) or MPIM (multi-person) conversation.
Slack.GetConversationMetadataGet metadata of a Channel, a Direct Message (IM / DM) or a Multi-Person (MPIM) conversation.
Slack.ListConversationsList metadata for Slack conversations (channels, DMs, MPIMs) the user is a member of.
Slack.GetUserInfoByIdGet the information of a user in Slack.
Slack.SendDmToUserSend a direct message to a user in Slack.
Slack.SendMessageToChannelSend a message to a channel in Slack.
Slack.GetMembersInConversationByIdGet the members of a conversation in Slack by the conversation's ID.
Slack.GetMembersInChannelByNameGet the members of a conversation in Slack by the conversation's name.
Slack.GetMessagesInChannelByNameGet the messages in a channel by the channel's name.
Slack.GetMessagesInConversationByIdGet the messages in a conversation by the conversation's ID.
Slack.GetMessagesInDirectMessageConversationByUsernameGet the messages in a direct conversation by the user's name.
Slack.GetMessagesInMultiPersonDmConversationByUsernamesGet the messages in a multi-person direct message conversation by the usernames.
Slack.ListConversationsMetadataList Slack conversations (channels, DMs, MPIMs) the user is a member of.
Slack.ListPublicChannelsMetadataList metadata for public channels in Slack that the user is a member of.
Slack.ListPrivateChannelsMetadataList metadata for private channels in Slack that the user is a member of.
Slack.ListGroupDirectMessageConversationsMetadataList metadata for group direct message conversations that the user is a member of.
Slack.ListDirectMessageConversationsMetadataList metadata for direct message conversations in Slack that the user is a member of.
Slack.GetConversationMetadataByIdGet the metadata of a conversation in Slack searching by its ID.
Slack.GetChannelMetadataByNameGet the metadata of a channel in Slack searching by its name.
Slack.GetDirectMessageConversationMetadataByUsernameGet the metadata of a direct message conversation in Slack by the username.
Slack.GetMultiPersonDmConversationMetadataByUsernamesGet the metadata of a multi-person direct message conversation in Slack by the usernames.

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.

Slack.GetUsersInfo


Get the information of one or more users in Slack by ID, username, and/or email.

Parameters

  • user_ids (array[string], optional) The IDs of the users to get
  • usernames (array[string], optional) The usernames of the users to get. Prefer retrieving by user_ids and/or emails, when available, since the performance is better.
  • emails (array[string], optional) The emails of the users to get

Slack.ListUsers


List all users in the authenticated user’s Slack team.

Parameters

  • exclude_bots (boolean, optional) Whether to exclude bots from the results. Defaults to True.
  • limit (integer, optional) The maximum number of users to return. Defaults to 200. Maximum is 500.
  • next_cursor (string, optional) The next cursor token to use for pagination.

Slack.SendMessage


Send a message to a Channel, Direct Message (IM/DM), or Multi-Person (MPIM) conversation.

Provide exactly one of:

  • channel_name; or
  • conversation_id; or
  • any combination of user_ids, usernames, and/or emails.

In case multiple user_ids, usernames, and/or emails are provided, the tool will open a multi-person conversation with the specified people and send the message to it.

To improve performance, prefer providing a conversation_id over a channel_name, when available. When referencing users, prefer providing user_ids and/or emails, when possible.

Parameters

  • message (string, required) The content of the message to send.
  • channel_name (string, optional) The channel name to send the message to. Prefer providing a conversation_id, when available, since the performance is better.
  • conversation_id (string, optional) The conversation ID to send the message to.
  • user_ids (array[string], optional) The Slack user IDs of the people to message.
  • emails (array[string], optional) The emails of the people to message.
  • usernames (array[string], optional) The Slack usernames of the people to message. Prefer providing user_ids and/or emails, when available, since the performance is better.

Slack.GetUsersInConversation


Get the users in a Slack conversation (Channel, DM/IM, or MPIM) by its ID or by channel name.

Provide exactly one of conversation_id or channel_name. Prefer providing a conversation_id, when available, since the performance is better.

Parameters

  • conversation_id (string, optional) The ID of the conversation to get users in.
  • channel_name (string, optional) The name of the channel to get users in. Prefer providing a conversation_id, when available, since the performance is better.
  • limit (integer, optional) The maximum number of users to return. Defaults to 200. Maximum is 500.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.GetMessages


Get messages in a Slack Channel, DM (direct message) or MPIM (multi-person) conversation.

Provide exactly one of:

  • conversation_id; or
  • channel_name; or
  • any combination of user_ids, usernames, and/or emails.

To improve performance, prefer providing a conversation_id over a channel_name, when available. When referencing users, prefer providing user_ids and/or emails, when possible.

Parameters

  • conversation_id (string, optional) The ID of the conversation to get messages from. Provide exactly one of conversation_id OR any combination of user_ids, usernames, and/or emails.
  • channel_name (string, optional) The name of the channel to get messages from. Prefer providing a conversation_id, when available, since the performance is better.
  • user_ids (array[string], optional) The IDs of the users in the conversation to get messages from.
  • usernames (array[string], optional) The usernames of the users in the conversation to get messages from. Prefer providinguser_ids and/or emails, when available, since the performance is better.
  • emails (array[string], optional) The emails of the users in the conversation to get messages from.
  • 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 object 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 object in the format ‘YYYY-MM-DD HH:MM:SS’
  • limit (integer, optional) The maximum number of messages to return. Defaults to 20. Maximum is 100.
  • next_cursor (string, optional) The cursor to use for pagination.

Notes about the date/time filtering parameters:

To filter messages by an absolute datetime, use ‘oldest_datetime’ and/or ‘latest_datetime’. If only ‘oldest_datetime’ is provided, it will return messages from the oldest_datetime to the current time. If only ‘latest_datetime’ is provided, it will return messages since the beginning of the conversation to the latest_datetime.

To filter messages by a relative datetime (e.g. 3 days ago, 1 hour ago, etc.), use ‘oldest_relative’ and/or ‘latest_relative’. If only ‘oldest_relative’ is provided, it will return messages from the oldest_relative to the current time. If only ‘latest_relative’ is provided, it will return messages from the current time to the latest_relative.

Do not provide both ‘oldest_datetime’ and ‘oldest_relative’ or both ‘latest_datetime’ and ‘latest_relative’.

Leave all arguments with the default None to get messages without date/time filtering

Slack.GetConversationMetadata


Get metadata of a Channel, a Direct Message (IM / DM) or a Multi-Person (MPIM) conversation.

Provide exactly one of:

  • conversation_id; or
  • channel_name; or
  • any combination of user_ids, usernames, and/or emails.

To improve performance, prefer providing a conversation_id over a channel_name, when available. When referencing users, prefer providing user_ids and/or emails, when possible.

Parameters

  • conversation_id (string, optional) The ID of the conversation to get metadata for
  • channel_name (string, optional) The name of the channel to get metadata for. Prefer providing a conversation_id, when available, since the performance is better.
  • usernames (array[string], optional) The usernames of the users to get the conversation metadata. Prefer providing user_ids and/or emails, when available, since the performance is better.
  • emails (array[string], optional) The emails of the users to get the conversation metadata.
  • user_ids (array[string], optional) The IDs of the users to get the conversation metadata.

Slack.ListConversations


List metadata for Slack conversations (channels, DMs, MPIMs) the user is a member of.

Parameters

  • conversation_types (Enum ConversationType, optional) Optionally filter by the type(s) of conversations. Defaults to None (all types).
  • limit (integer, optional) The maximum number of conversations to list. Defaults to 200. Maximum is 500.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.GetUserInfoById

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetUsersInfo instead.


Get the information of a user in Slack.

Parameters

  • user_id (string, required) The ID of the user to get

Slack.SendDmToUser

This tool is marked for deprecation and will be removed in a future release. Please use Slack.SendMessage instead.


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

Slack.SendMessageToChannel

This tool is marked for deprecation and will be removed in a future release. Please use Slack.SendMessage instead.


Send a message to a channel in Slack.

Parameters

  • channel_name (string, required) The Slack channel name where you want to send the message.
  • message (string, required) The message you want to send

Slack.GetMembersInConversationById

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetUsersInConversation instead.


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 (integer, optional) The maximum number of members to return.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.GetMembersInChannelByName

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetUsersInConversation instead.


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

Parameters

  • channel_name (string, required) The name of the channel to get members for
  • limit (integer, optional) The maximum number of members to return.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.GetMessagesInChannelByName

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetMessages instead.


Get the messages in a channel by the channel’s name.

Parameters

  • channel_name (string, required) The name of the channel
  • 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 object 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 object in the format ‘YYYY-MM-DD HH:MM:SS’
  • limit (integer, optional) The maximum number of messages to return.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.GetMessagesInConversationById

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetMessages instead.


Get the messages in a conversation by the conversation’s ID.

Parameters

  • conversation_id (string, required) The ID of the conversation to get history 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 object 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 object in the format ‘YYYY-MM-DD HH:MM:SS’
  • limit (integer, optional) The maximum number of messages to return.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.GetMessagesInDirectMessageConversationByUsername

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetMessages instead.


Get the messages in a direct conversation by the user’s name.

Parameters

  • username (string, required) The username of the user to get messages from
  • 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 object 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 object in the format ‘YYYY-MM-DD HH:MM:SS’
  • limit (integer, optional) The maximum number of messages to return.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.GetMessagesInMultiPersonDmConversationByUsernames

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetMessages instead.


Get the messages in a multi-person direct message conversation by the usernames.

Parameters

  • usernames (array[string], required) The usernames of the users to get messages from
  • 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 object 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 object in the format ‘YYYY-MM-DD HH:MM:SS’
  • limit (integer, optional) The maximum number of messages to return.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.ListConversationsMetadata

This tool is marked for deprecation and will be removed in a future release. Please use Slack.ListConversations instead.


List Slack conversations (channels, DMs, MPIMs) the user is a member of.

Parameters

  • conversation_types (Enum ConversationType, optional) Optionally filter by the type(s) of conversations. Defaults to None (all types).
  • limit (integer, optional) The maximum number of conversations to list.
  • next_cursor (string, optional) The cursor to use for pagination.

Slack.ListPublicChannelsMetadata

This tool is marked for deprecation and will be removed in a future release. Please use Slack.ListConversations instead.


List metadata for public channels in Slack that the user is a member of.

Parameters

  • limit (integer, optional) The maximum number of channels to list.

Slack.ListPrivateChannelsMetadata

This tool is marked for deprecation and will be removed in a future release. Please use Slack.ListConversations instead.


List metadata for private channels in Slack that the user is a member of.

Parameters

  • limit (integer, optional) The maximum number of channels to list.

Slack.ListGroupDirectMessageConversationsMetadata

This tool is marked for deprecation and will be removed in a future release. Please use Slack.ListConversations instead.


List metadata for group direct message conversations that the user is a member of.

Parameters

  • limit (integer, optional) The maximum number of conversations to list.

Slack.ListDirectMessageConversationsMetadata

This tool is marked for deprecation and will be removed in a future release. Please use Slack.ListConversations instead.


List metadata for direct message conversations in Slack that the user is a member of.

Parameters

  • limit (integer, optional) The maximum number of conversations to list.

Slack.GetConversationMetadataById

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetConversationMetadata instead.


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

Slack.GetChannelMetadataByName

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetConversationMetadata instead.


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.

Slack.GetDirectMessageConversationMetadataByUsername

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetConversationMetadata instead.


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

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.

Slack.GetMultiPersonDmConversationMetadataByUsernames

This tool is marked for deprecation and will be removed in a future release. Please use Slack.GetConversationMetadata instead.


Get the metadata of a multi-person direct message conversation in Slack by the usernames.

Parameters

  • usernames (array[string], required) The usernames of the users/people to get messages with
  • next_cursor (string, optional) The cursor to use for pagination, if continuing from a previous search.

Auth

The Arcade Slack toolkit uses the Slack auth provider to connect to users’ Slack accounts. Please refer to the Slack auth provider documentation to learn how to configure auth.