Slack
Send messages, manage channels, and react to messages in Slack.
On this page
- Connect
- Call it from a workflow
- Actions (26)
- send_channel_message
- send_direct_message
- slack-add-reaction-to-message
- slack-create-channel
- custom_api_call
- delete-message
- find-user-by-id
- get-file
- get-message
- getChannelHistory
- invite-user-to-channel
- listUsers
- markdownToSlackFormat
- request_action_direct_message
- request_action_message
- request_approval_direct_message
- request_approval_message
- retrieveThreadMessages
- searchMessages
- set-channel-topic
- slack-find-user-by-email
- slack-find-user-by-handle
- slack-set-user-status
- slack-update-profile
- updateMessage
- uploadFile
- Details
Connect
Auth type: OAuth (oauth2). Click Connect and approve access on the provider's page. Appbricx runs the OAuth flow (signed single-use state, PKCE where the provider supports it), stores the tokens encrypted and refreshes them before they expire.
Scopes requested: chat:writechannels:readchannels:manageusers:readreactions:write
OAuth needs an OAuth app: the platform's when the operator configured one, or your own (admin panel, Integrations, Configure). You can also bring your own credentials.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("slack", "send_channel_message", {
"channel": "<channel>",
"sendAsBot": true
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Slack answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "slack-send-channel-message",
name: "Slack: Send Message To A Channel",
description: "Calls Slack when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("slack", {
"action": "send_channel_message",
"channel": "<channel>",
"sendAsBot": true
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/slack/send_channel_message" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"channel":"<channel>","sendAsBot":true}}'Actions
send_channel_messagein catalog
Send Message To A Channel. Send message to a channel
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
textoptional | long text | The text of your message. When using Block Kit blocks, this is used as a fallback for notifications. |
sendAsBotrequired | boolean | Send as a bot? |
threadTsoptional | text | Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.A… |
usernameoptional | text | The username of the bot |
profilePictureoptional | text | The profile picture of the bot |
iconEmojioptional | text | The icon emoji of the bot |
fileoptional | file | Attachment |
replyBroadcastoptional | boolean | When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided) |
mentionOriginFlowoptional | boolean | If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow. |
unfurlLinksoptional | boolean | Enable link unfurling for this message |
blocksoptional | JSON | See https://api.slack.com/block-kit for specs |
send_direct_messagein catalog
Send Message To A User. Send message to a user
| Input | Type | Description |
|---|---|---|
userIdrequired | id (picked from your account) | User |
textrequired | long text | Message |
usernameoptional | text | The username of the bot |
profilePictureoptional | text | The profile picture of the bot |
iconEmojioptional | text | The icon emoji of the bot |
mentionOriginFlowoptional | boolean | If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow. |
blocksoptional | JSON | See https://api.slack.com/block-kit for specs |
unfurlLinksoptional | boolean | Enable link unfurling for this message |
slack-add-reaction-to-messagein catalog
Add Reaction to Message. Add an emoji reaction to a message.
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
tsrequired | text | Please provide the timestamp of the message you wish to react, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message and… |
reactionrequired | text | e.g.`thumbsup` |
reactAsUserrequired | boolean | If enabled, the reaction will be added as the authenticated user instead of the bot. |
slack-create-channelin catalog
Create Channel. Creates a new channel.
Also accepted as create_channel.
| Input | Type | Description |
|---|---|---|
channelNamerequired | text | Channel Name |
isPrivateoptional | boolean | Is Private? |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
useUserTokenrequired | boolean | Use user token instead of bot token |
delete-message
Delete Message. Deletes a specific message from a channel using the message's timestamp.
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
tsrequired | text | Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message … |
find-user-by-id
Find User by ID. Finds a user by their ID.
| Input | Type | Description |
|---|---|---|
idrequired | text | ID |
get-file
Get File. Return information about a given file ID.
| Input | Type | Description |
|---|---|---|
fileIdrequired | text | You can pass the file ID from the New Message Trigger payload. |
get-message
Get Message by Timestamp. Retrieves a specific message from a channel history using the message's timestamp.
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
tsrequired | text | Please provide the timestamp of the message you wish to retrieve, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message … |
getChannelHistory
Get channel history. Retrieve all messages from a specific channel ("conversation") between specified timestamps
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
oldestoptional | number | Only messages after this timestamp will be included in results |
latestoptional | number | Only messages before this timestamp will be included in results. Default is the current time |
inclusiverequired | boolean | Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified |
includeAllMetadatarequired | boolean | Return all metadata associated with each message |
invite-user-to-channel
Invite User to Channel. Invites an existing User to an existing channel.
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
userIdrequired | id (picked from your account) | User |
listUsers
List users. List all users of the workspace
| Input | Type | Description |
|---|---|---|
includeBotsrequired | boolean | Include bots? |
includeDisabledrequired | boolean | Include disabled users? |
markdownToSlackFormat
Markdown to Slack format. Convert Markdown-formatted text to Slack's pseudo - markdown syntax
| Input | Type | Description |
|---|---|---|
markdownrequired | long text | Markdown text |
request_action_direct_message
Request Action from A User. Send a message to a user and wait until the user selects an action
| Input | Type | Description |
|---|---|---|
userIdrequired | id (picked from your account) | User |
textrequired | long text | Message |
actionsrequired | array | Action Buttons |
usernameoptional | text | The username of the bot |
profilePictureoptional | text | The profile picture of the bot |
mentionOriginFlowoptional | boolean | If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow. |
request_action_message
Request Action in A Channel. Send a message in a channel and wait until an action is selected
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
textrequired | long text | Message |
actionsrequired | array | Action Buttons |
threadTsoptional | text | Provide the ts (timestamp) or link value of the **parent** message to make this message a reply. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.A… |
usernameoptional | text | The username of the bot |
profilePictureoptional | text | The profile picture of the bot |
replyBroadcastoptional | boolean | When replying to a thread, also make the message visible to everyone in the channel (only applicable when Thread Timestamp is provided) |
mentionOriginFlowoptional | boolean | If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow. |
request_approval_direct_message
Request Approval from A User. Send approval message to a user and then wait until the message is approved or disapproved
| Input | Type | Description |
|---|---|---|
userIdrequired | id (picked from your account) | User |
textrequired | long text | Message |
usernameoptional | text | The username of the bot |
profilePictureoptional | text | The profile picture of the bot |
mentionOriginFlowoptional | boolean | If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow. |
request_approval_message
Request Approval in a Channel. Send approval message to a channel and then wait until the message is approved or disapproved
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
textrequired | long text | Message |
usernameoptional | text | The username of the bot |
profilePictureoptional | text | The profile picture of the bot |
mentionOriginFlowoptional | boolean | If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow. |
retrieveThreadMessages
Retrieve Thread Messages. Retrieves thread messages by channel and thread timestamp.
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
threadTsrequired | text | Provide the ts (timestamp) value of the **parent** message to retrieve replies of this message. Do not use the ts value of the reply itself; use its parent instead. For example `1710304378.475129`.Al… |
searchMessages
Search messages. Searches for messages matching a query
| Input | Type | Description |
|---|---|---|
queryrequired | text | Search query |
set-channel-topic
Set Channel Topic. Sets the topic on a selected channel.
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
topicrequired | long text | Topic |
slack-find-user-by-email
Find User by Email. Finds a user by matching against their email address.
| Input | Type | Description |
|---|---|---|
emailrequired | text |
slack-find-user-by-handle
Find User by Handle. Finds a user by matching against their Slack handle.
| Input | Type | Description |
|---|---|---|
handlerequired | text | User handle (display name), without the leading @ |
slack-set-user-status
Set User Status. Sets a user's custom status
| Input | Type | Description |
|---|---|---|
textrequired | text | Text |
emojioptional | text | Emoji shortname (standard or custom), e.g. :tada: or :train: |
expirationoptional | number | Unix timestamp - if not set, the status will not expire |
slack-update-profile
Update Profile. Update basic profile field such as name or title.
| Input | Type | Description |
|---|---|---|
firstNameoptional | text | First Name |
lastNameoptional | text | Last Name |
emailoptional | text | Changing a user's email address will send an email to both the old and new addresses, and also post a slackbot message to the user informing them of the change. |
userIdoptional | text | ID of user to change. This argument may only be specified by admins on paid teams.You can use **Find User by Email** action to retrieve ID. |
updateMessage
Update message. Update an existing message
| Input | Type | Description |
|---|---|---|
channelrequired | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
tsrequired | text | Please provide the timestamp of the message you wish to update, such as `1710304378.475129`. Alternatively, you can easily obtain the message link by clicking on the three dots next to the message an… |
textrequired | long text | The updated text of your message |
mentionOriginFlowoptional | boolean | If checked, adds a mention at the end of the Slack message to indicate which flow sent the notification, with a link to said flow. |
blocksoptional | JSON | See https://api.slack.com/block-kit for specs |
uploadFile
Upload file. Upload file without sharing it to a channel or user
| Input | Type | Description |
|---|---|---|
filerequired | file | Attachment |
titleoptional | text | Title |
filenameoptional | text | Filename |
channeloptional | id (picked from your account) | You can get the Channel ID by right-clicking on the channel and selecting 'View Channel Details.' |
Details
- Id
slack- Category
- Communication
- Tags
- messaging, chat, team, notifications
- Package
@activepieces/piece-slack@0.16.4- Tier
- Built in