Slack
Team communication for messages, channels, and interactive workflows
Slack
Connect to Slack for team messaging, channel management, and interactive workflows.
Overview
Slack is a team collaboration platform. The integration supports:
- Messages - Send, update, delete, and schedule messages
- Channels - Create, manage, and list channels
- Users - Look up and manage users
- Files - Upload and manage files
- Reactions - Add and remove emoji reactions
- Modals - Open interactive modal views
- Home Tab - Publish app home views
Prerequisites
- Slack workspace
- Slack app with required scopes
- Bot token or OAuth credentials
Authentication
Slack uses OAuth 2.0 for authentication via Nango.
Required Scopes
| Scope | Description |
|---|---|
chat:write | Send messages |
channels:read | List channels |
channels:manage | Create/archive channels |
users:read | Read user info |
files:write | Upload files |
reactions:write | Add reactions |
Available Actions
Message Actions
sendMessage
Send a message to a channel or DM.
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
channel | string | Yes | Channel ID or name (#channel) |
text | string | Conditional | Message text (required if no blocks) |
blocks | array | No | Block Kit blocks |
threadTs | string | No | Thread timestamp for replies |
replyBroadcast | boolean | No | Also post to channel |
unfurlLinks | boolean | No | Unfurl URLs (default: true) |
unfurlMedia | boolean | No | Unfurl media (default: true) |
mrkdwn | boolean | No | Parse as mrkdwn (default: true) |
attachments | array | No | Legacy attachments |
metadata | object | No | Message metadata |
sendEphemeral
Send a message visible only to one user.
scheduleMessage
Schedule a message for later.
Note: postAt can be a Unix timestamp or ISO date string.
updateMessage
Update an existing message.
deleteMessage
Delete a message.
getPermalink
Get a permanent link to a message.
Reaction Actions
addReaction
Add an emoji reaction to a message.
Note: Emoji name without colons (e.g., thumbsup not :thumbsup:).
removeReaction
Remove an emoji reaction.
File Actions
uploadFile
Upload a file to Slack.
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
channels | string/array | No | Channels to share to |
content | string | Conditional | Text content |
file | string | Conditional | Base64 encoded file |
filename | string | No | File name |
filetype | string | No | File type (csv, pdf, etc.) |
title | string | No | File title |
initialComment | string | No | Comment with file |
threadTs | string | No | Thread timestamp |
getFile
Get file information.
deleteFile
Delete a file.
Modal Actions
openModal
Open a modal view (requires trigger_id from interaction).
updateModal
Update an existing modal.
pushModal
Push a new view onto the modal stack.
publishHomeTab
Publish a view to the app Home tab.
User Actions
getUser
Get user information.
listUsers
List workspace users.
lookupUserByEmail
Find a user by email address.
Channel Actions
getChannel
Get channel information.
listChannels
List workspace channels.
createChannel
Create a new channel.
inviteToChannel
Invite users to a channel.
archiveChannel
Archive a channel.
setChannelTopic
Set the channel topic.
getChannelHistory
Get channel message history.
Bookmark Actions
addBookmark
Add a bookmark to a channel.
Slack Triggers
Slack events can trigger workflows via the Events API.
Event Trigger
Event Types:
| Event | Description |
|---|---|
message | Message in channel/DM |
app_mention | Bot @mentioned |
reaction_added | Emoji reaction added |
channel_created | New channel created |
member_joined_channel | User joined channel |
file_shared | File uploaded |
Slash Command Trigger
Interactive Trigger
Block Kit
Slack uses Block Kit for rich message layouts.
Common Block Types
Example Workflow
Approval workflow with Slack interaction:
Rate Limits
| Limit | Value |
|---|---|
| Web API (Tier 1) | 1 req/sec |
| Web API (Tier 2) | 20 req/min |
| Web API (Tier 3) | 50 req/min |
| Web API (Tier 4) | 100 req/min |
| Incoming webhooks | 1 req/sec |
Troubleshooting
Common Errors
| Error | Cause | Solution |
|---|---|---|
channel_not_found | Invalid channel ID | Verify channel exists and bot has access |
not_in_channel | Bot not in channel | Invite bot to channel |
invalid_blocks | Malformed Block Kit | Validate with Block Kit Builder |
message_not_found | Invalid message ts | Verify timestamp is correct |
ratelimited | Too many requests | Implement backoff, check Retry-After |