Slack
Overview
Slack nodes allow you to interact with Slack workspaces through OAuth-connected apps. These nodes enable you to send messages, retrieve conversation histories, manage channels, and interact with users programmatically.
All Slack nodes require a Slack connection to be configured in the Connections panel. You can set up a Slack connection through the Connections panel in your Intellectible dashboard.
Slack: Send Message
Controlled node
Send a message to a Slack channel or thread. Supports rich formatting using Slack Block Kit.
Inputs
Input | Type | Description | Default |
---|---|---|---|
Run | Event | Triggers the node to execute | - |
Channel ID | Text | The ID of the Slack channel to send the message to | - |
Message | Text | The text content of the message to send | - |
Thread Ts | Text | (Optional) Thread timestamp to reply in a thread. If provided, the message will be posted as a reply | - |
Blocks | Dictionary | (Optional) Slack Block Kit blocks for rich message formatting. See Slack API documentation | - |
Outputs
Output | Type | Description |
---|---|---|
Done | Event | Fires when the message has been sent successfully |
Status | Data | Response status from the Slack API |
Settings
Setting | Type | Description |
---|---|---|
Connections | Connection | The Slack OAuth connection to use for authentication |
Example Use Case
Send a notification to a team channel when a workflow completes, or reply to a specific thread with updates.
Slack: List Conversations
Controlled node
Retrieve a list of conversations (channels, DMs, group DMs) from your Slack workspace.
Inputs
Input | Type | Description | Default |
---|---|---|---|
Run | Event | Triggers the node to execute | - |
Limit | Number | Number of conversations to retrieve per page (max 200) | 200 |
Max Pages | Number | Maximum number of pages to fetch (max 5 for up to 1000 conversations total) | 5 |
Cursor | Text | (Optional) Pagination cursor to fetch the next set of results. See pagination guide for retrieving more than 1000 conversations | - |
Outputs
Output | Type | Description |
---|---|---|
Done | Event | Fires when the conversations have been retrieved |
Conversations | Data | List of conversation objects containing channel information |
Settings
Setting | Type | Description |
---|---|---|
Connections | Connection | The Slack OAuth connection to use for authentication |
Example Use Case
List all channels in a workspace to display available options to users, or to find specific channels by name.
Slack: Get Conversation History
Controlled node
Fetch the message history from a specific Slack channel or conversation.
Inputs
Input | Type | Description | Default |
---|---|---|---|
Run | Event | Triggers the node to execute | - |
Channel ID | Text | The ID of the Slack channel to retrieve history from | - |
Limit | Number | Number of messages to retrieve per page (max 200) | 200 |
Max Pages | Number | Maximum number of pages to fetch (max 5 for up to 1000 messages total). Defaults to 5 if not specified | - |
Cursor | Text | (Optional) Pagination cursor to fetch the next set of results. See pagination guide for retrieving more than 1000 messages | - |
Outputs
Output | Type | Description |
---|---|---|
Done | Event | Fires when the message history has been retrieved |
Messages | Data | List of message objects from the conversation |
Settings
Setting | Type | Description |
---|---|---|
Connections | Connection | The Slack OAuth connection to use for authentication |
Example Use Case
Retrieve recent messages from a support channel to analyze customer issues, or fetch conversation context for AI processing.
Slack: Get User Info
Controlled node
Retrieve detailed information about a specific Slack user.
Inputs
Input | Type | Description | Default |
---|---|---|---|
Run | Event | Triggers the node to execute | - |
User ID | Text | The Slack user ID to retrieve information for | - |
Outputs
Output | Type | Description |
---|---|---|
Done | Event | Fires when the user information has been retrieved |
User Info | Data | Object containing user details (name, email, profile, timezone, etc.) |
Settings
Setting | Type | Description |
---|---|---|
Connections | Connection | The Slack OAuth connection to use for authentication |
Example Use Case
Look up user details to personalize messages, or retrieve user contact information for notifications.
Slack: Join Channel
Controlled node
Join a Slack channel with your bot user. The bot must have permission to join the specified channel.
Inputs
Input | Type | Description | Default |
---|---|---|---|
Run | Event | Triggers the node to execute | - |
Channel ID | Text | The ID of the Slack channel to join | - |
Outputs
Output | Type | Description |
---|---|---|
Done | Event | Fires when the channel has been joined successfully |
Status | Data | Response status from the Slack API |
Settings
Setting | Type | Description |
---|---|---|
Connections | Connection | The Slack OAuth connection to use for authentication |
Example Use Case
Automatically join new channels created in your workspace, or join a channel before sending messages to it.
Slack: Open Conversation
Controlled node
Open a direct message or multi-person direct message conversation with one or more users.
Inputs
Input | Type | Description | Default |
---|---|---|---|
Run | Event | Triggers the node to execute | - |
Users | Text | User ID(s) to open a conversation with. Can be a single user ID, comma-separated string of user IDs, or an array of user IDs | - |
Return Im | Boolean | (Optional) If true, returns existing IM channel if available | - |
Outputs
Output | Type | Description |
---|---|---|
Done | Event | Fires when the conversation has been opened |
Conversation | Data | Object containing the conversation/channel information |
Settings
Setting | Type | Description |
---|---|---|
Connections | Connection | The Slack OAuth connection to use for authentication |
Example Use Case
Open a DM with a user to send them a private notification, or create a group DM for team collaboration.
Setting Up Slack Connections
To use Slack nodes, you need to create a custom Slack app and configure it with the appropriate OAuth scopes and credentials.
- Creating a new app at api.slack.com/apps
- Configuring OAuth & Permissions with refresh tokens
- Adding redirect URLs for Intellectible
- Setting up the required Bot Token Scopes (e.g.,
chat:write
,channels:read
,users:read
) - Getting your Client ID and Client Secret
- Adding the connection in Intellectible
For complete step-by-step instructions on creating and configuring your Slack app, see the Creating a Slack App section in the Connections Guide.
Using the Connection in Workflows
Once you've set up your Slack connection:
- Navigate to the Connections section in your Intellectible dashboard
- Verify your Slack connection is active
- Add the connection to the projects that need it via Manage Projects
- In your workflow, select the connection in each Slack node's Connections panel
Common Patterns
Sending Notifications
Connect the Done output of your workflow nodes to a Slack: Send Message node to send notifications when tasks complete.
Processing Channel Messages
Use Slack: Get Conversation History to retrieve messages, then pipe them through AI nodes for analysis, summarization, or classification.
Bot Interactions
Combine Slack: Open Conversation and Slack: Send Message to create interactive bot workflows that respond to user actions.
Cursor Pagination for More Than 1000 Results
When you need to retrieve more than 1000 messages or conversations from Slack, you can use cursor-based pagination with the While node. This pattern allows you to continuously fetch data until all results have been retrieved.
Overview
The Slack: Get Conversation History and Slack: List Conversations nodes support cursor-based pagination. By default, they retrieve up to 1000 results (5 pages × 200 per page). To fetch more, you'll need to:
- Initialize a cursor variable
- Use a While node to loop while the cursor is not null
- Pass the cursor to subsequent API calls
- Update the cursor with each response
- The loop automatically breaks when the cursor becomes null
Step-by-Step Implementation
1. Find Your Channel ID
First, use Slack: List Conversations to find the conversation ID of the channel you want to retrieve history from:
- Connect the List Conversations node to your workflow start
- The output will contain a list of conversations with their IDs
- Note the
id
field of the conversation you want to retrieve
2. Initialize the Cursor Variable
At the start of your workflow, create a Variable node to store the cursor:
- Add a Variable node
- Set the variable name to
cursor
- Set the initial value to empty (leave blank or use empty string
""
)
This empty cursor tells the Slack API to start from the beginning.
3. Set Up the While Node
Add a While node configured to run while the cursor is valid:
- Add a While node after your start
- Set Variable Name to
cursor
- In the node's properties panel:
- Set Operation to
!=
- Set Break Value to
null
- Set Operation to
- This will continue looping as long as
cursor != null
The loop will automatically break when the cursor becomes null
, indicating no more results are available.
4. Pass the Cursor to Get Conversation History
Inside the loop, connect a Slack: Get Conversation History node:
- Set Channel ID to the channel you want to retrieve
- Set Limit to
200
(maximum per page) - Set Max Pages to
1
(we'll handle pagination manually with the loop) - Connect the Cursor input to your
cursor
variable using{{cursor}}
5. Store Messages with Index Key
After each API call, store the messages using a Set Variable node:
- Add a Set Variable node after the Get Conversation History node
- Set the variable name to
messageHistory/{{index}}
- The
{{index}}
comes from the While node's current iteration index - This creates a unique key for each batch of messages (e.g.,
messageHistory/0
,messageHistory/1
, etc.)
- The
- Set the value to the
messages
output from the Get Conversation History node
6. Update the Cursor
Add another Set Variable node to update the cursor for the next iteration:
- Add a Set Variable node
- Set the variable name to
cursor
- Set the value to
{{messages.nextCursor}}
- This extracts the
nextCursor
field from the response - When there are no more results, this will be
null
, breaking the loop
- This extracts the
7. Flatten the Results
After the loop completes, use a Flatten List node to combine all message batches:
- Connect a Flatten List node to the While node's Finished output
- Pass the
messageHistory
variable (which now contains all batches) - The output will be a single flat array containing all messages from all iterations
Complete Workflow Structure
[Start]
↓
[Set Variable: cursor = ""]
↓
[While: cursor != null]
↓
[Get Conversation History]
- channelId: "C1234567890"
- cursor: {{cursor}}
- limit: 200
- maxPages: 1
↓
[Set Variable: messageHistory/{{index}} = messages]
↓
[Set Variable: cursor = messages.nextCursor]
↓ (loop continues while cursor != null)
[While Finished]
↓
[Flatten List: messageHistory]
↓
[All messages retrieved!]
Key Points
- Cursor starts empty: An empty cursor tells the API to start from the beginning
- While loop breaks automatically: When
nextCursor
isnull
, the While node's condition (cursor != null
) becomes false and iteration stops - Unique keys: Using
{{index}}
from the While node ensures each batch is stored separately - Flatten at the end: The Flatten List node combines all batches into a single array for easy processing
This pattern works for both Get Conversation History and List Conversations nodes when you need to retrieve more than 1000 results.