Effortlessly send messages to Slack channels, direct messages, or the Messages tab of a Slack app using the Send Slack Message Flow Core Action.
Required Editions
- Available in Salesforce Classic and Lightning Experience.
- Supported in Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions.
Prerequisite: Ensure Salesforce for Slack integrations are enabled before using this action.
Steps to Send a Slack Message in Flow
1. Add an Action to the Flow
- Open Flow Builder and add an Action element to your flow.
- In the New Action window:
- Select Slack as the action category.
- Choose Send Slack Message.
Set Connection Values for Slack
Input Parameter | Description |
---|---|
Slack App | Required. Specify the Slack app to execute the action. Only Slack apps installed in your org are available. The input value corresponds to the Slack app ID. |
Slack Workspace | Required. Identify the Slack workspace where the app is installed. You can select a value or resource. The input value corresponds to the Slack workspace ID. |
Execute Action As | Specify the entity executing the action: |
- Slack App: Executes as the Slack app (default). The app must be part of the conversation to execute the action.
- User Who Runs the Flow: Executes as the user running the flow (when the flow runs in user context). If the flow runs in the system context, the app executes the action. The user must be part of the conversation. |
Set Slack Message Details
Input Parameter | Description |
---|---|
Slack Conversation ID | Required. The ID of the Slack channel, direct message, or user to send the message. |
- To obtain the Slack conversation ID:
- Log in to Slack in your browser.
- The conversation ID is the last parameter in the URL. Example:
https://app.slack.com/client/T01234ABCDE/C56789FGHIJ
- In this case, the conversation ID is C56789FGHIJ. |
| Slack Message | Required. The message to send.
- In this case, the conversation ID is C56789FGHIJ. |
- Recommended: Keep messages under 4,000 characters.
- Slack truncates messages exceeding 40,000 characters.
- Formatting: Use Slack markdown for formatting. Use escape sequences to disable formatting for plain text messages with markdown. Slack does not support HTML formatting. |
| Salesforce Record ID | The record ID to send to the view. This feature is part of a pilot program. See the Apex SDK for Slack (Pilot) Guide for details. |
| Slack Message Timestamp | Specify a timestamp to start a Slack thread. - Example format: 1234567890.123456
- Numbers before the period represent the Unix timestamp.
- Numbers after the period represent microseconds.
- The Slack Message Timestamp output from previous actions (e.g., Send Slack Message, Edit Slack Message) can be stored as a resource for later use. |
| View API Name | The API name of the view to send with the Slack message. This is part of a pilot program. See the Apex SDK for Slack (Pilot) Guide for more details. |
Store Output Values
Output Parameter | Description |
---|---|
Slack Message Timestamp | The timestamp of the sent message. Use this for starting threads or as a resource in subsequent actions. |
Usage Notes
- This action is available only if Slack is connected in Setup and the user running the flow is connected to Slack. Otherwise, the action will fail.
By configuring the Send Slack Message Flow Core Action, you can streamline communication workflows and enhance collaboration directly from Salesforce to Slack.