Skip to main content

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

InputTypeDescriptionDefault
RunEventTriggers the node to execute-
Channel IDTextThe ID of the Slack channel to send the message to-
MessageTextThe text content of the message to send-
Thread TsText(Optional) Thread timestamp to reply in a thread. If provided, the message will be posted as a reply-
BlocksDictionary(Optional) Slack Block Kit blocks for rich message formatting. See Slack API documentation-

Outputs

OutputTypeDescription
DoneEventFires when the message has been sent successfully
StatusDataResponse status from the Slack API

Settings

SettingTypeDescription
ConnectionsConnectionThe 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

InputTypeDescriptionDefault
RunEventTriggers the node to execute-
LimitNumberNumber of conversations to retrieve per page (max 200)200
Max PagesNumberMaximum number of pages to fetch (max 5 for up to 1000 conversations total)5
CursorText(Optional) Pagination cursor to fetch the next set of results. See pagination guide for retrieving more than 1000 conversations-

Outputs

OutputTypeDescription
DoneEventFires when the conversations have been retrieved
ConversationsDataList of conversation objects containing channel information

Settings

SettingTypeDescription
ConnectionsConnectionThe 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

InputTypeDescriptionDefault
RunEventTriggers the node to execute-
Channel IDTextThe ID of the Slack channel to retrieve history from-
LimitNumberNumber of messages to retrieve per page (max 200)200
Max PagesNumberMaximum number of pages to fetch (max 5 for up to 1000 messages total). Defaults to 5 if not specified-
CursorText(Optional) Pagination cursor to fetch the next set of results. See pagination guide for retrieving more than 1000 messages-

Outputs

OutputTypeDescription
DoneEventFires when the message history has been retrieved
MessagesDataList of message objects from the conversation

Settings

SettingTypeDescription
ConnectionsConnectionThe 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

InputTypeDescriptionDefault
RunEventTriggers the node to execute-
User IDTextThe Slack user ID to retrieve information for-

Outputs

OutputTypeDescription
DoneEventFires when the user information has been retrieved
User InfoDataObject containing user details (name, email, profile, timezone, etc.)

Settings

SettingTypeDescription
ConnectionsConnectionThe 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

InputTypeDescriptionDefault
RunEventTriggers the node to execute-
Channel IDTextThe ID of the Slack channel to join-

Outputs

OutputTypeDescription
DoneEventFires when the channel has been joined successfully
StatusDataResponse status from the Slack API

Settings

SettingTypeDescription
ConnectionsConnectionThe 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

InputTypeDescriptionDefault
RunEventTriggers the node to execute-
UsersTextUser 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 ImBoolean(Optional) If true, returns existing IM channel if available-

Outputs

OutputTypeDescription
DoneEventFires when the conversation has been opened
ConversationDataObject containing the conversation/channel information

Settings

SettingTypeDescription
ConnectionsConnectionThe 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:

  1. Navigate to the Connections section in your Intellectible dashboard
  2. Verify your Slack connection is active
  3. Add the connection to the projects that need it via Manage Projects
  4. 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:

  1. Initialize a cursor variable
  2. Use a While node to loop while the cursor is not null
  3. Pass the cursor to subsequent API calls
  4. Update the cursor with each response
  5. The loop automatically breaks when the cursor becomes null

Step-by-Step Implementation

Slack cursor pagination workflow example

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
  • This will continue looping as long as cursor != null
While Condition

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.)
  • 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

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 is null, 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.