SfSkills Domains Docs GitHub

Home / flow / flow-for-slack

flow-for-slack

Use this skill when using Salesforce Flow Core Actions for Slack to send messages, create/archive channels, add users, check user connectivity, or post a Send Message to Launch Flow button — including the Salesforce for Slack managed package and permission-set prerequisites.

Open the skill folder on GitHub


Flow for Slack

This skill activates when a practitioner needs Flow Core Actions for Slack: the built-in actions that let a Salesforce flow send Slack messages, manage channels, and work with Slack users. It covers the action catalog, prerequisites, metadata, and common failure modes. It does NOT cover Slack Workflow Builder (Slack calling Salesforce) or Agentforce in Slack.


Before Starting

Gather this context before working on anything in this domain:


Questions to Ask Before Configuring

QuestionWhy it mattersWhat a good answer addsWhat proper configuration adds over just doing it
Which Slack app and workspace will each action use?The actions run through a connected Slack app; some flows need the Sales Cloud for Slack App ID.Fixed app and workspace IDs stored in custom metadata, not typed into every action.Moving between sandbox and production workspaces is a data change, not a flow edit.
Who is the running user, and do they have Connect Salesforce with Slack plus the app's permission set?Each Slack user, including the workspace owner who adds apps, needs a permission set with Connect Salesforce with Slack on a supported license.A named integration or automated-process user with the right permissions.Automations don't fail for users whose license can't hold the permission.
Should the message start a guided task in Slack?Send Message to Launch Flow posts a button that launches a screen flow; the flow must be saved with the Slack environment.Picks plain messaging or an interactive launch.Recipients complete the task without leaving Slack.
Where does the channel name come from, and can it break Slack's rules?Slack channel names may contain only lowercase letters, numbers, hyphens, and underscores, up to 80 characters.A formula that normalizes names before Create Slack Channel.Channel creation doesn't fail on a record name with spaces or capitals.
What happens when a Slack action fails?Failures reach the flow as faults; without a fault path they surface only as flow error emails.A fault path that logs or alerts.Revoked apps or missing permissions are noticed the same day.
Which record data may appear in Slack?Slack record detail settings and message content decide what non-Salesforce users in a channel can read.A field list approved for Slack.Sensitive fields stay in Salesforce.

Core Concepts

Flow Core Actions for Slack Catalog

The Slack Integrations guide lists the actions in the Slack category of Flow Builder. The Metadata API names each one as an InvocableActionType value:

Action (Flow Builder)actionType in Flow metadataAPI version
Send Slack MessageslackPostMessage54.0
Send Message to Launch FlowslackSendMessageToLaunchFlow55.0
Create Slack ChannelslackCreateChannel54.0
Archive Slack ChannelslackArchiveChannel54.0
Invite Users to Slack ChannelslackInviteUsersToChannel54.0
Check If Users Are Connected to SlackslackCheckUsersAreConnectedToSlack54.0
Get Information about Slack ConversationslackGetConversationInfo54.0
Edit Slack MessageslackUpdateMessage54.0
Pin or Unpin Slack Message (Beta)slackPinMessage54.0

API 54.0 is Spring '22; 55.0 is Summer '22.

Prerequisite Stack

  1. Salesforce for Slack Integrations enabled in Slack Apps Setup.
  2. The relevant Salesforce Slack app installed in the workspace from the Slack App Directory.
  3. Users mapped and connected (users add the app to their Slack sidebar and connect their Salesforce account).
  4. Permissions: Connect Salesforce with Slack, plus the app's permission set (Slack Sales User or Slack Service User), plus Run Flows where the app requires it.

If a layer is missing, actions can be absent from Flow Builder or fault at runtime.

Send Message to Launch Flow

This action sends "a message to a Slack channel, direct message, or the Messages tab of a Slack app that includes a button that a recipient can use to launch a screen flow" (Metadata API, slackSendMessageToLaunchFlow). The target is a screen flow whose environments includes Slack; the Slack environment "can run in Slack and the default environment," and you choose it when you save the flow.

Record-Triggered Flows

UNVERIFIED (2026-10-03): Salesforce Help states that Slack actions in record-triggered flows belong on an asynchronous path. The fetched sources don't say so. Placing them on an AsyncAfterCommit path (which "runs asynchronously after a save") is the safe default either way, because the message then reflects committed data.


Send Slack Message: Input Fields

