Slack Component
Send messages to Slack channels and users
Component key: slackDescription
The Slack component allows you to post messages to a Slack channel.
API Documentation
This component was built using the following API References:
Processing Slack events in real-time
Slack requires that you provide only one webhook URL for your app, and Slack will send all customers' events to that URL. If you would like to detect and process changes to your customers' Slack accounts in real-time, see the Single-Endpoint Webhook Integrations guide on handling webhook requests from apps that require you to specify a single webhook endpoint.
Connections
Slack OAuth 2.0
The vast majority of actions in this component use OAuth 2.0 for authentication. To create a Slack OAuth 2.0 connection, first create and configure a Slack App by visiting the Slack Developer App Portal:
- Click Create New App
- Choose to create the app From scratch
- Give your app a name and select your workspace. We'll configure it to be multi-workspace capable in a moment
- Select OAuth & Permissions from the sidebar
- Under Redirect URLs, add
https://oauth2.prismatic.io/callback
for US based integrations. - For integrations outside the US refer to this guide to find your region’s Callback URL.
- At the bottom, add some User Token Scopes if you plan for this integration to send messages on behalf of customers, or Bot Token Scopes if a Slack "bot" will send the messages.
What scopes you need is dependent on what types of things your Slack integration will need to do (create channels, send messages, etc).
If you just need to send messages to a channel as a bot, add these scopes:
chat:write chat:write.public
. If you want to send messages as a user, see the section below.
- Under Redirect URLs, add
- Next, select Distribute App under Manage Distribution. Confirm that you have "removed hard coded information" and select Activate Public Distribution. Your app needs to be publicly distributed for your customers to install it in their Slack workspaces.
- Finally, open Basic Information. Take note of the Client ID, Client Secret and Signing Secret.
Now it's time to configure your integration to use your Slack OAuth 2.0 app. Add a Slack step to your integration - that'll create a connection config variable for you. Open up that connection config variable.
Enter Client ID, Signing Secret and Client Secret that you noted before.
The Scopes that you need to enter depends on what Slack actions your integration includes:
- If you're just sending messages to a channel, you can enter the scopes
chat:write chat:write.public
and that will assign you 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
).
A list of all Slack OAuth scopes and what each does are available in their docs.
Sending messages to private channels
The chat:write.public
scope allows your bot to send messages to public channels.
If you would like to send messages to private channels, or would like to be more selective about what channels your bot can send messages to, your customer will need to invite the bot 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, you'll receive a not_in_channel
error from Slack when you attempt to send a message to that channel.
Sending messages as a user
Slack applications typically send messages as bot users.
If you would instead like to send messages as a user, edit the Auth URL
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.
Your Auth URL
, then, will look something like this: https://slack.com/oauth/v2/authorize?user_scope=chat:write
Dynamically changing your bot's name
Your bot's username and icon are things you set when you create your Slack app.
If you would like to override your bot's username within your integration, you will need to request the chat:write.customize
scope in addition to chat:write
.
GovSlack
Slack offrs 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.
Webhook URL
The Slack Message from Webhook and the Slack Block Message from Webhook actions are the only Slack actions that do not authenticate with OAuth. Instead, it uses Slack Incoming Webhooks. For your customers to use this authorization method, they will need to create their own Slack apps and incoming webhooks.
To generate a Slack incoming webhook URL:
- Navigate to https://api.slack.com/apps
- Click Create New App, adding an app to your workspace.
- Under Add features and functionality select Incoming Webhooks
- Activate Incoming Webhooks and then Add New Webhook to Workspace
- Take note of the Webhook URL. It should be of the form
https://hooks.slack.com/services/foo/bar/baz
Triggers
App Webhook
Trigger for handling slash command and modal webhooks from Slack | key: slashCommandWebhook
Events API Webhook
Receive and validate webhook requests from Slack's Events API for webhooks you configure. | key: webhook
You can configure Slack to send events to a Prismatic integration. This webhook trigger uses your Slack app's signing secret to verify that messages come from Slack. If a challenge request is received, this trigger responds with the proper challenge response and this trigger follows the "URL Verify" branch. For other notifications, like a "channel create" event occurred, this trigger follows the "Notification" path.
If you would like to invoke a flow that uses a Slack webhook trigger from an app other than Slack, you can send an additional header, prismatic-bypass-challenge: true
with your request, to bypass Slack message verification.
When that header is present your integration will follow the "Management" branch.
{
"branch": "Notification",
"payload": {
"headers": {
"accept": "*/*",
"Content-Type": "application/json",
"User-Agent": "Slackbot 1.0 (+https://api.slack.com/robots)",
"Host": "hooks.example.prismatic.io"
},
"body": {
"data": {}
},
"rawBody": {
"data": {
"type": "Buffer",
"data": [
69,
120,
97,
109,
112,
108,
101
]
}
},
"queryParameters": {},
"webhookUrls": {
"Flow 1": "https://hooks.example.prismatic.io/trigger/EXAMPLEGbG93Q29uZmlnOmRlNmNmNDMyLTliNWMtN0005NDMxLTRmYzA4ZjViODgxOA=="
},
"webhookApiKeys": {
"Flow 1": [
"abc-123"
]
},
"customer": {
"externalId": "customer-example-external-id",
"name": "John Doe"
}
},
"response": {
"statusCode": 200,
"contentType": "text/plain",
"body": "3eZbrw1aBm2rZgRNFdxV2595E9CY3gmdALWMmHkvFXO7tYXAYM8P"
}
}
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
{
"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
{
"result": [
{
"key": "C123456",
"label": "Jhon (ID: C123456)"
},
{
"key": "C000000",
"label": "Doe (ID: C000000)"
}
]
}
Actions
Archive Conversation
Archive an existing conversation | key: archiveConversation
{
"data": {
"ok": true
}
}
Close Conversation
Close an existing conversation | key: closeConversation
{
"data": {
"ok": true,
"no_op": true,
"already_closed": true
}
}
Conversation Exists
Returns true if the conversation already exists | key: conversationExists
{
"data": true
}
Create Conversation
Create a new conversation | key: createConversation
{
"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 a pending scheduled message
Delete the content and metadata of a pending scheduled message from a queue | key: deletePendingMessage
{
"data": {
"ok": true
}
}
Delete message
Delete the content and metadata of an existing message | key: deleteMessage
{
"data": {
"ok": true,
"channel": "C123ABC456",
"ts": "1401383885.000061"
}
}
Get Conversation History
Get the history of a conversation | key: getConversationsHistory
{
"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
{
"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
{
"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
{
"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 Conversations
Leave an existing conversation | key: leaveConversation
{
"data": {
"ok": true,
"not_in_channel": true
}
}
List Conversation Members
List all members of a conversation | key: listConversationMembers
{
"data": {
"ok": true,
"members": [
"U023BECGF",
"U061F7AUR",
"W012A3CDE"
],
"response_metadata": {
"next_cursor": "e3VzZXJfaWQ6IFcxMjM0NTY3fQ=="
}
}
}
List Conversations
List all conversations | key: listConversations
{
"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
{
"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
{
"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 Users | key: listUsers
{
"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 Users Conversations | key: listUsersConversations
{
"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."
}
}
]
}
}
Post Block Message
Post a message to a slack channel | key: postBlockMessage
{
"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
{
"data": {
"ok": true,
"message_ts": "1502210682.580145"
}
}
Post Message
Post a message to a slack channel | key: postMessage
{
"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"
]
}
}
}
Raw Request
Send raw HTTP request to Slack | key: rawRequest
Rename Conversation
Rename an existing conversation | key: renameConversation
{
"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
{
"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
{
"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
{
"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
{
"data": {
"ok": true
}
}
Set Conversation Topic
Set the purpose of an existing conversation | key: setConversationTopic
{
"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
{
"data": {
"text": "ok"
}
}
Slack Message From Webhook
Post a message to a Slack channel from a webhook URL | key: postSlackMessage
{
"data": {
"text": "ok"
}
}
Update Message
Update the contents of an existing message | key: updateMessage
{
"data": {
"ok": true,
"channel": "C123ABC456",
"ts": "1401383885.000061",
"text": "Updated text you carefully authored",
"message": {
"text": "Updated text you carefully authored",
"user": "U34567890"
}
}
}
Upload File
Upload a new file to a slack conversation | key: uploadFile
{
"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
}
}
}