Connectors
Slack
Enabling Agentforce agents to interact with Slack for messaging, channel management, and app interactions.
The Slack Connector for ACP empowers Agentforce agents to communicate and collaborate via Slack. Agents can send messages, manage channels, retrieve conversation histories, and interact with Slack applications, bridging AI capabilities with your team’s primary communication hub.
Purpose and Capabilities
This Connector provides tools to interact with Slack’s API, covering common communication and collaboration tasks:
Tool Name | Description | Example Inputs |
---|---|---|
slack_send_message_to_channel | Sends a message to a specified Slack channel. | channel_id or channel_name , message_text , blocks_json (optional) |
slack_send_message_to_user | Sends a direct message to a specified Slack user. | user_id or user_email , message_text , blocks_json (optional) |
slack_send_ephemeral_message | Sends an ephemeral message visible only to a specific user in a channel. | channel_id , user_id , message_text , blocks_json (optional) |
slack_update_message | Updates an existing message in a channel or DM. | channel_id , timestamp_id (ts) , new_message_text or new_blocks_json |
slack_delete_message | Deletes a message from a channel or DM. | channel_id , timestamp_id (ts) |
slack_get_channel_history | Retrieves message history from a specific channel. | channel_id , limit (optional) , latest_ts (optional) , oldest_ts (optional) |
slack_get_user_info | Retrieves profile information for a Slack user. | user_id or user_email |
slack_list_channels | Lists public channels in the workspace. | exclude_archived (optional) , limit (optional) , cursor (for pagination) |
slack_create_channel | Creates a new public or private Slack channel. | channel_name , is_private (boolean, default: false) , user_ids_to_invite (optional) |
slack_archive_channel | Archives a Slack channel. | channel_id |
slack_invite_users_to_channel | Invites one or more users to a channel. | channel_id , user_ids_list |
slack_remove_user_from_channel | Removes a user from a channel. | channel_id , user_id |
slack_upload_file | Uploads a file to a channel, DM, or user. | channel_ids_list or user_ids_list , file_content_base64 or file_url , file_name , initial_comment (optional) |
slack_call_dialog_open | (Legacy) Opens a dialog for a user (requires interaction trigger). | trigger_id , dialog_json |
slack_call_views_open | Opens a modal view for a user (requires interaction trigger). | trigger_id , view_payload_json |
slack_call_views_update | Updates an existing modal view for a user. | view_id or external_id , view_payload_json |
Prerequisites
- Slack Workspace: An active Slack workspace where the integration will be used.
- Slack App:
- A Slack App must be created within your Slack workspace (via
api.slack.com/apps
). - The app needs to be configured with the necessary Bot Token Scopes (permissions) to perform the actions required by the tools (e.g.,
chat:write
,channels:read
,users:read
,files:write
,channels:manage
). - The Bot User OAuth Token (starts with
xoxb-
) from the installed app is required for authentication.
- A Slack App must be created within your Slack workspace (via
- App Installation: The Slack App must be installed into the workspace.
- Understanding of Slack Concepts: Familiarity with Slack terms like Channels, Users, Messages, Timestamps (ts), Blocks (for rich messages), Modals (Views), Ephemeral Messages, Bot Users, and Scopes.
Setup Instructions
- Create and Configure Slack App:
- Go to
https://api.slack.com/apps
and click “Create New App”. Choose “From scratch”. - Name your app (e.g., “ACP Connector”) and select your development Slack workspace.
- Navigate to Features > OAuth & Permissions.
- Scroll down to Scopes > Bot Token Scopes. Add necessary scopes. Common ones include:
channels:history
(to read channel messages)channels:join
(for bot to join channels)channels:manage
(to create/archive channels)channels:read
(to list channels, get channel info)chat:write
(to send messages)chat:write.public
(to send messages to channels bot is not in, requires user consent flow usually)files:read
(to access files)files:write
(to upload files)groups:history
(for private channel history)groups:read
(for private channel info)groups:write
(to manage private channels)im:history
(for DM history)im:read
(for DM info)im:write
(to send DMs)mpim:history
(for group DM history)mpim:read
(for group DM info)mpim:write
(to send group DMs)users:read
(to get user info)users:read.email
(to look up users by email)
- Navigate to Settings > Install App. Click “Install to Workspace” and authorize the app.
- Once installed, copy the Bot User OAuth Token (it will start with
xoxb-
). Store this securely.
- Go to
- Configure ACP Connector:
- The ACP administrator will configure the Slack Connector settings within ACP.
- This primarily involves securely storing the Bot User OAuth Token obtained in the previous step.
- Verify Connection:
- Use a simple tool like
slack_send_message_to_channel
to send a test message to a non-critical channel orslack_get_user_info
for your own Slack user ID to verify the token and basic API access.
- Use a simple tool like
Common Use Cases
- Automated Notifications: Agent sends notifications to relevant Slack channels based on events in other systems (e.g., new high-priority ticket, successful deployment).
- Daily Summaries/Reports: Agent posts daily sales figures, project updates, or system health reports to designated channels.
- Interactive Workflows: Agent uses Slack modals to collect information from users or guide them through a process.
- Incident Management: Agent creates a dedicated channel for a new incident, invites relevant team members, and posts updates.
- Content Sharing: Agent shares files or links to relevant Slack channels or users.
- User Support: Agent answers simple queries or directs users to resources by posting in support channels.
Troubleshooting Tips
- Authentication Errors (
invalid_auth
,not_authed
):- Verify the Bot User OAuth Token is correct and has not been revoked.
- Ensure the token starts with
xoxb-
.
- Permission Denied (
missing_scope
,restricted_action
):- The Slack App (Bot User) lacks the necessary OAuth scope for the attempted action. Review and add the required scopes in the Slack App configuration and reinstall the app.
- The bot might not be a member of the channel it’s trying to interact with (e.g., reading history or sending a message to a private channel it hasn’t been invited to).
- Channel Not Found (
channel_not_found
):- Double-check the channel ID or name. Channel names should be used without the
#
prefix for some API calls if using name instead of ID. - Ensure the bot user has visibility to the channel (e.g., it’s a public channel, or the bot is a member of the private channel).
- Double-check the channel ID or name. Channel names should be used without the
- User Not Found (
user_not_found
):- Verify the user ID or email address.
- Message Too Long (
message_too_long
):- Slack messages have character limits. Break up long messages or use attachments/files.
- Rate Limits (
ratelimited
):- Slack imposes rate limits on API calls. Implement retry logic with exponential backoff if you anticipate high volumes of requests. Refer to Slack’s API documentation for specific tier limits.
- Invalid Blocks/Payload (
invalid_blocks
,invalid_payload
):- If using Block Kit for messages or views, ensure the JSON payload is correctly formatted according to Slack’s specifications. Use the Block Kit Builder tool for testing.
This connector turns Slack into an interactive surface for your Agentforce agents, streamlining communication and workflows.