Slack Component
Send messages to Slack channels and users
Component key: slack
Description
Slack is a messaging platform. The Slack component allows posting messages to a Slack channel.
API Documentation
This component was built using the following API References:
Processing Slack events in real-time
Slack requires providing only one webhook URL for the app, and Slack will send all customers' events to that URL. To detect and process changes to customers' Slack accounts in real-time, see the Single-Endpoint Webhook Integrations guide on handling webhook requests from apps that require specifying a single webhook endpoint.
Connections
OAuth 2.0
key: oauth2The vast majority of actions in this component use OAuth 2.0 for authentication.
Prerequisites
- A Slack workspace with administrator access
- Access to the Slack Developer App Portal
Setup Steps
- Navigate to the Slack Developer App Portal
- Click Create New App
- Choose to create the app From scratch
- Give the app a name and select the workspace. It will be configured to be multi-workspace capable in a moment
- Select OAuth & Permissions from the sidebar
- Under Redirect URLs, add
https://oauth2.prismatic.io/callback. - At the bottom, add some User Token Scopes if the integration will send messages on behalf of users, or Bot Token Scopes if a Slack "bot" will send the messages.
The scopes required depend on what types of things the Slack integration will need to do (create channels, send messages, etc).
For sending messages to a channel as a bot, add these scopes:
chat:write chat:write.public. To send messages as a user, see the section below.
- Under Redirect URLs, add
- Next, select Distribute App under Manage Distribution. Confirm that "removed hard coded information" is checked and select Activate Public Distribution. The app needs to be publicly distributed for installation in Slack workspaces.
- Finally, open Basic Information. Copy the Client ID, Client Secret and Signing Secret.
Configure the Connection
Add a Slack step to the integration - that will create a connection config variable. Open the connection config variable.
- Enter the Client ID, Signing Secret and Client Secret from the Slack app
- For Scopes, enter the required scopes based on what Slack actions the integration includes:
- For sending messages to a channel, enter the scopes
chat:write chat:write.publicto assign a bot token that can write messages to public channels. See below for information on sending messages to private channels. - Conversation and channel-related actions require
admin.conversations:write. - Enter scopes with spaces in between them (e.g.
chat:write users:read users:read.email)
- For sending messages to a channel, enter the scopes
A list of all Slack OAuth scopes and what each does are available in the Slack documentation.
Sending messages to private channels
The chat:write.public scope allows the bot to send messages to public channels.
To send messages to private channels, or to be more selective about what channels the bot can send messages to, the bot must be invited to specific channels.
If a bot does not have chat:write.public or tries to write to a private channel it's not a part of, a not_in_channel error will be received from Slack when attempting to send a message to that channel.
Sending messages as a user
Slack applications typically send messages as bot users.
To instead send messages as a user, edit the Auth URL and add chat:write to a user_scope query parameter on the Authorization URL to get a User token. To manage channels, add the channels:write scope.
The Auth URL, then, will look something like this: https://slack.com/oauth/v2/authorize?user_scope=chat:write
Dynamically changing the bot's name
The bot's username and icon are set when creating the Slack app.
To override the bot's username within the integration, request the chat:write.customize scope in addition to chat:write.
GovSlack
Slack offers GovSlack for government organizations that require compliance with FIPS 140-2, FedRAMP, ITAR, etc.
To use the Slack component with GovSlack, change the beginning of OAuth auth URL, token URL, and revoke URL from https://slack.com to https://slack-gov.com.
The component will automatically point API requests towards the Slack Gov API endpoint.
| Input | Notes | Example |
|---|---|---|
| Authorize URL | The OAuth 2.0 Authorization URL for Slack. If you want to request access to the API on behalf of a User, append a 'user_scope' query parameter to the end of the Authorize URL: https://slack.com/oauth/v2/authorize?user_scope=chat:write,channels:read,groups:read,im:read,mpim:read | https://slack.com/oauth/v2/authorize |
| Client ID | ||
| Client Secret | ||
| Is User | Flip the flag to true if you want to access the API as a User. If flipped you must also provide a 'user_scope' query parameter to the end of the Authorize URL. Leaving the flag false will grant you a Bot token instead. | false |
| Revoke URL | The OAuth 2.0 Revocation URL for Slack | https://slack.com/api/auth.revoke |
| Scopes (Bot) | A space-delimited set of one or more scopes to get the Bot token. If you want to access the API as a User, you must append a 'user_scope' query parameter to the end of the Authorize URL and set the 'Is User' flag to true. | chat:write chat:write.public users:read channels:read files:read files:write channels:manage channels:history groups:history mpim:history im:history |
| Signing Secret | ||
| Token URL | The OAuth 2.0 Token URL for Slack | https://slack.com/api/oauth.v2.access |
Webhook URL
key: webhookUrlThe Slack Message from Webhook and the Slack Block Message from Webhook actions are the only Slack actions that do not authenticate with OAuth. Instead, these actions use Slack Incoming Webhooks.
Prerequisites
- A Slack workspace with administrator access
- Ability to create Slack apps in the workspace
Setup Steps
To generate a Slack incoming webhook URL:
- Navigate to the Slack App Portal
- Click Create New App, adding an app to the workspace
- Under Add features and functionality select Incoming Webhooks
- Activate Incoming Webhooks and then Add New Webhook to Workspace
- Select the channel where messages will be posted
- Copy the Webhook URL. It should be of the form
https://hooks.slack.com/services/foo/bar/baz
Configure the Connection
- Enter the Webhook URL into the connection configuration
| Input | Notes | Example |
|---|---|---|
| Webhook URL | The Slack webhook URL. Instructions for generating a Slack webhook are available on the Slack component docs page. | https://hooks.slack.com/services/TXXXX/BXXXXX/XXXXXXX |
Triggers
App Webhook
Trigger for handling slash command and modal webhooks from Slack | key: slashCommandWebhook
| Input | Notes | Example |
|---|---|---|
| Content Type | The content type of the response returned to Slack. | text/plain |
| Response Body | The response body to return to Slack. Leave empty for no response body. |
Events API Webhook
Receive and validate webhook requests from Slack's Events API for webhooks you configure. | key: webhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. |
Slack can be configured to send events to a workflow. This webhook trigger uses the Slack app's signing secret to verify requests from Slack.
This trigger automatically handles Slack's challenge verification, so no additional verification steps are required.
How It Works
This trigger routes incoming requests to one of three branches based on the request type:
- URL Verify branch: Handles the initial challenge request when configuring the webhook in Slack. The trigger automatically responds with the proper challenge response.
- Notification branch: Handles actual event notifications from Slack, such as when a channel is created or a message is posted.
- Management branch: Handles requests from external systems for testing or management purposes. To invoke this branch, include the
prismatic-bypass-challenge: trueheader in the request to bypass Slack message verification.
The trigger verifies all requests using the signing secret to ensure they originate from Slack.
Configuration
Configure the following input:
- Slack Connection: The Slack connection containing the signing secret from the Slack app. This secret is used to cryptographically verify that webhook requests originate from Slack.
Event Types
Slack supports numerous event types that can trigger this webhook. Common events include:
Available Events (Examples)
| Event | Description |
|---|---|
app_mention | App was mentioned in a channel |
channel_created | Channel was created |
channel_deleted | Channel was deleted |
message.channels | Message was posted in a public channel |
message.im | Message was posted in a direct message |
user_change | User profile information changed |
Refer to Slack's Event Types documentation for the complete and up-to-date list of available event types.
Returned Data
The trigger returns different payloads depending on the branch:
Example Notification Payload
{
"token": "XXYYZZ",
"team_id": "TXXXXXXXX",
"api_app_id": "AXXXXXXXXX",
"event": {
"type": "channel_created",
"channel": {
"id": "C024BE91L",
"name": "general",
"created": 1360782804
},
"event_ts": "1360782804.083113"
},
"type": "event_callback",
"event_id": "Ev08MFMKH6",
"event_time": 1234567890
}
Example Challenge Payload (URL Verify Branch)
{
"token": "XXYYZZ",
"challenge": "3eZbrw1aBm2rZgRNFdxV2595E9CY3gmdALWMmHkvFXO7tYXAYM8P",
"type": "url_verification"
}
Data Sources
Select Channel
Select a Slack channel from a dropdown menu (up to 10,000 channels). To select Private Channels, you must access the API as a User and use the 'user_scope' configuration. | key: selectChannels | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Include IM channels? | When true, includes IM channels in results. | false |
| Include multi-party IM (mpim) channels? | When true, includes multi-party IM channels in results. | false |
| Include private channels? | When true, includes private channels in results. | false |
| Include public channels? | When true, includes public channels in results. | true |
| Show channel ID in dropdown? | Show '#my-channel' vs. '#my-channel (ID: C123456)' | false |
{
"result": [
{
"key": "C123456",
"label": "#general (ID: C123456)"
},
{
"key": "C000000",
"label": "#other-channel (ID: C000000)"
},
{
"key": "C555555",
"label": "#random (ID: C555555)"
}
]
}
Select User
Select a User from a dropdown menu (up to 10,000 users) | key: selectUsers | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Show user ID in dropdown? | Show '#user-id' vs. '#user-id (ID: C123456)' | false |
{
"result": [
{
"key": "C123456",
"label": "Jhon (ID: C123456)"
},
{
"key": "C000000",
"label": "Doe (ID: C000000)"
}
]
}
Actions
Archive Conversation
Archive an existing conversation | key: archiveConversation
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. |
{
"data": {
"ok": true
}
}
Close Conversation
Close an existing conversation | key: closeConversation
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Conversation Name | The name of the Slack conversation. | Book Club |
{
"data": {
"ok": true,
"no_op": true,
"already_closed": true
}
}
Conversation Exists
Returns true if the conversation already exists | key: conversationExists
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. |
{
"data": true
}
Create Conversation
Create a new conversation | key: createConversation
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Conversation Name | The name of the Slack conversation. | Book Club |
| Is Private | When true, the Slack conversation will be private. | false |
| Team ID | The ID of the Slack team. | T1234567890 |
{
"data": {
"ok": true,
"channels": [
{
"id": "COZ7e3d",
"name": "example channel",
"is_channel": true,
"is_group": false,
"is_im": false,
"is_private": false,
"is_archived": false,
"created": 6426934241,
"creator": "example",
"unlinked": 0,
"name_normalized": "example channel",
"shared_team_ids": [
"TW2oP78"
],
"purpose": {
"value": "This channel was created for an example response."
}
}
]
}
}
Delete Message
Delete the content and metadata of an existing message | key: deleteMessage
| Input | Notes | Example |
|---|---|---|
| Channel ID | The static ID of the Slack channel. | C02MS7HV6KB |
| Connection | The Slack connection to use. | |
| Message ID | A unique identifier of a message or thread to reply to (thread_ts) | 1503435956.000247 |
{
"data": {
"ok": true,
"channel": "C123ABC456",
"ts": "1401383885.000061"
}
}
Delete Pending Scheduled Message
Delete the content and metadata of a pending scheduled message from a queue | key: deletePendingMessage
| Input | Notes | Example |
|---|---|---|
| Channel ID | The static ID of the Slack channel. | C02MS7HV6KB |
| Connection | The Slack connection to use. | |
| Message ID | A unique identifier of a message or thread to reply to (thread_ts) | 1503435956.000247 |
{
"data": {
"ok": true
}
}
Get Conversation History
Get the history of a conversation | key: getConversationsHistory
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. | |
| Cursor | The pagination cursor from a previous request. | 3 |
| Fetch All | When true, fetches all pages of results. | false |
| Include All Metadata | When true, includes all metadata in results. | false |
| Inclusive | Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified | false |
| Latest | Only messages before this Unix timestamp will be included in results. Default is current time. | |
| Limit | The maximum number of results to return. | 80 |
| Oldest | Only messages after this Unix timestamp will be included in results |
{
"data": {
"ok": true,
"messages": [
{
"client_msg_id": "123123-123123-123123",
"type": "message",
"text": "hello world",
"user": "U01QFFSE2QK",
"ts": "166149417.178179",
"team": "TH0GJM0M8"
}
]
}
}
Get User By Email
Get a user's information by email | key: getUser
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
Provide a string value for the email address of the user. | someone@example.com |
{
"data": {
"ok": true,
"user": {
"id": "example",
"color": "example",
"deleted": false,
"real_name": "Example User",
"name": "Example User",
"tz": "America/Chicago",
"profile": {
"title": "example",
"phone": "example",
"skype": "example",
"real_name": "Slackbots",
"real_name_normalized": "example",
"first_name": "example",
"email": "example",
"team": "example",
"display_name": "example"
}
}
}
}
Get User By ID
Get a user's information by ID | key: getUserById
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| User ID | Provide a string value for the unique identifier of the user you want to send the message to. | U1234567890 |
{
"data": {
"ok": true,
"user": {
"id": "example",
"color": "example",
"deleted": false,
"real_name": "Example User",
"name": "Example User",
"tz": "America/Chicago",
"profile": {
"title": "example",
"phone": "example",
"skype": "example",
"real_name": "Slackbots",
"real_name_normalized": "example",
"first_name": "example",
"email": "example",
"team": "example",
"display_name": "example"
}
}
}
}
Invite User To Conversation
Invite a user to an existing conversation | key: inviteUserToConversation
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. | |
| User ID | Provide a string value for the unique identifier of the user you want to send the message to. | U1234567890 |
{
"data": {
"ok": true,
"channel": {
"id": "C012AB3CD",
"name": "general",
"is_channel": true,
"is_group": false,
"is_im": false,
"created": 1449252889,
"creator": "W012A3BCD",
"is_archived": false,
"is_general": true,
"unlinked": 0,
"name_normalized": "general",
"is_read_only": false,
"is_shared": false,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"is_pending_ext_shared": false,
"is_member": true,
"is_private": false,
"is_mpim": false,
"last_read": "1502126650.228446",
"topic": {
"value": "For public discussion of generalities",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"purpose": {
"value": "This part of the workspace is for fun. Make fun here.",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"previous_names": [
"specifics",
"abstractions",
"etc"
]
}
}
}
Leave Conversation
Leave an existing conversation | key: leaveConversation
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. |
{
"data": {
"ok": true,
"not_in_channel": true
}
}
List Conversation Members
List all members of a conversation | key: listConversationMembers
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. | |
| Cursor | The pagination cursor from a previous request. | 3 |
| Fetch All | When true, fetches all pages of results. | false |
| Limit | The maximum number of results to return. | 80 |
{
"data": {
"ok": true,
"members": [
"U023BECGF",
"U061F7AUR",
"W012A3CDE"
],
"response_metadata": {
"next_cursor": "e3VzZXJfaWQ6IFcxMjM0NTY3fQ=="
}
}
}
List Conversations
List all conversations | key: listConversations
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Cursor | The pagination cursor from a previous request. | 3 |
| Exclude Archived | When true, archived results will be excluded from the result set. | false |
| Fetch All | When true, fetches all pages of results. | false |
| Include IM channels? | When true, includes IM channels in results. | false |
| Include multi-party IM (mpim) channels? | When true, includes multi-party IM channels in results. | false |
| Include private channels? | When true, includes private channels in results. | false |
| Include public channels? | When true, includes public channels in results. | true |
| Limit | The maximum number of results to return. | 80 |
| Team ID | The ID of the Slack team. | T1234567890 |
{
"data": {
"ok": true,
"channels": [
{
"id": "COZ7e3d",
"name": "example channel",
"is_channel": true,
"is_group": false,
"is_im": false,
"is_private": false,
"is_archived": false,
"created": 6426934241,
"creator": "example",
"unlinked": 0,
"name_normalized": "example channel",
"shared_team_ids": [
"TW2oP78"
],
"purpose": {
"value": "This channel was created for an example response."
}
}
]
}
}
List Files
List all available files | key: listFiles
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Cursor | The pagination cursor from a previous request. | 3 |
| Fetch All | When true, fetches all pages of results. | false |
{
"data": {
"ok": true,
"files": [
{
"id": "F0S43P1CZ",
"created": 1531763254,
"timestamp": 1531763254,
"name": "billair.gif",
"title": "billair.gif",
"mimetype": "image/gif",
"filetype": "gif",
"pretty_type": "GIF",
"user": "U061F7AUR",
"editable": false,
"size": 144538,
"mode": "hosted",
"is_external": false,
"external_type": "",
"is_public": true,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
"url_private": "https://.../billair.gif",
"url_private_download": "https://.../billair.gif",
"thumb_64": "https://.../billair_64.png",
"thumb_80": "https://.../billair_80.png",
"thumb_360": "https://.../billair_360.png",
"thumb_360_w": 176,
"thumb_360_h": 226,
"thumb_160": "https://.../billair_=_160.png",
"thumb_360_gif": "https://.../billair_360.gif",
"image_exif_rotation": 1,
"original_w": 176,
"original_h": 226,
"deanimate_gif": "https://.../billair_deanimate_gif.png",
"pjpeg": "https://.../billair_pjpeg.jpg",
"permalink": "https://.../billair.gif",
"permalink_public": "https://.../...",
"channels": [
"C0T8SE4AU"
],
"groups": [],
"ims": [],
"comments_count": 0
},
{
"id": "F0S43P1CZ",
"created": 1531763254,
"timestamp": 1531763254,
"name": "billair.gif",
"title": "billair.gif",
"mimetype": "image/gif",
"filetype": "gif",
"pretty_type": "GIF",
"user": "U061F7AUR",
"editable": false,
"size": 144538,
"mode": "hosted",
"is_external": false,
"external_type": "",
"is_public": true,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
"url_private": "https://.../billair.gif",
"url_private_download": "https://.../billair.gif",
"thumb_64": "https://.../billair_64.png",
"thumb_80": "https://.../billair_80.png",
"thumb_360": "https://.../billair_360.png",
"thumb_360_w": 176,
"thumb_360_h": 226,
"thumb_160": "https://.../billair_=_160.png",
"thumb_360_gif": "https://.../billair_360.gif",
"image_exif_rotation": 1,
"original_w": 176,
"original_h": 226,
"deanimate_gif": "https://.../billair_deanimate_gif.png",
"pjpeg": "https://.../billair_pjpeg.jpg",
"permalink": "https://.../billair.gif",
"permalink_public": "https://.../...",
"channels": [
"C0T8SE4AU"
],
"groups": [],
"ims": [],
"comments_count": 0
}
],
"paging": {
"count": 100,
"total": 2,
"page": 1,
"pages": 1
}
}
}
List Scheduled Messages
List all scheduled messages | key: listScheduledMessages
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. |
{
"data": {
"ok": true,
"scheduled_messages": [
{
"id": 1298393284,
"channel_id": "C1H9RESGL",
"post_at": 1551991428,
"date_created": 1551891734,
"text": "Here's a message for you in the future"
}
],
"response_metadata": {
"next_cursor": ""
}
}
}
List Users
List all users in the workspace. | key: listUsers
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Cursor | The pagination cursor from a previous request. | 3 |
| Fetch All | When true, fetches all pages of results. | false |
| Limit | The maximum number of results to return. | 80 |
| Team ID | The ID of the Slack team. | T1234567890 |
{
"data": {
"ok": true,
"members": [
{
"id": "Exmple",
"team_id": "34700c09vs0zx",
"name": "Example",
"deleted": false,
"color": "37373",
"profile": {
"title": "example",
"phone": "example",
"skype": "example",
"real_name": "Slackbots",
"real_name_normalized": "example",
"always_active": true,
"first_name": "example",
"email": "example",
"team": "example",
"display_name": "example"
}
}
],
"response_metadata": {
"next_cursor": "",
"scopes": [
"admin",
"idetify",
"channels:read"
]
}
}
}
List Users Conversations
List all conversations for a user. | key: listUsersConversations
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Cursor | The pagination cursor from a previous request. | 3 |
| Fetch All | When true, fetches all pages of results. | false |
| Limit | The maximum number of results to return. | 80 |
| Team ID | The ID of the Slack team. | T1234567890 |
| User ID | Provide a string value for the unique identifier of the user you want to send the message to. | U1234567890 |
{
"data": {
"ok": true,
"channels": [
{
"id": "COZ7e3d",
"name": "example channel",
"is_channel": true,
"is_group": false,
"is_im": false,
"is_private": false,
"is_archived": false,
"created": 6426934241,
"creator": "example",
"unlinked": 0,
"name_normalized": "example channel",
"shared_team_ids": [
"TW2oP78"
],
"purpose": {
"value": "This channel was created for an example response."
}
}
]
}
}
Open View
Open a view for a user. | key: openView
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Trigger ID | Exchange a trigger to post to the user. | 12345.98765.abcd2358fdea |
| View | A view payload (https://api.slack.com/reference/surfaces/views). This must be a JSON-encoded string. |
{
"data": {
"ok": true,
"view": {
"id": "VMHU10V25",
"team_id": "T8N4K1JN",
"type": "modal",
"title": {
"type": "plain_text",
"text": "Quite a plain modal"
},
"submit": {
"type": "plain_text",
"text": "Create"
},
"blocks": [
{
"type": "input",
"block_id": "a_block_id",
"label": {
"type": "plain_text",
"text": "A simple label",
"emoji": true
},
"optional": false,
"element": {
"type": "plain_text_input",
"action_id": "an_action_id"
}
}
],
"private_metadata": "Shh it is a secret",
"callback_id": "identify_your_modals",
"external_id": "",
"state": {
"values": {}
},
"hash": "156772938.1827394",
"clear_on_close": false,
"notify_on_close": false,
"root_view_id": "VMHU10V25",
"app_id": "AA4928AQ",
"bot_id": "BA13894H"
}
}
}
Post Block Message
Post a message to a slack channel | key: postBlockMessage
| Input | Notes | Example |
|---|---|---|
| Blocks | A JSON array containing blocks (objects) that make up the desired message. Use Slack's Block Kit Builder (https://app.slack.com/block-kit-builder/) to build block messages. | |
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. | |
| Alt Message | This message will override if your block cannot be sent | Hello from Acme! |
| Message ID | A unique identifier of a message or thread to reply to (thread_ts) | 1503435956.000247 |
| Bot Username | The username of the bot the message will be sent from. This requires the 'chat:write.customize' scope. | exampleUser |
{
"data": {
"ok": true,
"channel": "C011B7U3R9U",
"ts": "1646951430.367539",
"message": {
"type": "message",
"subtype": "bot_message",
"text": "The message I sent",
"ts": "1646951430.367539",
"username": "My Slack App",
"bot_id": "B036D2DCT54"
},
"response_metadata": {
"scopes": [
"identify",
"chat:write",
"chat:write.public",
"chat:write.customize"
],
"acceptedScopes": [
"chat:write"
]
}
}
}
Post Ephemeral Message
Post an ephemeral message to a user or channel | key: postEphemeralMessage
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. | |
| Message | The message to send the Slack channel. | Hello from Acme! |
| User ID | Provide a string value for the unique identifier of the user you want to send the message to. | U1234567890 |
| Bot Username | The username of the bot the message will be sent from. This requires the 'chat:write.customize' scope. | exampleUser |
{
"data": {
"ok": true,
"message_ts": "1502210682.580145"
}
}
Post Message
Post a message to a slack channel | key: postMessage
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. | |
| Message | The message to send the Slack channel. | Hello from Acme! |
| Message ID | A unique identifier of a message or thread to reply to (thread_ts) | 1503435956.000247 |
| Bot Username | The username of the bot the message will be sent from. This requires the 'chat:write.customize' scope. | exampleUser |
{
"data": {
"ok": true,
"channel": "C011B7U3R9U",
"ts": "1646951430.367539",
"message": {
"type": "message",
"subtype": "bot_message",
"text": "The message I sent",
"ts": "1646951430.367539",
"username": "My Slack App",
"bot_id": "B036D2DCT54"
},
"response_metadata": {
"scopes": [
"identify",
"chat:write",
"chat:write.public",
"chat.write.customize"
],
"acceptedScopes": [
"chat:write"
]
}
}
}
Publish View
Publish a static view for a User. | key: publishView
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| User ID | Provide a string value for the unique identifier of the user you want to send the message to. | U1234567890 |
| View | A view payload (https://api.slack.com/reference/surfaces/views). This must be a JSON-encoded string. |
{
"data": {
"ok": true,
"view": {
"id": "VMHU10V25",
"team_id": "T8N4K1JN",
"type": "home",
"close": null,
"submit": null,
"blocks": [
{
"type": "section",
"block_id": "2WGp9",
"text": {
"type": "mrkdwn",
"text": "A simple section with some sample sentence.",
"verbatim": false
}
}
],
"private_metadata": "Shh it is a secret",
"callback_id": "identify_your_home_tab",
"state": {
"values": {}
},
"hash": "156772938.1827394",
"clear_on_close": false,
"notify_on_close": false,
"root_view_id": "VMHU10V25",
"previous_view_id": null,
"app_id": "AA4928AQ",
"external_id": "",
"bot_id": "BA13894H"
}
}
}
Push View
Push a view onto the stack of a root view. | key: pushView
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Trigger ID | Exchange a trigger to post to the user. | 12345.98765.abcd2358fdea |
| View | A view payload (https://api.slack.com/reference/surfaces/views). This must be a JSON-encoded string. |
{
"data": {
"ok": true,
"view": {
"id": "VMHU10V25",
"team_id": "T8N4K1JN",
"type": "modal",
"title": {
"type": "plain_text",
"text": "Quite a plain modal"
},
"submit": {
"type": "plain_text",
"text": "Create"
},
"blocks": [
{
"type": "input",
"block_id": "a_block_id",
"label": {
"type": "plain_text",
"text": "A simple label",
"emoji": true
},
"optional": false,
"element": {
"type": "plain_text_input",
"action_id": "an_action_id"
}
}
],
"private_metadata": "Shh it is a secret",
"callback_id": "identify_your_modals",
"external_id": "",
"state": {
"values": {}
},
"hash": "156772938.1827394",
"clear_on_close": false,
"notify_on_close": false,
"root_view_id": "VMHU10V25",
"app_id": "AA4928AQ",
"bot_id": "BA13894H"
}
}
}
Raw Request
Send raw HTTP request to Slack | key: rawRequest
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} |
| File Data | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Form Data | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] |
| Header | A list of headers to send with the request. | User-Agent: curl/7.64.1 |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Method | The HTTP method to use. | |
| Query Parameter | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Retry On All Errors | If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. | false |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Timeout | The maximum time that a client will await a response to its request | 2000 |
| URL | Input the path only (/team.info), The base URL is already included (https://slack.com/api). For example, to connect to https://slack.com/api/team.info, only /team.info is entered in this field. | /team.info |
| Use Exponential Backoff | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. | false |
Rename Conversation
Rename an existing conversation | key: renameConversation
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Conversation Name | The name of the Slack conversation. | Book Club |
| New Conversation Name | The name of the Slack conversation. | Book Club |
{
"data": {
"ok": true,
"channel": {
"id": "C012AB3CD",
"name": "general",
"is_channel": true,
"is_group": false,
"is_im": false,
"created": 1449252889,
"creator": "W012A3BCD",
"is_archived": false,
"is_general": true,
"unlinked": 0,
"name_normalized": "general",
"is_read_only": false,
"is_shared": false,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"is_pending_ext_shared": false,
"is_member": true,
"is_private": false,
"is_mpim": false,
"last_read": "1502126650.228446",
"topic": {
"value": "For public discussion of generalities",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"purpose": {
"value": "This part of the workspace is for fun. Make fun here.",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"previous_names": [
"specifics",
"abstractions",
"etc"
],
"num_members": 23,
"locale": "en-US"
}
}
}
Search All
Searches for messages and files matching a query. | key: searchAll
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Count | Number of items to return per page. | 80 |
| Highlight | Pass a value of true to enable query highlight markers. | false |
| Page | Page number of results to return. | 1 |
| Query | Search query. May contain booleans, etc. | pickleface |
| Sort | The method to sort the results. For example, member_count will sort by the number of members in the channel. | score |
| Sort Direction | The direction to sort the results. For example, desc will sort the results in descending order. | desc |
| Team ID | Encoded team ID to search in, required if org token is used | T1234567890 |
{
"data": {
"files": {
"matches": [
{
"channels": [],
"comments_count": 1,
"created": 1508804330,
"display_as_bot": false,
"editable": false,
"external_type": "",
"filetype": "png",
"groups": [],
"id": "F7PKF1NR7",
"image_exif_rotation": 1,
"ims": [],
"initial_comment": {
"comment": "Sure! Here's the workflow diagram!",
"created": 1508804330,
"id": "Fc7NLL52E7",
"is_intro": true,
"timestamp": 1508804330,
"user": "U2U85N1RZ"
},
"is_external": false,
"is_public": true,
"mimetype": "image/png",
"mode": "hosted",
"name": "slack workflow diagram.png",
"original_h": 117,
"original_w": 128,
"permalink": "https://example.slack.com/files/U2U85N1RZ/F7PKF1NR7/slack_workflow_diagram.png",
"permalink_public": "https://slack-files.com/T2U81E2FZ-F7PKF1NR7-bea9143f18",
"pretty_type": "PNG",
"preview": null,
"public_url_shared": false,
"score": "0.99982661240974",
"size": 35705,
"thumb_160": "https://files.slack.com/files-tmb/T2U81E2FZ-F7PKF1NR7-19f33fc256/slack_workflow_diagram_160.png",
"thumb_360": "https://files.slack.com/files-tmb/T2U81E2FZ-F7PKF1NR7-19f33fc256/slack_workflow_diagram_360.png",
"thumb_360_h": 117,
"thumb_360_w": 128,
"thumb_64": "https://files.slack.com/files-tmb/T2U81E2FZ-F7PKF1NR7-19f33fc256/slack_workflow_diagram_64.png",
"thumb_80": "https://files.slack.com/files-tmb/T2U81E2FZ-F7PKF1NR7-19f33fc256/slack_workflow_diagram_80.png",
"timestamp": 1508804330,
"title": "slack workflow diagram",
"top_file": false,
"url_private": "https://files.slack.com/files-pri/T2U81E2FZ-F7PKF1NR7/slack_workflow_diagram.png",
"url_private_download": "https://files.slack.com/files-pri/T2U81E2FZ-F7PKF1NR7/download/slack_workflow_diagram.png",
"user": "U2U85N1RZ",
"username": "amy"
}
],
"pagination": {
"first": 1,
"last": 1,
"page": 1,
"page_count": 1,
"per_page": 20,
"total_count": 1
},
"paging": {
"count": 20,
"page": 1,
"pages": 1,
"total": 1
},
"total": 1
},
"messages": {
"matches": [
{
"channel": {
"id": "C2U86NC6M",
"is_ext_shared": false,
"is_mpim": false,
"is_org_shared": false,
"is_pending_ext_shared": false,
"is_private": false,
"is_shared": false,
"name": "general",
"pending_shared": []
},
"iid": "35692677-e60e-43d9-ac45-1987cea88975",
"next": {
"iid": "6f510ea1-e1d3-4f3f-bdb9-f9c6f6e9d609",
"text": "Thanks!",
"ts": "1508804378.000219",
"type": "message",
"user": "U2U85HJ7R",
"username": "john"
},
"permalink": "https://example.slack.com/archives/C2U86NC6M/p1508804330000296",
"previous": {
"iid": "aba8603c-0543-4fb2-9118-a5ac85f3d138",
"text": "Can you send me the Slack workflow diagram?",
"ts": "1508804301.000026",
"type": "message",
"user": "U2U85HJ7R",
"username": "john"
},
"team": "T2U81E2FZ",
"text": "uploaded a file: <https://example.slack.com/files/U2U85N1RZ/F7PKF1NR7/slack_workflow_diagram.png|slack workflow diagram> and commented: Sure! Here's the workflow diagram!",
"ts": "1508804330.000296",
"type": "message",
"user": "U2U85N1RZ",
"username": "amy"
}
],
"pagination": {
"first": 1,
"last": 1,
"page": 1,
"page_count": 1,
"per_page": 20,
"total_count": 1
},
"paging": {
"count": 20,
"page": 1,
"pages": 1,
"total": 1
},
"total": 1
},
"ok": true,
"posts": {
"matches": [],
"total": 0
},
"query": "diagram"
}
}
Search Files
Searches for files matching a query. | key: searchFiles
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Count | Number of items to return per page. | 80 |
| Highlight | Pass a value of true to enable query highlight markers. | false |
| Page | Page number of results to return. | 1 |
| Query | Search query. May contain booleans, etc. | pickleface |
| Sort | The method to sort the results. For example, member_count will sort by the number of members in the channel. | score |
| Sort Direction | The direction to sort the results. For example, desc will sort the results in descending order. | desc |
| Team ID | Encoded team ID to search in, required if org token is used | T1234567890 |
{
"data": {
"files": {
"matches": [
{
"channels": [],
"comments_count": 1,
"created": 1507850315,
"deanimate_gif": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_deanimate_gif.png",
"display_as_bot": false,
"editable": false,
"external_type": "",
"filetype": "gif",
"groups": [],
"id": "F7H0D7ZBB",
"image_exif_rotation": 1,
"ims": [],
"is_external": false,
"is_public": true,
"mimetype": "image/gif",
"mode": "hosted",
"name": "computer.gif",
"original_h": 313,
"original_w": 500,
"permalink": "https://eventsdemo.slack.com/files/U2U85N1RZ/F7H0D7ZBB/computer.gif",
"permalink_public": "https://slack-files.com/T2U81E2BB-F7H0D7ZBB-85b7f5557e",
"pretty_type": "GIF",
"preview": null,
"public_url_shared": false,
"reactions": [
{
"count": 1,
"name": "stuck_out_tongue_winking_eye",
"users": [
"U2U85N1RZ"
]
}
],
"score": "0.38899223746309",
"size": 1639034,
"thumb_160": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_160.png",
"thumb_360": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_360.png",
"thumb_360_gif": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_360.gif",
"thumb_360_h": 225,
"thumb_360_w": 360,
"thumb_480": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_480.png",
"thumb_480_gif": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_480.gif",
"thumb_480_h": 300,
"thumb_480_w": 480,
"thumb_64": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_64.png",
"thumb_80": "https://files.slack.com/files-tmb/T2U81E2BB-F7H0D7ZBB-21624821e6/computer_80.png",
"timestamp": 1507850315,
"title": "computer.gif",
"top_file": false,
"url_private": "https://files.slack.com/files-pri/T2U81E2BB-F7H0D7ZBB/computer.gif",
"url_private_download": "https://files.slack.com/files-pri/T2U81E2BB-F7H0D7ZBB/download/computer.gif",
"user": "U2U85N1RZ",
"username": ""
}
],
"pagination": {
"first": 1,
"last": 3,
"page": 1,
"page_count": 1,
"per_page": 20,
"total_count": 3
},
"paging": {
"count": 20,
"page": 1,
"pages": 1,
"total": 3
},
"total": 3
},
"ok": true,
"query": "computer.gif"
}
}
Search Messages
Searches for messages matching a query. | key: searchMessages
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Count | Number of items to return per page. | 80 |
| Highlight | Pass a value of true to enable query highlight markers. | false |
| Page | Page number of results to return. | 1 |
| Query | Search query. May contain booleans, etc. | pickleface |
| Sort | The method to sort the results. For example, member_count will sort by the number of members in the channel. | score |
| Sort Direction | The direction to sort the results. For example, desc will sort the results in descending order. | desc |
| Team ID | Encoded team ID to search in, required if org token is used | T1234567890 |
{
"data": {
"messages": {
"matches": [
{
"channel": {
"id": "C12345678",
"is_ext_shared": false,
"is_mpim": false,
"is_org_shared": false,
"is_pending_ext_shared": false,
"is_private": false,
"is_shared": false,
"name": "general",
"pending_shared": []
},
"iid": "cb64bdaa-c1e8-4631-8a91-0f78080113e9",
"permalink": "https://hitchhikers.slack.com/archives/C12345678/p1508284197000015",
"team": "T12345678",
"text": "The meaning of life the universe and everything is 42.",
"ts": "1508284197.000015",
"type": "message",
"user": "U2U85N1RV",
"username": "roach"
},
{
"channel": {
"id": "C12345678",
"is_ext_shared": false,
"is_mpim": false,
"is_org_shared": false,
"is_pending_ext_shared": false,
"is_private": false,
"is_shared": false,
"name": "random",
"pending_shared": []
},
"iid": "9a00d3c9-bd2d-45b0-988b-6cff99ae2a90",
"permalink": "https://hitchhikers.slack.com/archives/C12345678/p1508795665000236",
"team": "T12345678",
"text": "The meaning of life the universe and everything is 101010",
"ts": "1508795665.000236",
"type": "message",
"user": "",
"username": "robot overlord"
}
],
"pagination": {
"first": 1,
"last": 2,
"page": 1,
"page_count": 1,
"per_page": 20,
"total_count": 2
},
"paging": {
"count": 20,
"page": 1,
"pages": 1,
"total": 2
},
"total": 2
},
"ok": true,
"query": "The meaning of life the universe and everything"
}
}
Set Conversation Purpose
Set the purpose of an existing conversation | key: setConversationPurpose
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. | |
| Conversation Purpose | Provide a string value for the purpose of the given conversation. | Engineering |
{
"data": {
"ok": true
}
}
Set Conversation Topic
Set the topic of an existing conversation | key: setConversationTopic
| Input | Notes | Example |
|---|---|---|
| Channel Name or ID | The name or static ID of the Slack channel. | general |
| Connection | The Slack connection to use. | |
| Conversation Topic | Provide a string value for the topic of the given conversation. | Engineering |
| User ID | Provide a string value for the unique identifier of the user you want to send the message to. | U1234567890 |
{
"data": {
"ok": true,
"channel": {
"id": "C012AB3CD",
"name": "general",
"is_channel": true,
"is_group": false,
"is_im": false,
"created": 1449252889,
"creator": "W012A3BCD",
"is_archived": false,
"is_general": true,
"unlinked": 0,
"name_normalized": "general",
"is_read_only": false,
"is_shared": false,
"is_ext_shared": false,
"is_org_shared": false,
"pending_shared": [],
"is_pending_ext_shared": false,
"is_member": true,
"is_private": false,
"is_mpim": false,
"last_read": "1502126650.228446",
"topic": {
"value": "For public discussion of generalities",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"purpose": {
"value": "This part of the workspace is for fun. Make fun here.",
"creator": "W012A3BCD",
"last_set": 1449709364
},
"previous_names": [
"specifics",
"abstractions",
"etc"
]
}
}
}
Slack Block Message From Webhook
Post a block formatted message to a Slack channel from a webhook URL | key: postWebhookBlockMessage
| Input | Notes | Example |
|---|---|---|
| Blocks | A JSON array containing blocks (objects) that make up the desired message. Use Slack's Block Kit Builder (https://app.slack.com/block-kit-builder/) to build block messages. | |
| Connection | The Slack connection to use. | |
| Alt Message | This message will override if your block cannot be sent | Hello from Acme! |
{
"data": {
"text": "ok"
}
}
Slack Message From Webhook
Post a message to a Slack channel from a webhook URL | key: postSlackMessage
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| Message | The message to send the Slack channel. | Hello from Acme! |
{
"data": {
"text": "ok"
}
}
Update Message
Update the contents of an existing message | key: updateMessage
| Input | Notes | Example |
|---|---|---|
| Channel ID | The static ID of the Slack channel. | C02MS7HV6KB |
| Connection | The Slack connection to use. | |
| Message | The message to send the Slack channel. | Hello from Acme! |
| Message ID | A unique identifier of a message or thread to reply to (thread_ts) | 1503435956.000247 |
{
"data": {
"ok": true,
"channel": "C123ABC456",
"ts": "1401383885.000061",
"text": "Updated text you carefully authored",
"message": {
"text": "Updated text you carefully authored",
"user": "U34567890"
}
}
}
Update View
Update an existing view. | key: updateView
| Input | Notes | Example |
|---|---|---|
| Connection | The Slack connection to use. | |
| External ID | A unique identifier of the view to be updated. Either view_id or external_id is required. | bmarley_view2 |
| View | A view payload (https://api.slack.com/reference/surfaces/views). This must be a JSON-encoded string. | |
| View ID | A unique identifier of the view to be updated. Either view_id or external_id is required. | VMM512F2U |
{
"data": {
"ok": true,
"view": {
"id": "VMHU10V25",
"team_id": "T8N4K1JN",
"type": "modal",
"title": {
"type": "plain_text",
"text": "Quite a plain modal"
},
"submit": {
"type": "plain_text",
"text": "Create"
},
"blocks": [
{
"type": "input",
"block_id": "a_block_id",
"label": {
"type": "plain_text",
"text": "A simple label",
"emoji": true
},
"optional": false,
"element": {
"type": "plain_text_input",
"action_id": "an_action_id"
}
}
],
"private_metadata": "Shh it is a secret",
"callback_id": "identify_your_modals",
"external_id": "",
"state": {
"values": {}
},
"hash": "156772938.1827394",
"clear_on_close": false,
"notify_on_close": false,
"root_view_id": "VMHU10V25",
"app_id": "AA4928AQ",
"bot_id": "BA13894H"
}
}
}
Upload File
Upload a new file to a slack conversation | key: uploadFile
| Input | Notes | Example |
|---|---|---|
| Channels | Provide a comma separated list of channel IDs that the file will be shared in. | C02B0APBKP1, C02B0APBKP2, C02B0APBKP3 |
| Connection | The Slack connection to use. | |
| File Content | Provide the data for a file to be uploaded | |
| File Name | Provide a name for the file. | reports.csv |
| Initial Comment | The message text introducing the file in the specified channels when uploaded | Example message |
| Thread Reply | Provide another message's ts value to upload this file as a reply. Never use a reply's ts value, use the parent instead. | u830hd230 |
| File Title | The title of the file as it will appear in the channel | Monthly Reports |
{
"data": {
"ok": true,
"file": {
"id": "F0TD0GUTS",
"created": 1532294750,
"timestamp": 1532294750,
"name": "-.txt",
"title": "Untitled",
"mimetype": "text/plain",
"filetype": "text",
"pretty_type": "Plain Text",
"user": "U0L4B9NSU",
"editable": true,
"size": 11,
"mode": "snippet",
"is_external": false,
"external_type": "",
"is_public": true,
"public_url_shared": false,
"display_as_bot": false,
"username": "",
"url_private": "https://.../.txt",
"url_private_download": "https://...download/-.txt",
"permalink": "https://.../.txt",
"permalink_public": "https://.../.txt",
"edit_link": "https://.../.txt/edit",
"preview": "launch plan",
"preview_highlight": "<div class=\"CodeMirror cm-s-default CodeMirrorServer\" oncopy=\"if(event.clipboardData){event.clipboardData.setData('text/plain',window.getSelection().toString().replace(/\\u200b/g,''));event.preventDefault();event.stopPropagation();}\">\n<div class=\"CodeMirror-code\">\n<div><pre>launch plan</pre></div>\n</div>\n</div>\n",
"lines": 1,
"lines_more": 0,
"preview_is_truncated": false,
"comments_count": 0,
"is_starred": false,
"shares": {
"public": {
"C061EG9SL": [
{
"reply_users": [],
"reply_users_count": 0,
"reply_count": 0,
"ts": "1532294750.000001",
"channel_name": "general",
"team_id": "T061EG9R6"
}
]
}
},
"channels": [
"C061EG9SL"
],
"groups": [],
"ims": [],
"has_rich_preview": false
}
}
}
Changelog
2026-02-02
Improved channel fetching for List Conversations action and Select Channel data source:
- Refactored to fetch channels by type (public, private, IM, multi-party IM) separately for more reliable results
- Improved pagination handling when fetching large channel lists with mixed types
2025-11-19
Enhanced webhook triggers to support simulated test executions
2025-04-25
Added inline data sources for improved data selection and integration capabilities