slack-apiSlack API integration with managed OAuth. Send messages, manage channels, search conversations, and interact with Slack workspaces. Use this skill when users want to post messages, list channels, get user info, or automate Slack workflows. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Install via ClawdBot CLI:
clawdbot install byungkyu/slack-apiAccess the Slack API with managed OAuth authentication. Send messages, manage channels, list users, and automate Slack workflows.
# Post a message to a channel
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'channel': 'C0123456789', 'text': 'Hello from Maton!'}).encode()
req = urllib.request.Request('https://gateway.maton.ai/slack/api/chat.postMessage', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
https://gateway.maton.ai/slack/{method}
The gateway proxies requests to slack.com and automatically injects your OAuth token.
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
Manage your Slack OAuth connections at https://ctrl.maton.ai.
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections?app=slack&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'slack'}).encode()
req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"connection": {
"connection_id": "21fd90f9-5935-43cd-b6c8-bde9d915ca80",
"status": "ACTIVE",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "slack",
"metadata": {}
}
}
Open the returned url in a browser to complete OAuth authorization.
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If you have multiple Slack connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'channel': 'C0123456789', 'text': 'Hello!'}).encode()
req = urllib.request.Request('https://gateway.maton.ai/slack/api/chat.postMessage', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If omitted, the gateway uses the default (oldest) active connection.
POST /slack/api/chat.postMessage
Content-Type: application/json
{
"channel": "C0123456789",
"text": "Hello, world!"
}
With blocks:
POST /slack/api/chat.postMessage
Content-Type: application/json
{
"channel": "C0123456789",
"blocks": [
{"type": "section", "text": {"type": "mrkdwn", "text": "*Bold* and _italic_"}}
]
}
POST /slack/api/chat.postMessage
Content-Type: application/json
{
"channel": "C0123456789",
"thread_ts": "1234567890.123456",
"text": "This is a reply in a thread"
}
POST /slack/api/chat.update
Content-Type: application/json
{
"channel": "C0123456789",
"ts": "1234567890.123456",
"text": "Updated message"
}
POST /slack/api/chat.delete
Content-Type: application/json
{
"channel": "C0123456789",
"ts": "1234567890.123456"
}
GET /slack/api/conversations.list?types=public_channel,private_channel
GET /slack/api/conversations.info?channel=C0123456789
GET /slack/api/conversations.members?channel=C0123456789&limit=100
GET /slack/api/conversations.history?channel=C0123456789&limit=100
GET /slack/api/conversations.replies?channel=C0123456789&ts=1234567890.123456
GET /slack/api/users.list
GET /slack/api/users.info?user=U0123456789
GET /slack/api/search.messages?query=keyword
POST /slack/api/conversations.open
Content-Type: application/json
{
"users": "U0123456789"
}
POST /slack/api/reactions.add
Content-Type: application/json
{
"channel": "C0123456789",
"name": "thumbsup",
"timestamp": "1234567890.123456"
}
POST /slack/api/files.upload
Content-Type: multipart/form-data
channels=C0123456789
content=file content here
filename=example.txt
Get current user and team info:
GET /slack/api/auth.test
const response = await fetch('https://gateway.maton.ai/slack/api/chat.postMessage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
},
body: JSON.stringify({ channel: 'C0123456', text: 'Hello!' })
});
import os
import requests
response = requests.post(
'https://gateway.maton.ai/slack/api/chat.postMessage',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'},
json={'channel': 'C0123456', 'text': 'Hello!'}
)
C (public), G (private/group), or D (DM)U, Team IDs start with Tts) are used as unique identifiersmrkdwn type for Slack-flavored markdown formattingthread_ts to reference the parent messagecurl -g when URLs contain brackets (fields[], sort[], records[]) to disable glob parsingjq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.| Status | Meaning |
|--------|---------|
| 400 | Missing Slack connection |
| 401 | Invalid or missing Maton API key |
| 429 | Rate limited (10 req/sec per account) |
| 4xx/5xx | Passthrough error from Slack API |
MATON_API_KEY environment variable is set:echo $MATON_API_KEY
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://ctrl.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
slack. For example:https://gateway.maton.ai/slack/api/chat.postMessagehttps://gateway.maton.ai/api/chat.postMessageGenerated Mar 1, 2026
A SaaS company uses the skill to automatically post customer support ticket updates to dedicated Slack channels. When a high-priority ticket is created or resolved, the system sends formatted messages with details, enabling real-time team awareness and reducing response times. This integrates with internal ticketing systems via the Maton gateway.
A sales team leverages the skill to generate and post daily sales reports to a private Slack channel. The reports include metrics like leads generated, deals closed, and revenue forecasts, pulled from a CRM. This automates manual reporting, keeping the team aligned and informed without manual intervention.
A project management tool uses the skill to send task completion notifications and deadline reminders to project-specific Slack channels. When a team member marks a task as done, a message is posted with details, fostering collaboration and transparency across remote teams. This streamlines communication without switching apps.
An IT department configures the skill to post alerts from monitoring tools to a Slack channel for critical system events like server outages or security breaches. The messages include severity levels and actionable steps, enabling quick incident response and reducing downtime through automated notifications.
A marketing agency automates posting of campaign performance metrics (e.g., click-through rates, conversions) to a Slack channel after daily data pulls from analytics platforms. This provides real-time insights to stakeholders, facilitating data-driven decisions and eliminating manual report sharing.
Offer a monthly subscription service where businesses pay to automate Slack workflows, such as notifications from their existing tools. Revenue comes from tiered plans based on usage volume (e.g., number of messages or integrations), targeting small to medium enterprises seeking efficiency gains.
Provide bespoke development services to build and deploy custom Slack integrations for clients using this skill. Charge one-time project fees or retainer models for ongoing support, focusing on industries like finance or healthcare with specific compliance needs. This leverages the skill's API capabilities for tailored solutions.
Develop a freemium tool that uses this skill for basic Slack automation (e.g., simple message posting) and charge for advanced features like analytics dashboards or multi-workspace management. Monetize through upsells to premium tiers, attracting startups and scaling with user growth.
💬 Integration Tip
Start by setting the MATON_API_KEY environment variable and testing with a single Slack connection to post messages, then expand to more complex workflows like channel management or user searches as needed.
iMessage/SMS CLI for listing chats, history, watch, and sending.
Use when you need to control Discord from Clawdbot via the discord tool: send messages, react, post or upload stickers, upload emojis, run polls, manage threads/pins/search, fetch permissions or member/role/channel info, or handle moderation actions in Discord DMs or channels.
Use when you need to control Slack from Clawdbot via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
Build or update the BlueBubbles external channel plugin for Clawdbot (extension package, REST send/probe, webhook inbound).
OpenClaw skill for designing Telegram Bot API workflows and command-driven conversations using direct HTTPS requests (no SDKs).