Slack
The Slack Node allows you to connect with your Slack account and retrieve data from specific channels, so you can feed an AI assistant with that data. You can either use the pre-configured StackAI bot (recommended for faster deployment and compliance-ready permissions) or deploy a custom bot for full control over branding and configuration.
Adding StackAI's Slack App
The StackAI App for Slack can be added to both private and shared channels in your Slack workspace. Please review our privacy policy before you install the application. Below, we'll guide you through the steps required:
Step 1: Select Slack (OAuth2) as a New Connection

Step 2: Choose a Channel and Allow Access
You will see a pop-up window with StackAI requesting access.

Select a channel to validate the connection. This is the channel your app will be able to post to. Your app will also inherit your user permissions and be able to read from all the channels you have access to.
Step 3: Ensure the Connection is Selected
You can test the connection to make sure you are connected using the "Test" button.

Step 4: Use Your Slack App
Select the actions you would like to use in Slack. To run the actions, make sure you have the parameters filled out.

Creating Your Own Slack App
If you prefer not to use OAuth2, you can connect via a custom Slack App using a Bot Token and a Channel ID.
⚠️ Important: Each action or trigger in Slack requires specific permissions. When connecting via API tokens, you are responsible for configuring the right scopes in your Slack App. Missing permissions may prevent certain actions, triggers, or even configuration selectors from working as expected. For this reason, we recommend using the OAuth2 connection whenever possible, as it comes pre-configured with all the necessary permissions and ensures full functionality.
Step 1: Create a Slack App Go to Slack API: Your Apps and create a new app in your workspace.
Step 2: Configure OAuth & Permissions (add all the ones they need!) Under OAuth & Permissions, add the following scopes to your Bot Token:
app_mentions:read
assistant:write
bookmarks:read
bookmarks:write
calls:read
calls:write
canvases:read
canvases:write
channels:read
channels:write.invites
channels:write.topic
channels:join
channels:manage
channels:history
conversations.connect:write
conversations.connect:manage
conversations.connect:read
chat:write
chat:write.customize
chat:write.public
commands
dnd:read
emoji:read
files:read
files:write
groups:read
groups:history
groups:write
groups:write.topic
groups:write.invites
im:read
im:history
im:write
im:write.topic
incoming-webhook
lists:read
lists:write
links:read
links:write
links.embed:write
metadata.message:read
mpim:read
mpim:history
mpim:write
mpim:write.topic
pins:read
pins:write
reactions:read
reactions:write
reminders:read
reminders:write
remote_files:read
remote_files:write
remote_files:share
team:read
team.billing:read
team.preferences:read
triggers:read
triggers:write
usergroups:read
usergroups:write
users:read
users:read.email
users:write
users.profile:read
workflow.steps:execute
workflows.templates:read
workflows.templates:write
Under the User Token Scopes:
search:read
Once added, install (or reinstall) the app in your workspace to apply these permissions.
Step 3: Include the URL for Interactivity:
Some actions, like Send & Wait for Response, require to include the url https://api.stack-ai.com/workflow/v1/resume
in the Interactivity & Shortcuts to work out. If you do not include that url, you will not be able to resume workflows using that particular action.
So now, it is time to include the URL. For that, enable Interactivity and include the URL, as follows:
Step 4: Add the Integration to a Channel
Once the app is installed in your workspace, you need to invite it to the channel where it should operate.
Open Slack and go to the target channel.
In the message box, type:
/invite @YourAppName
Hit Enter. The bot is now a member of the channel and will be able to read/write messages according to the permissions you configured.
Step 5: Retrieve Your Bot Token
Copy the Bot User OAuth Token (starts with xoxb-
). This token uniquely identifies your bot when making requests. Here more information on how to get it: Official guide.
You can also copy the User Token, highly recommended if you want to perform Search Messages.
Step 6: Find Your Channel ID Locate the ID of the Slack channel you want to connect. Here more information on how to get it: Guide to finding Channel IDs
Step 7: Configure the Connection in StackAI
Enter the Bot Token and Channel ID in the connection form. Optionally, you can also provide a User Token (starts with xoxp-
) for user-level search operations.
Once saved, the connection will be validated and ready for use in actions and triggers.
Available Actions
1. Search Slack Messages (slack_search_messages)
Description: Search for messages across the Slack workspace using query parameters with optional channel filtering.
Inputs:
query
(string, required): Search query to find messages in the Slack workspace. Supports advanced search syntax like 'from:@user', 'in:#channel', date ranges, etc. Example: "project update from:@Johnchannels
(array of strings, optional): List of channel IDs to filter search results. We simplify the process by adding a multi-selector that automatically retrieves all the available channels. If empty, searches all accessible channelscount
(number, optional): Maximum number of search results to return. Default: 20, Maximum: 100sort
(string, optional): Sort results by timestamp or relevance score. Default: "timestamp"sort_dir
(string, optional): Sort direction. Options: "asc" or "desc". Default: "desc"highlight
(boolean, optional): Whether to highlight matching terms in results. Default: true
Outputs:
query
(string): The search query that was executed (with channel filters applied)total_matches
(number): Total number of messages matching the search querymessages
(array): List of messages matching the search query. Each message contains: text, user, username, timestamp, channel_id, channel_name, permalink, is_thread_reply, parent_timestamphas_more
(boolean): Whether there are more results available
2. Send a Message (slack_message
)
slack_message
)Description: Send a message to a Slack channel.
Inputs:
message
(string, required): Content/body of the message you want to sendchannel_id
(string, required): The Slack channel to send the message toDynamic options populated from available channels
Outputs:
channel_id
(string): The Slack channel ID where the message was sentresults (string): The status of the message sent (confirmation or error)
message_ts (string): Slack message timestamp (unique identifier)
3. Send Message and Wait for Response (slack_send_and_wait_block_kit
)
slack_send_and_wait_block_kit
)Description: Send a Slack message that collects an approval or free-text response using modern Block Kit.
Inputs:
message
(string, required): Content/body of the interactive messagechannel_id
(string, required): The Slack channel to send the interactive message toresponse_type
(string, required): Choose response type. Options: "approval" (buttons) or "free_text" (opens modal to collect text). Default: "approval"button_text
(string, optional): Text displayed on the primary interactive button. Default: "Approve"include_disapprove
(boolean, optional): If true, include a Disapprove button. Default: truedisapprove_button_text
(string, optional): Text displayed on the disapprove button. Default: "Disapprove"free_text_placeholder
(string, optional): Placeholder for the modal's text input. Used when response_type is "free_text"block_id
(string, optional): Unique identifier for the top section blockbutton_style
(string, optional): Visual style. Options: "primary", "danger" or default
Outputs:
channel_id
(string): The Slack channel ID where the interactive message was sentresults
(string): The status of the interactive message sentmessage_ts
(string): Slack message timestamp (unique identifier)resume_output
(object, optional): User interaction data when workflow resumes
Note: Remember if you are using your own connection to enable Interactivity and include the
https://api.stack-ai.com/workflow/v1/resume
url, as explained in the connection. This is critical, otherwise you will not be able to resume the workflow.
4. Upload File (slack_upload_file
)
slack_upload_file
)Description: Upload files to Slack using modern external upload workflow with multiple source options.
Inputs:
source_url
(string, optional): URL to download file from.bytes_b64
(string, optional): Base64 encoded file content.text
(string, optional): Raw text content to upload as a file.filename
(string, optional): Name of the file. Required for bytes_b64 and text modes. Optional for source_url (inferred from URL).title
(string, optional): Title for the file (defaults to filename).content_type
(string, optional): MIME type of the file. Auto-set to 'text/plain' for text mode.channel_id
(string, optional): Channel to share the file. Leave empty to keep file private.thread_ts
(string, optional): Timestamp of thread to reply in.initial_comment
(string, optional): Initial comment with the file.unfurl_links
(boolean, optional): Auto-unfurl links in comment. Default: true.unfurl_media
(boolean, optional): Auto-unfurl media in comment. Default: true.
- Outputs:
success
(boolean): Whether the file was uploaded successfully.file_id
(string): Unique ID of the uploaded file.file_url
(string): Private URL to access the file.permalink
(string): Permanent link to the file.sharing_summary
(string): Summary of where the file was shared.upload_method
(string): Method used for upload.
5. Delete Slack File (slack_delete_file
)
slack_delete_file
)Description: Delete a file from the Slack workspace permanently.
Inputs:
file_id
(string, required): The unique ID of the file to delete.
Outputs:
success
(boolean): Whether the file was successfully deleted.file_id
(string): The ID of the file that was deleted.message
(string): Message describing the deletion result.
6. Get Slack File Info (slack_get_file_info
)
slack_get_file_info
)Description: Get detailed information about a specific Slack file.
Inputs:
file_id
(string, required): The unique ID of the file to get information about.
Outputs:
file
(object): Detailed information about the file.Includes
: id, name, title, mimetype, filetype, size, created, user, urls, etc.access_urls
(object): URLs for accessing the file (require Authorization header).sharing_info
(object): Information about where the file is shared.
7. List Files (slack_list_files
)
slack_list_files
)Description: List files in the Slack workspace with filtering options.
Inputs:
user
(string, optional): Filter files by specific user ID.channel
(string, optional): Filter files by specific channel.ts_from
(string, optional): Filter files created after this timestamp (Unix timestamp).ts_to
(string, optional): Filter files created before this timestamp (Unix timestamp).types
(string, optional): Filter by file types. Options: "all", "spaces", "snippets", "images", "gdocs", "zips", "pdfs".count
(number, optional): Maximum number of files to return. Default: 20, Maximum: 1000.show_files_hidden_by_limit
(boolean, optional): Show files hidden by 5GB limit in free workspaces. Default: false.
Outputs:
files
(array): List of files matching the criteria. Each file contains: id, name, title, mimetype, size, created, user, etc.total_count
(number): Total number of files found.has_more
(boolean): Whether there are more files available.paging
(object): Pagination information.
8. Query Slack Channel (slack_query
)
slack_query
)Description: Retrieve messages from a Slack channel. Query and retrieve messages from a pre-configured Slack channel.
Inputs:
No required input parameters (the channel is typically configured in the connection or node settings).
Outputs:
channel_id
: The Slack channel ID that was queried.results
: The messages retrieved from the Slack channel. Includes main messages and thread replies. Each message contains: id, text, timestamp, is_thread_reply, parent_ts.
Last updated
Was this helpful?