Input FieldValueNotes
Slack AppSales Cloud for Slack (A028VJ1KG3G) or your connected app's IDRequired by some flows (Slack Integrations guide); store it in custom metadata
Slack WorkspaceWorkspace ID (T...)Use the ID, not the name
Message Destination IDChannel ID (C...) or user/DM IDIDs survive channel renames
MessageText with merge fieldsKeep sensitive fields out

UNVERIFIED (2026-10-03): the API names behind these inputs (for example slackAppIdForToken, slackWorkspaceIdForToken, slackConversationId, slackMessage) are not in the fetched Metadata API or Actions guides; confirm them by building the action once and retrieving the flow. The full flow XML is in references/metadata-examples.md.


Common Patterns

Pattern 1: Notify a Channel When a Record Changes

When to use: Post to a Slack channel when a record reaches a state (Opportunity stage change, Case escalation).

How it works:

  1. Record-triggered flow on the object, after save, with entry criteria and "only when updated to meet criteria."
  2. Add an AsyncAfterCommit path.
  3. Add Send Slack Message on that path with the app, workspace, channel ID, and message.
  4. Add a fault path that logs $Flow.FaultMessage and alerts an owner.
  5. Activate after testing in a sandbox connected to a test workspace.

Pattern 2: Create a Deal Room Channel for a New Record

When to use: Provision a channel for each new Enterprise Opportunity.

How it works:

  1. Record-triggered flow on Opportunity, after save, async path.
  2. Formula for the channel name: lowercase, spaces replaced, trimmed to well under 80 characters, only letters, numbers, hyphens, and underscores.
  3. Create Slack Channel, then Invite Users to Slack Channel with the owner and team.
  4. Store the returned channel ID on the record for later actions.

Pattern 3: Check Connection Before a Direct Message

When to use: Direct-message a Salesforce user only if they connected Slack.

How it works: Check If Users Are Connected to Slack first, then branch: connected users get Send Slack Message, others get email.


Decision Guidance

SituationRecommended ApproachReason
Notify a channel on record changeSend Slack Message on an async path of an after-save flowMessage reflects committed data
User action needed from SlackSend Message to Launch Flow with a Slack-environment screen flowThe button launches a screen flow
Channel per recordCreate Slack Channel + Invite Users to Slack ChannelConsistent provisioning
Actions missing in Flow BuilderCheck Slack Apps Setup, app installation, and permissionsEach layer is required
Direct message a userCheck If Users Are Connected to Slack firstUnconnected users can't receive it
Update an earlier messageEdit Slack Message with the stored message identifierAvoids duplicate posts

  1. Confirm Slack Apps Setup is complete, the app is installed in the target workspace, and the running user has Connect Salesforce with Slack plus the app's permission set.
  2. Store the Slack app ID, workspace ID, and channel IDs in custom metadata so sandbox and production use different values.
  3. Build the flow: after-save trigger, AsyncAfterCommit path, the Slack action, and a fault path; for launch buttons, build the screen flow with the Slack environment.
  4. Run python3 skills/flow/flow-for-slack/scripts/check_flow_for_slack.py --manifest-dir force-app to catch Slack actions on before-save flows or without fault connectors, literal channel names, and launch targets missing the Slack environment.
  5. Test in a sandbox against a test workspace, then activate in production.

Review Checklist


Salesforce-Specific Gotchas

Full write-ups with sources are in references/gotchas.md.

GotchaOne-line summary
Setup layersActions depend on Slack Apps Setup, app installation, user mapping, and permissions.
Permission namesThe Sales Cloud for Slack permission set is "Slack Sales User"; most apps also need Connect Salesforce with Slack.
Launch targetSend Message to Launch Flow launches a screen flow, not an autolaunched flow.
Slack environmentThe target screen flow must be saved with the Slack environment.
Channel namesLowercase letters, numbers, hyphens, underscores; 80 characters maximum.
Government CloudSalesforce for Slack apps aren't supported there.
Missing faultsWithout a fault path, Slack failures surface only as flow error emails.

Output Artifacts

ArtifactDescription
Configured Salesforce FlowRecord-triggered or scheduled flow using Slack core actions
Prerequisite setup checklistSlack Apps Setup, app installation, user mapping, permissions
Channel naming conventionFormula that produces Slack-valid channel names
Flow metadataflows/*.flow-meta.xml with actionType values from the table above

Package files