Slack
Slack is a cloud-based messaging and collaboration platform that enables teams to communicate, share files, and integrate with other tools in real time.
Slack is a leading collaboration and messaging platform that enables teams to communicate, share files, and manage projects in real time. The Slack connector for Swimlane Turbine allows users to automate messaging, channel management, and user administration directly within their security workflows. With this integration, security teams can send alerts, manage channels, retrieve user and message data, and coordinate incident response without leaving the Swimlane platform. Automating Slack interactions streamlines communication, accelerates response times, and ensures critical security events are promptly shared with the right stakeholders.
Prerequisites
Before using the Slack connector, ensure you have the following prerequisites in place:
- API Key authentication using these parameters:
- URL: The base URL for your Slack workspace's API endpoint.
- API Key: A valid Slack API key or token with appropriate permissions.
- HTTP Bearer Token authentication using these parameters:
- URL: The base URL for your Slack workspace's API endpoint.
- Token: A bearer token (such as a JWT or OAuth access token) authorized for Slack API access.
Capabilities
The Slack Connector has the following capabilities:
- Create, archive, and retrieve history of conversations
- Get Message Permalink
- Invite and remove users from a conversation
- Retrieve current users in a conversation
- Send broadcast messages
- Post a message to a channel, thread, or direct message
- Lookup by Email
Asset Setup
The asset for this connector requires the following inputs:
- API Token - Bot or User Token
To set up a Slack Bot OAUTH API with the appropriate permissions follow these steps:
- Go to the Slack API website: https://api.slack.com/.
- Click on "Your Apps" in the top-right corner and then click on "Create New App."
- Provide a name for your app and select the Slack workspace where you want to install the app.
- Once the app is created, you'll be redirected to the app's settings page.
- From the app's settings page, navigate to "OAuth & Permissions".
- Under the "Scopes" section for "Bot Token Scopes", add the necessary scopes for the API calls:
- chatβοΈ This scope allows your app to send messages to channels and conversations.
- channelsποΈ This scope grants access to conversation history in public channels.
- channelsπ΄ This scope allows your app to invite users to public channels.
- channels:manage: This scope grants the ability to manage public channels, including archiving, inviting, and kicking users.
- channelsπ This scope provides access to channel and conversation information.
- chat:write.customize: This scope allows your app to customize messages with blocks and attachments.
- groupsβοΈ This scope allows your app to create new channels
- groupsποΈ This scope grants access to conversation history in private channels.
- groupsπ This scope provides access to private channel information.
- imποΈ This scope grants access to conversation history in direct messages.
- mpimποΈ This scope allows your app to view messages and other content in group direct messages that your Slack app has been added to.
- imπ This scope provides access to direct message channel information.
- usersπ This scope allows your app to retrieve user information. ... and so on
Install the app to your workspace:
- In the app's settings page, go to "OAuth & Permissions".
- Scroll down to the "OAuth Tokens for Your Workspace" section and click on the "Install App to Workspace" button.
- Authorize the app to access your Slack workspace by following the prompts.
Obtain your access tokens:
- After installing the app, you'll be provided with access tokens such as "Bot User OAuth Access Token".
Notes
See the following topics for more about User and Bot OAuth Tokens:
This connector was last tested against product version: 4.12.0
Additional Notes
- For LookUp by Email action, please set the scope parameter to users:read.email .
Configurations
API Key Authentication
Authenticates using an API Key
Configuration Parameters
Parameter | Description | Type | Required |
|---|---|---|---|
url | A URL to the target host. | string | Required |
token | API key | string | Required |
verify_ssl | Verify SSL certificate | boolean | Optional |
http_proxy | A proxy to route requests through. | string | Optional |
HTTP Bearer Authentication
Authenticates using bearer token such as a JWT, etc.
Configuration Parameters
Parameter | Description | Type | Required |
|---|---|---|---|
url | A URL to the target host. | string | Required |
token | The API key, token, etc. | string | Required |
verify_ssl | Verify SSL certificate | boolean | Optional |
http_proxy | A proxy to route requests through. | string | Optional |
Actions
Broadcast Message
Post a message to a Slack channel or reply in a thread by specifying the channel ID and, optionally, the parent message timestamp.
Endpoint
- URL: api/chat.postMessage/
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
channel | string | Required | The channel to send the message to. To use the channel name, use /# |
title | string | Optional | Parameter for Broadcast Message |
reply_broadcast | string | Optional | Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. |
mrkdwn | string | Optional | Disable Slack markup parsing by setting to false. |
username | string | Optional | Set your bot's user name. |
markdown_text | string | Optional | Accepts message text formatted in markdown. |
parse | string | Optional | Change how messages are treated. |
current_draft_last_updated_ts | string | Optional | This field represents the timestamp of the draft's last update at the time this API is called. I |
link_names | string | Optional | Find and link user groups. |
text | string | Optional | How this field works and whether it is required depends on other fields you use in your API call. |
thread_ts | string | Optional | Provide another message's ts value to make this message a reply. |
unfurl_links | string | Optional | Pass true to enable unfurling of primarily text-based content. |
unfurl_media | string | Optional | Pass false to disable unfurling of media content. |
metadata | object | Optional | JSON object with event_type and event_payload fields, presented as a URL-encoded string. |
icon_url | string | Optional | URL to an image to use as the icon for this message. |
icon_emoji | string | Optional | Emoji to use as the icon for this message. |
attachments | array | Optional | A JSON-based array of structured attachments, presented as a URL-encoded string. |
attachments.pretext | string | Optional | Parameter for Broadcast Message |
attachments.text | string | Optional | Parameter for Broadcast Message |
blocks | array | Optional | A JSON-based array of structured blocks, presented as a URL-encoded string. |
blocks.type | string | Optional | Type of the resource |
blocks.text | object | Optional | Parameter for Broadcast Message |
blocks.text.type | string | Optional | Type of the resource |
blocks.text.text | string | Optional | Parameter for Broadcast Message |
blocks.fields | array | Optional | Parameter for Broadcast Message |
Input Example
{"channel":"C04J0U2RUMT","metadata":{},"attachments":[{"pretext":"pre-hello","text":"text-world"}],"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"SOC Alert: *<https://soc.dev.services.us-east-1.aws.swimlane.io/integration%7CSwimlane SOC - New device request>*"}},{"type":"section","fields":[{"type":"mrkdwn","text":"*Who:*\[email protected]"},{"type":"mrkdwn","text":"*What:* Review user activity. Rene van Zijl performed login activity from a rarely observed country (Spain)"},{"type":"mrkdwn","text":"*When:*\n2022-08-07T09:06:00Z"},{"type":"mrkdwn","text":"*Why:*\nUser login activity from a rare country"}]},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","emoji":true,"text":"Authorized Activity"},"style":"primary","value":"authorized_activity"},{"type":"button","text":{"type":"plain_text","text":"Unknown"},"style":"danger","value":"unknown"}]}]}
Output
Parameter | Type | Description |
|---|---|---|
headers | object | HTTP headers for the request |
reason | string | Response reason phrase |
status_code | number | HTTP status code of the response |
channel | string | Output field: channel |
ts | string | Output field: ts |
message | object | Response message |
message.bot_id | string | Unique identifier |
message.type | string | Type of the resource |
message.text | string | Response message |
message.user | string | Response message |
message.ts | string | Response message |
message.app_id | string | Unique identifier |
message.blocks | array | Response message |
message.blocks.type | string | Type of the resource |
message.blocks.block_id | string | Unique identifier |
message.blocks.text | object | Response message |
message.blocks.text.type | string | Type of the resource |
message.blocks.text.text | string | Response message |
message.blocks.text.verbatim | boolean | Response message |
message.blocks.fields | array | Response message |
message.blocks.fields.type | string | Type of the resource |
message.blocks.fields.text | string | Response message |
message.blocks.fields.verbatim | boolean | Response message |
message.blocks.elements | array | Response message |
message.blocks.elements.type | string | Type of the resource |
Output Example
{"channel":"string","ts":"string","message":{"bot_id":"string","type":"string","text":"string","user":"string","ts":"string","app_id":"string","blocks":[{}],"team":"string","bot_profile":{"id":"12345678-1234-1234-1234-123456789abc","app_id":"string","name":"Example Name","icons":{},"deleted":true,"updated":123,"team_id":"string"}}}
Conversations Archive
Archive a specified Slack channel by providing the channel ID to remove it from active conversations.
Endpoint
- URL: api/conversations.archive
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.channel | string | Required | Parameters for the Conversations Archive action |
Input Example
{"parameters":{"channel":"C0E7PH2NS"}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
error | string | Error message if any |
Output Example
{"status_code":200,"response_headers":{"date":"Fri, 16 Dec 2022 15:18:40 GMT","server":"Apache","x-powered-by":"HHVM/4.153.1","access-control-allow-origin":"*","referrer-policy":"no-referrer","x-slack-backend":"r","x-slack-unique-id":"Y5yMUDFht5tyqlxLCMOeoQAAEBg","strict-transport-security":"max-age=31536000; includeSubDomains; preload","access-control-allow-headers":"slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x...","access-control-expose-headers":"x-slack-req...
Conversations Create
Create a new public or private channel in Slack by specifying the desired channel name.
Endpoint
- URL: api/conversations.create
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.name | string | Required | Parameters for the Conversations Create action |
parameters.is_private | boolean | Optional | Parameters for the Conversations Create action |
Input Example
{"parameters":{"name":"test_channel23","is_private":false}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
channel | object | Output field: channel |
channel.id | string | Unique identifier |
channel.name | string | Name of the resource |
channel.is_channel | boolean | Output field: channel.is_channel |
channel.is_group | boolean | Output field: channel.is_group |
channel.is_im | boolean | Output field: channel.is_im |
channel.is_mpim | boolean | Output field: channel.is_mpim |
channel.is_private | boolean | Output field: channel.is_private |
channel.created | number | Output field: channel.created |
channel.is_archived | boolean | Output field: channel.is_archived |
channel.is_general | boolean | Output field: channel.is_general |
channel.unlinked | number | Output field: channel.unlinked |
channel.name_normalized | string | Name of the resource |
channel.is_shared | boolean | Output field: channel.is_shared |
channel.is_org_shared | boolean | Output field: channel.is_org_shared |
channel.is_pending_ext_shared | boolean | Output field: channel.is_pending_ext_shared |
channel.pending_shared | array | Output field: channel.pending_shared |
channel.pending_shared.file_name | string | Name of the resource |
channel.pending_shared.file | string | Output field: channel.pending_shared.file |
channel.context_team_id | string | Unique identifier |
channel.updated | number | Output field: channel.updated |
channel.parent_conversation | object | Output field: channel.parent_conversation |
Output Example
{"status_code":200,"response_headers":{"date":"Fri, 16 Dec 2022 14:33:36 GMT","server":"Apache","x-powered-by":"HHVM/4.153.1","access-control-allow-origin":"*","referrer-policy":"no-referrer","x-slack-backend":"r","x-slack-unique-id":"Y5yBwKgib4832auTRSYC9gAAAC4","strict-transport-security":"max-age=31536000; includeSubDomains; preload","access-control-allow-headers":"slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x...","access-control-expose-headers":"x-slack-req...
Conversations History
Retrieve messages and events from a specific Slack channel using its unique identifier and optional parameters.
Endpoint
- URL: api/conversations.history
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.channel | string | Required | Parameters for the Conversations History action |
parameters.include_all_metadata | boolean | Optional | Parameters for the Conversations History action |
parameters.inclusive | boolean | Optional | Parameters for the Conversations History action |
parameters.limit | number | Optional | Parameters for the Conversations History action |
parameters.cursor | string | Optional | Parameters for the Conversations History action |
Input Example
{"parameters":{"channel":"C0E7PH2NS","include_all_metadata":true,"inclusive":true,"limit":2,"cursor":""}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
messages | array | Response message |
messages.type | string | Type of the resource |
messages.user | string | Response message |
messages.text | string | Response message |
messages.ts | string | Response message |
messages.attachments | array | Response message |
messages.attachments.service_name | string | Name of the resource |
messages.attachments.text | string | Response message |
messages.attachments.fallback | string | Response message |
messages.attachments.thumb_url | string | URL endpoint for the request |
messages.attachments.thumb_width | number | Unique identifier |
messages.attachments.thumb_height | number | Response message |
messages.attachments.id | number | Unique identifier |
has_more | boolean | Output field: has_more |
pin_count | number | Count value |
response_metadata | object | Response data |
response_metadata.next_cursor | string | Response data |
Output Example
{"ok":true,"messages":[{"type":"string","user":"string","text":"string","ts":"string","attachments":[]}],"has_more":true,"pin_count":123,"response_metadata":{"next_cursor":"string"}}
Conversations Invite
Invite specified users to a Slack channel by providing the channel ID and user identifiers.
Endpoint
- URL: api/conversations.invite
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.channel | string | Required | The ID of the public or private channel to invite user(s) to. |
parameters.users | string | Required | A comma separated list of user IDs. Up to 100 users may be listed. |
parameters.force | boolean | Optional | When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false. |
Input Example
{"parameters":{"channel":"C0E7PH2NS","user":"USLACKBOT"}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
error | string | Error message if any |
Output Example
{"status_code":200,"response_headers":{"date":"Fri, 16 Dec 2022 15:14:14 GMT","server":"Apache","x-powered-by":"HHVM/4.153.1","access-control-allow-origin":"*","referrer-policy":"no-referrer","x-slack-backend":"r","x-slack-unique-id":"Y5yLRuVNB3Xwd5FZ_yySUQAAEAE","strict-transport-security":"max-age=31536000; includeSubDomains; preload","access-control-allow-headers":"slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x...","access-control-expose-headers":"x-slack-req...
Conversations Kick
Remove a specified user from a Slack channel by providing the required channel and user identifiers.
Endpoint
- URL: api/conversations.kick
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.channel | string | Required | Parameters for the Conversations Kick action |
parameters.user | string | Required | Parameters for the Conversations Kick action |
Input Example
{"parameters":{"channel":"C0E7PH2NS","user":"USLACKBOT"}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
error | string | Error message if any |
Output Example
{"status_code":200,"response_headers":{"date":"Fri, 16 Dec 2022 14:12:52 GMT","server":"Apache","x-powered-by":"HHVM/4.153.1","access-control-allow-origin":"*","referrer-policy":"no-referrer","x-slack-backend":"r","x-slack-unique-id":"Y5x85Lpf1oI2rixfxSehaAAAEBY","strict-transport-security":"max-age=31536000; includeSubDomains; preload","access-control-allow-headers":"slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x...","access-control-expose-headers":"x-slack-req...
Conversations List
Retrieve all channels in a Slack team to provide an overview of available conversation spaces without requiring additional input.
Endpoint
- URL: api/conversations.list
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.limit | number | Optional | Parameters for the Conversations List action |
Input Example
{"parameters":{"limit":2}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
channels | array | Output field: channels |
channels.id | string | Unique identifier |
channels.name | string | Name of the resource |
channels.is_channel | boolean | Output field: channels.is_channel |
channels.is_group | boolean | Output field: channels.is_group |
channels.is_im | boolean | Output field: channels.is_im |
channels.is_mpim | boolean | Output field: channels.is_mpim |
channels.is_private | boolean | Output field: channels.is_private |
channels.created | number | Output field: channels.created |
channels.is_archived | boolean | Output field: channels.is_archived |
channels.is_general | boolean | Output field: channels.is_general |
channels.unlinked | number | Output field: channels.unlinked |
channels.name_normalized | string | Name of the resource |
channels.is_shared | boolean | Output field: channels.is_shared |
channels.is_org_shared | boolean | Output field: channels.is_org_shared |
channels.is_pending_ext_shared | boolean | Output field: channels.is_pending_ext_shared |
channels.pending_shared | array | Output field: channels.pending_shared |
channels.pending_shared.file_name | string | Name of the resource |
channels.pending_shared.file | string | Output field: channels.pending_shared.file |
channels.context_team_id | string | Unique identifier |
channels.updated | number | Output field: channels.updated |
channels.parent_conversation | object | Output field: channels.parent_conversation |
Output Example
{"ok":true,"channels":[{"id":"12345678-1234-1234-1234-123456789abc","name":"Example Name","is_channel":true,"is_group":true,"is_im":true,"is_mpim":true,"is_private":true,"created":123,"is_archived":true,"is_general":true,"unlinked":123,"name_normalized":"Example Name","is_shared":true,"is_org_shared":true,"is_pending_ext_shared":true}],"response_metadata":{"next_cursor":"string"}}
Conversations Members
Retrieve all members of a specified Slack channel by providing the channel ID as a parameter.
Endpoint
- URL: api/conversations.members
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.channel | string | Required | Parameters for the Conversations Members action |
parameters.limit | number | Optional | Parameters for the Conversations Members action |
Input Example
{"parameters":{"channel":"C0E7PH2NS","limit":2}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
members | array | Output field: members |
response_metadata | object | Response data |
response_metadata.next_cursor | string | Response data |
Output Example
{"status_code":200,"response_headers":{"date":"Fri, 16 Dec 2022 14:07:50 GMT","server":"Apache","x-powered-by":"HHVM/4.153.1","access-control-allow-origin":"*","referrer-policy":"no-referrer","x-slack-backend":"r","x-slack-unique-id":"Y5x7tuDJgIq_ncq0sDiaPQAAECw","strict-transport-security":"max-age=31536000; includeSubDomains; preload","access-control-allow-headers":"slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x...","access-control-expose-headers":"x-slack-req...
Get Message Permalink
Retrieve the permalink URL for a specific Slack message using the channel ID and message timestamp.
Endpoint
- URL: api/chat.getPermalink
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.channel | string | Required | The ID of the conversation or channel containing the message. |
parameters.message_ts | string | Required | A Message's TS value, uniquely identifying it within a channel. |
Input Example
{"parameters":{"channel":"C1234567890","message_ts":"1234567890.123456"}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
permalink | string | Output field: permalink |
channel | string | Output field: channel |
Output Example
{"status_code":200,"response_headers":{"date":"Wed, 16 Oct 2024 10:52:06 GMT","server":"Apache","vary":"Accept-Encoding","x-slack-req-id":"13dabbfa12beeaefe788b03b2f6ace65","x-content-type-options":"nosniff","x-xss-protection":"0","pragma":"no-cache","cache-control":"private, no-cache, no-store, must-revalidate","expires":"Sat, 26 Jul 1997 05:00:00 GMT","content-type":"application/json; charset=utf-8","x-oauth-scopes":"chat:write,channels:history,channels:join,channels:manage,channels:read,chat:...
Lookup by Email
Retrieve Slack user profile information by searching with a specified email address.
Endpoint
- URL: /api/users.lookupByEmail
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.email | string | Required | Parameters for the Lookup by Email action |
Input Example
{"parameters":{"email":"[email protected]"}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
user | object | Output field: user |
user.id | string | Unique identifier |
user.team_id | string | Unique identifier |
user.name | string | Name of the resource |
user.deleted | boolean | Output field: user.deleted |
user.color | string | Output field: user.color |
user.real_name | string | Name of the resource |
user.tz | string | Output field: user.tz |
user.tz_label | string | Output field: user.tz_label |
user.tz_offset | number | Output field: user.tz_offset |
user.profile | object | Output field: user.profile |
user.profile.title | string | Output field: user.profile.title |
user.profile.phone | string | Output field: user.profile.phone |
user.profile.skype | string | Output field: user.profile.skype |
user.profile.real_name | string | Name of the resource |
user.profile.real_name_normalized | string | Name of the resource |
user.profile.display_name | string | Name of the resource |
user.profile.display_name_normalized | string | Name of the resource |
user.profile.fields | object | Output field: user.profile.fields |
user.profile.status_text | string | Status value |
user.profile.status_emoji | string | Status value |
user.profile.status_emoji_display_info | array | Status value |
Output Example
{"ok":true,"user":{"id":"12345678-1234-1234-1234-123456789abc","team_id":"string","name":"Example Name","deleted":true,"color":"string","real_name":"Example Name","tz":"string","tz_label":"string","tz_offset":123,"profile":{"title":"string","phone":"string","skype":"string","real_name":"Example Name","real_name_normalized":"Example Name","display_name":"Example Name","display_name_normalized":"Example Name","fields":{},"status_text":"active","status_emoji":"active","status_emoji_display_info":[]...
Post Message
Post a message to a Slack channel, direct message, or thread, with options to reply within threads and broadcast replies in the channel.
Endpoint
- URL: api/chat.postMessage/
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
channel | string | Required | Channel, private group, or DM to post to. Use a channel ID, or /# followed by the channel name. |
text | string | Optional | Message text. When blocks are set, Slack uses this as the notification fallback. |
blocks | array | Optional | Block Kit payload. Do not combine with markdown_text. |
attachments | array | Optional | Legacy message attachments. |
markdown_text | string | Optional | Markdown message text. Cannot be combined with text or blocks. |
thread_ts | string | Optional | Parent message ts. Set this to reply in that thread. |
reply_broadcast | string | Optional | With thread_ts, set to true to also show the reply in the channel. Requires thread_ts. |
mrkdwn | string | Optional | Set to false to disable Slack markup parsing. Enabled by default when omitted. |
parse | string | Optional | Change how the message text is treated. Use full or none. |
link_names | string | Optional | Set to true to find and link user groups. |
unfurl_links | string | Optional | Set to true to unfurl primarily text-based links. |
unfurl_media | string | Optional | Set to false to disable unfurling of media content. |
unfurl_app_links | string | Optional | Set to true to unfurl links from installed apps, or false to prevent it. |
username | string | Optional | Bot display name for this message. Requires the chat:write.customize scope. |
icon_url | string | Optional | Image URL used as the message icon. Requires the chat:write.customize scope. |
icon_emoji | string | Optional | Emoji used as the message icon, for example π. Overrides icon_url. |
metadata | object | Optional | JSON object with event_type and event_payload. |
current_draft_last_updated_ts | string | Optional | Timestamp of the draft's last update, when this call updates a draft. |
Input Example
{"channel":"C04J0U2RUMT"}
Output
Parameter | Type | Description |
|---|---|---|
headers | object | HTTP headers for the request |
reason | string | Response reason phrase |
status_code | number | HTTP status code of the response |
channel | string | Output field: channel |
ts | string | Output field: ts |
message | object | Response message |
Output Example
{"channel":"string","ts":"string","message":{}}
test
Verify the connection to Slack and ensure integration functionality is working correctly.
Endpoint
- URL: sf
- Method: fa
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
ads | object | Optional | Parameter for test |
sad | object | Optional | Parameter for test |
Input Example
{"ads":{},"sad":{}}
Update Message
Modify an existing message in a specified Slack channel using the channel ID and message timestamp.
Endpoint
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
channel | string | Required | Parameter for Update Message |
message_timestamp | string | Required | Response message |
title | string | Optional | Parameter for Update Message |
reply_broadcast | string | Optional | Parameter for Update Message |
username | string | Optional | Name of the resource |
parse | string | Optional | Parameter for Update Message |
link_names | string | Optional | Name of the resource |
text | string | Optional | Parameter for Update Message |
unfurl_links | string | Optional | URL endpoint for the request |
unfurl_media | string | Optional | URL endpoint for the request |
icon_url | string | Optional | URL endpoint for the request |
icon_emoji | string | Optional | Parameter for Update Message |
blocks | array | Optional | Parameter for Update Message |
blocks.type | string | Optional | Type of the resource |
blocks.text | object | Optional | Parameter for Update Message |
blocks.text.type | string | Optional | Type of the resource |
blocks.text.text | string | Optional | Parameter for Update Message |
blocks.fields | array | Optional | Parameter for Update Message |
blocks.fields.type | string | Optional | Type of the resource |
blocks.fields.text | string | Optional | Parameter for Update Message |
Input Example
{"channel":"C04J0U2RUMT","message_timestamp":"1673382207.766669","title":"C04J0U2RUMT","reply_broadcast":"C04J0U2RUMT","username":"C04J0U2RUMT","parse":"C04J0U2RUMT","link_names":"C04J0U2RUMT","text":"C04J0U2RUMT","unfurl_links":"C04J0U2RUMT","unfurl_media":"C04J0U2RUMT","icon_url":"C04J0U2RUMT","icon_emoji":"C04J0U2RUMT"}
Output
Parameter | Type | Description |
|---|---|---|
headers | object | HTTP headers for the request |
reason | string | Response reason phrase |
status_code | number | HTTP status code of the response |
channel | string | Output field: channel |
ts | string | Output field: ts |
message | object | Response message |
message.bot_id | string | Unique identifier |
message.type | string | Type of the resource |
message.text | string | Response message |
message.user | string | Response message |
message.app_id | string | Unique identifier |
message.blocks | array | Response message |
message.blocks.type | string | Type of the resource |
message.blocks.block_id | string | Unique identifier |
message.blocks.text | object | Response message |
message.blocks.text.type | string | Type of the resource |
message.blocks.text.text | string | Response message |
message.blocks.text.verbatim | boolean | Response message |
message.blocks.fields | array | Response message |
message.blocks.fields.type | string | Type of the resource |
message.blocks.fields.text | string | Response message |
message.blocks.fields.verbatim | boolean | Response message |
message.team | string | Response message |
message.bot_profile | object | Response message |
message.bot_profile.id | string | Unique identifier |
Output Example
{"channel":"string","ts":"string","message":{"bot_id":"string","type":"string","text":"string","user":"string","app_id":"string","blocks":[{}],"team":"string","bot_profile":{"id":"12345678-1234-1234-1234-123456789abc","app_id":"string","name":"Example Name","icons":{},"deleted":true,"updated":123,"team_id":"string"},"edited":{"user":"string","ts":"string"}}}
URL Verification Handshake
Verify the integrity of a Slack webhook setup by confirming the challenge token included in the data body content.
Endpoint
- Method: POST
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
data_body | object | Required | Response data |
data_body.challenge | string | Required | Response data |
Input Example
{"data_body":{"channel":"C0E7PH2NS"}}
Output
Parameter | Type | Description |
|---|---|---|
headers | object | HTTP headers for the request |
reason | string | Response reason phrase |
status_code | number | HTTP status code of the response |
Output Example
{"headers":null,"reason":"OK","status_code":200}
Users List
Retrieve a comprehensive list of users in your Slack team, including details about current team membership.
Endpoint
- URL: api/users.list
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
parameters.limit | number | Optional | Parameters for the Users List action |
Input Example
{"parameters":{"limit":2}}
Output
Parameter | Type | Description |
|---|---|---|
status_code | number | HTTP status code of the response |
reason | string | Response reason phrase |
ok | boolean | Output field: ok |
offset | string | Output field: offset |
members | array | Output field: members |
members.id | string | Unique identifier |
members.team_id | string | Unique identifier |
members.name | string | Name of the resource |
members.deleted | boolean | Output field: members.deleted |
members.color | string | Output field: members.color |
members.real_name | string | Name of the resource |
members.tz | string | Output field: members.tz |
members.tz_label | string | Output field: members.tz_label |
members.tz_offset | number | Output field: members.tz_offset |
members.profile | object | Output field: members.profile |
members.profile.title | string | Output field: members.profile.title |
members.profile.phone | string | Output field: members.profile.phone |
members.profile.skype | string | Output field: members.profile.skype |
members.profile.real_name | string | Name of the resource |
members.profile.real_name_normalized | string | Name of the resource |
members.profile.display_name | string | Name of the resource |
members.profile.display_name_normalized | string | Name of the resource |
members.profile.fields | object | Output field: members.profile.fields |
members.profile.status_text | string | Status value |
members.profile.status_emoji | string | Status value |
Output Example
{"ok":true,"offset":"string","members":[{"id":"12345678-1234-1234-1234-123456789abc","team_id":"string","name":"Example Name","deleted":true,"color":"string","real_name":"Example Name","tz":"string","tz_label":"string","tz_offset":123,"profile":{},"is_admin":true,"is_owner":true,"is_primary_owner":true,"is_restricted":true,"is_ultra_restricted":true}],"cache_ts":123,"response_metadata":{"next_cursor":"string"}}
Response Headers
Header | Description | Example |
|---|---|---|
access-control-allow-headers | HTTP response header: access-control-allow-headers | slack-route, x-slack-version-ts, x-b3-traceid, x-b3-spanid, x-b3-parentspanid, x-b3-sampled, x-b3-flags |
access-control-allow-origin | HTTP response header: access-control-allow-origin | * |
access-control-expose-headers | HTTP response header: access-control-expose-headers | x-slack-req-id, retry-after |
cache-control | Directives for caching mechanisms | private, no-cache, no-store, must-revalidate |
content-encoding | HTTP response header: content-encoding | gzip |
content-length | The length of the response body in bytes | 130 |
Content-Type | The media type of the resource | application/json |
Date | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |
expires | The date/time after which the response is considered stale | Sat, 26 Jul 1997 05:00:00 GMT |
pragma | HTTP response header: pragma | no-cache |
referrer-policy | HTTP response header: referrer-policy | no-referrer |
server | Information about the software used by the origin server | Apache |
strict-transport-security | HTTP response header: strict-transport-security | max-age=31536000; includeSubDomains; preload |
vary | HTTP response header: vary | Accept-Encoding |
via | HTTP response header: via | envoy-www-iad-s7mf, envoy-edge-gru-7het |
x-accepted-oauth-scopes | HTTP response header: x-accepted-oauth-scopes | channels:read,groups:read,mpim:read,im:read,read |
x-backend | HTTP response header: x-backend | main_normal main_canary_with_overflow main_control_with_overflow |
x-content-type-options | HTTP response header: x-content-type-options | nosniff |
x-edge-backend | HTTP response header: x-edge-backend | envoy-www |
x-envoy-attempt-count | HTTP response header: x-envoy-attempt-count | 1 |
x-envoy-upstream-service-time | HTTP response header: x-envoy-upstream-service-time | 150 |
x-oauth-scopes | HTTP response header: x-oauth-scopes | chat:write,channels:history,channels:join,channels:manage,channels:read,chat:write.customize,groups:write,groups:history,groups:read,groups:write.invites,im:history,mpim:history,im:read,mpim:read,users:read,users:read.email,im:write,mpim:write,channels:write.invites |
x-powered-by | HTTP response header: x-powered-by | HHVM/4.153.1 |
x-server | HTTP response header: x-server | slack-www-hhvm-main-iad-hbwg |
x-slack-backend | HTTP response header: x-slack-backend | r |
x-slack-edge-shared-secret-outcome | HTTP response header: x-slack-edge-shared-secret-outcome | no-match |
x-slack-req-id | HTTP response header: x-slack-req-id | c6ed41fefe4f86dde09d354a29fbe3e5 |
x-slack-shared-secret-outcome | HTTP response header: x-slack-shared-secret-outcome | no-match |
x-slack-unique-id | HTTP response header: x-slack-unique-id | Y5x85Lpf1oI2rixfxSehaAAAEBY |
x-xss-protection | HTTP response header: x-xss-protection | 0 |