slack-automation
Original:🇺🇸 English
Not Translated
Automate Slack messaging, channel management, search, reactions, and threads via Rube MCP (Composio). Send messages, search conversations, manage channels/users, and react to messages programmatically.
2installs
Added on
NPX Install
npx skill4agent add aaaaqwq/claude-code-skills slack-automationSKILL.md Content
Slack Automation via Rube MCP
Automate Slack workspace operations including messaging, search, channel management, and reaction workflows through Composio's Slack toolkit.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Slack connection via with toolkit
RUBE_MANAGE_CONNECTIONSslack - Always call first to get current tool schemas
RUBE_SEARCH_TOOLS
Setup
Get Rube MCP: Add as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
https://rube.app/mcp- Verify Rube MCP is available by confirming responds
RUBE_SEARCH_TOOLS - Call with toolkit
RUBE_MANAGE_CONNECTIONSslack - If connection is not ACTIVE, follow the returned auth link to complete Slack OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Send Messages to Channels
When to use: User wants to post a message to a Slack channel or DM
Tool sequence:
- - Resolve channel name to channel ID [Prerequisite]
SLACK_FIND_CHANNELS - - Fallback if FIND_CHANNELS returns empty/ambiguous results [Fallback]
SLACK_LIST_ALL_CHANNELS - - Resolve user for DMs or @mentions [Optional]
SLACK_FIND_USERS - - Open/reuse a DM channel if messaging a user directly [Optional]
SLACK_OPEN_DM - - Post the message with resolved channel ID [Required]
SLACK_SEND_MESSAGE - - Edit the posted message if corrections needed [Optional]
SLACK_UPDATES_A_SLACK_MESSAGE
Key parameters:
- : Channel ID or name (without '#' prefix)
channel - : Preferred field for formatted messages (supports headers, bold, italic, code blocks)
markdown_text - : Raw text fallback (deprecated in favor of markdown_text)
text - : Timestamp of parent message to reply in a thread
thread_ts - : Block Kit layout blocks (deprecated, use markdown_text)
blocks
Pitfalls:
- requires
SLACK_FIND_CHANNELSparam; missing it errors with "Invalid request data provided"query - requires valid channel plus one of markdown_text/text/blocks/attachments
SLACK_SEND_MESSAGE - Invalid block payloads return error=invalid_blocks (max 50 blocks)
- Replies become top-level posts if is omitted
thread_ts - Persist and
response.data.channelfrom SEND_MESSAGE for edit/thread operationsresponse.data.message.ts
2. Search Messages and Conversations
When to use: User wants to find specific messages across the workspace
Tool sequence:
- - Resolve channel for scoped search with
SLACK_FIND_CHANNELS[Optional]in:#channel - - Resolve user for author filter with
SLACK_FIND_USERS[Optional]from:@user - - Run keyword search across accessible conversations [Required]
SLACK_SEARCH_MESSAGES - - Expand threads for relevant hits [Required]
SLACK_FETCH_MESSAGE_THREAD_FROM_A_CONVERSATION
Key parameters:
- : Search string supporting modifiers (
query,in:#channel,from:@user,before:YYYY-MM-DD,after:YYYY-MM-DD,has:link)has:file - : Results per page (max 100), or total with auto_paginate=true
count - : 'score' (relevance) or 'timestamp' (chronological)
sort - : 'asc' or 'desc'
sort_dir
Pitfalls:
- Validation fails if is missing/empty
query - can still mean no hits (
ok=true)response.data.messages.total=0 - Matches are under (sometimes also
response.data.messages.matches)response.data_preview.messages.matches - may be empty/truncated; key info can appear in
match.textmatches[].attachments[] - Thread expansion via FETCH_MESSAGE_THREAD can truncate when ; paginate via
response.data.has_more=trueresponse_metadata.next_cursor
3. Manage Channels and Users
When to use: User wants to list channels, users, or workspace info
Tool sequence:
- - Validate connectivity and get workspace identity [Required]
SLACK_FETCH_TEAM_INFO - - Enumerate public channels [Required]
SLACK_LIST_ALL_CHANNELS - - Include private channels and DMs [Optional]
SLACK_LIST_CONVERSATIONS - - List workspace members [Required]
SLACK_LIST_ALL_USERS - - Get detailed channel metadata [Optional]
SLACK_RETRIEVE_CONVERSATION_INFORMATION - - List user groups [Optional]
SLACK_LIST_USER_GROUPS_FOR_TEAM_WITH_OPTIONS
Key parameters:
- : Pagination cursor from
cursorresponse_metadata.next_cursor - : Results per page (default varies; set explicitly for large workspaces)
limit - : Channel types filter ('public_channel', 'private_channel', 'im', 'mpim')
types
Pitfalls:
- Workspace metadata is nested under , not top-level
response.data.team - returns public channels only; use
SLACK_LIST_ALL_CHANNELSfor private/IM coverageSLACK_LIST_CONVERSATIONS - can hit HTTP 429 rate limits; honor Retry-After header
SLACK_LIST_ALL_USERS - Always paginate via until empty; de-duplicate by
response_metadata.next_cursorid
4. React to and Thread Messages
When to use: User wants to add reactions or manage threaded conversations
Tool sequence:
- or
SLACK_SEARCH_MESSAGES- Find the target message [Prerequisite]SLACK_FETCH_CONVERSATION_HISTORY - - Add an emoji reaction [Required]
SLACK_ADD_REACTION_TO_AN_ITEM - - List reactions on a message [Optional]
SLACK_FETCH_ITEM_REACTIONS - - Remove a reaction [Optional]
SLACK_REMOVE_REACTION_FROM_ITEM - - Reply in thread using
SLACK_SEND_MESSAGE[Optional]thread_ts - - Read full thread [Optional]
SLACK_FETCH_MESSAGE_THREAD_FROM_A_CONVERSATION
Key parameters:
- : Channel ID where the message lives
channel - /
timestamp: Message timestamp (unique identifier like '1234567890.123456')ts - : Emoji name without colons (e.g., 'thumbsup', 'wave::skin-tone-3')
name - : Parent message timestamp for threaded replies
thread_ts
Pitfalls:
- Reactions require exact channel ID + message timestamp pair
- Emoji names use Slack's naming convention without colons
- only returns main channel timeline, NOT threaded replies
SLACK_FETCH_CONVERSATION_HISTORY - Use with parent's
SLACK_FETCH_MESSAGE_THREAD_FROM_A_CONVERSATIONto get thread repliesthread_ts
5. Schedule Messages
When to use: User wants to schedule a message for future delivery
Tool sequence:
- - Resolve channel ID [Prerequisite]
SLACK_FIND_CHANNELS - - Schedule the message with
SLACK_SCHEDULE_MESSAGEtimestamp [Required]post_at
Key parameters:
- : Resolved channel ID
channel - : Unix timestamp for delivery (up to 120 days in advance)
post_at - /
text: Message contentblocks
Pitfalls:
- Scheduling is limited to 120 days in advance
- must be a Unix timestamp, not ISO 8601
post_at
Common Patterns
ID Resolution
Always resolve display names to IDs before operations:
- Channel name -> Channel ID: with
SLACK_FIND_CHANNELSparamquery - User name -> User ID: with
SLACK_FIND_USERSorsearch_queryemail - DM channel: with resolved user IDs
SLACK_OPEN_DM
Pagination
Most list endpoints use cursor-based pagination:
- Follow until empty
response_metadata.next_cursor - Set explicit values (e.g., 100-200) for reliable paging
limit - De-duplicate results by across pages
id
Message Formatting
- Prefer over
markdown_textortextfor formatted messagesblocks - Use format to mention users (not @username)
<@USER_ID> - Use for line breaks in markdown_text
\n
Known Pitfalls
- Channel resolution: can return empty results if channel is private and bot hasn't been invited
SLACK_FIND_CHANNELS - Rate limits: and other list endpoints can hit HTTP 429; honor Retry-After header
SLACK_LIST_ALL_USERS - Nested responses: Results may be nested under in wrapped executions
response.data.results[0].response.data - Thread vs channel: returns main timeline only; use
SLACK_FETCH_CONVERSATION_HISTORYfor thread repliesSLACK_FETCH_MESSAGE_THREAD_FROM_A_CONVERSATION - Message editing: Requires both and original message
channel; persist these from SEND_MESSAGE responsets - Search delays: Recently posted messages may not appear in search results immediately
- Scope limitations: Missing OAuth scopes can cause 403 errors; check with
SLACK_GET_APP_PERMISSION_SCOPES
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| Find channels | | |
| List all channels | | |
| Send message | | |
| Edit message | | |
| Search messages | | |
| Get thread | | |
| Add reaction | | |
| Find users | | |
| List users | | |
| Open DM | | user IDs |
| Schedule message | | |
| Get channel info | | channel ID |
| Channel history | | |
| Workspace info | | (none) |