Slack
The robomotion slack CLI connects to Slack workspaces for messaging and channel management. It sends messages to channels, lists channels and users, uploads and deletes files, and receives messages via Socket Mode for real-time interaction.
When to use
- Send messages to Slack channels by name
- List channels, users, and workspace information
- Upload or delete files in channels
- Receive messages via Socket Mode
Prerequisites
robomotionCLI installed- Package installed:
robomotion install slack - Slack bot token configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install slack - Connect with session:
robomotion slack connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion slack send_message --client-id "<client-id>" --channel-name <channel> --message <text> --session-id "<session-id>" --output json - Disconnect when done:
robomotion slack disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion slack connect --session --output jsonConnect to Slack using a bot tokenrobomotion slack disconnect --client-id --session-id "<session-id>" --output jsonDisconnect from Slack and cleanup resourcesrobomotion slack list_channels --client-id --session-id "<session-id>" --output jsonList all channels in the Slack workspacerobomotion slack list_users --client-id --session-id "<session-id>" --output jsonList all users in the Slack workspacerobomotion slack file_upload --client-id --channel-id --file-path --session-id "<session-id>" --output jsonUpload a file to a Slack channelrobomotion slack delete_file --client-id --file-id --session-id "<session-id>" --output jsonDelete a file from Slackrobomotion slack send_message --client-id --channel-name --message --session-id "<session-id>" --output jsonSend a message to a Slack channelrobomotion slack receive_message [--channel-id] [--user-id] --output jsonReceive messages from Slack channels using Socket Mode
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)