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 launch flows from Slack — including prerequisite setup of the Salesforce for Slack managed package and required permission sets. Triggers on: Send Slack Message from Flow, Create Slack Channel action in Flow, Flow Core Actions for Slack not visible, Slack actions missing in Flow Builder, add users to Slack channel from Flow. NOT for Slack Workflow Builder (Slack-native tool that calls autolaunched Flows FROM Slack — use slack-workflow-builder skill), not for Agentforce Slack agent deployment (use agentforce-in-slack skill), not for initial Salesforce-Slack org connection (use slack-salesforce-integration-setup skill).

Best use case

flow-for-slack is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use this skill when using Salesforce Flow Core Actions for Slack to send messages, create/archive channels, add users, check user connectivity, or launch flows from Slack — including prerequisite setup of the Salesforce for Slack managed package and required permission sets. Triggers on: Send Slack Message from Flow, Create Slack Channel action in Flow, Flow Core Actions for Slack not visible, Slack actions missing in Flow Builder, add users to Slack channel from Flow. NOT for Slack Workflow Builder (Slack-native tool that calls autolaunched Flows FROM Slack — use slack-workflow-builder skill), not for Agentforce Slack agent deployment (use agentforce-in-slack skill), not for initial Salesforce-Slack org connection (use slack-salesforce-integration-setup skill).

Teams using flow-for-slack should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/flow-for-slack/SKILL.md --create-dirs "https://raw.githubusercontent.com/PranavNagrecha/AwesomeSalesforceSkills/main/skills/flow/flow-for-slack/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/flow-for-slack/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How flow-for-slack Compares

Feature / Agentflow-for-slackStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use this skill when using Salesforce Flow Core Actions for Slack to send messages, create/archive channels, add users, check user connectivity, or launch flows from Slack — including prerequisite setup of the Salesforce for Slack managed package and required permission sets. Triggers on: Send Slack Message from Flow, Create Slack Channel action in Flow, Flow Core Actions for Slack not visible, Slack actions missing in Flow Builder, add users to Slack channel from Flow. NOT for Slack Workflow Builder (Slack-native tool that calls autolaunched Flows FROM Slack — use slack-workflow-builder skill), not for Agentforce Slack agent deployment (use agentforce-in-slack skill), not for initial Salesforce-Slack org connection (use slack-salesforce-integration-setup skill).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Flow for Slack

This skill activates when a practitioner needs to use Salesforce Flow Core Actions for Slack — the built-in action set that allows Salesforce Flows to send Slack messages, manage channels, and interact with Slack users. It covers the full action catalog, prerequisite setup, and common failure modes. It does NOT cover Slack Workflow Builder (the reverse direction, where Slack calls a Salesforce Flow) or Agentforce deployment in Slack.

---

## Before Starting

Gather this context before working on anything in this domain:

- Flow Core Actions for Slack require the **Salesforce for Slack managed package** installed from AppExchange AND a connected Slack workspace. Without the package, the actions are not visible in Flow Builder.
- The running user (or the process user for scheduled/platform event flows) must have either the **Sales Cloud for Slack** permission set or the **Slack Service User** permission set. Without this, actions fail at runtime with a permissions error.
- Actions fail silently if the workspace **OAuth token is revoked** — they disappear from Flow Builder or fault at runtime. Verify token status in Setup > Slack > Manage Slack Connection before troubleshooting.

---

## Core Concepts

### Full Flow Core Actions for Slack Catalog

Flow Core Actions for Slack went GA in Summer '22. The current action catalog includes:

| Action | Description |
|---|---|
| Send Slack Message | Posts a message to a Slack channel or DM |
| Send Message to Launch Flow | Posts a message with a button that triggers a Salesforce Flow when clicked |
| Create Channel | Creates a new Slack channel |
| Archive Channel | Archives an existing Slack channel |
| Add Users to Channel | Adds one or more Salesforce users to a Slack channel |
| Check if User Is Connected | Returns whether a Salesforce user has linked their Slack account |
| Get Conversation Info | Retrieves metadata about a Slack channel |

### Prerequisite Stack

Four prerequisites must all be satisfied for Slack actions to appear and function in Flow Builder:

1. **Salesforce for Slack managed package** installed (AppExchange — free)
2. **Salesforce org connected to Slack workspace** (see slack-salesforce-integration-setup skill)
3. **Running user has Sales Cloud for Slack or Slack Service User permission set**
4. **Workspace OAuth token is active** (not expired or revoked)

If any of these is missing, actions either don't appear in Flow Builder or fault at runtime with no clear error message.

### Send Message to Launch Flow

The "Send Message to Launch Flow" action posts a Slack message with a button. When the button is clicked by a Slack user, it invokes a specified Salesforce autolaunched Flow. This enables interactive approval workflows and user-driven automations from Slack. The target Flow must be an autolaunched Flow — not a screen flow or record-triggered flow.

### Asynchronous Execution Requirement for Record-Triggered Flows

Record-triggered Flows can use Slack actions ONLY in asynchronous execution paths (After Save, asynchronous). Attempting to call Slack actions in a synchronous before-save context causes errors. Any callout-based actions (including Slack) must run asynchronously in record-triggered flows.

---

## Common Patterns

### Pattern 1: Send Slack Notification from Record-Triggered Flow

**When to use:** Notify a Slack channel when a Salesforce record reaches a specific state (e.g., Opportunity stage change, Case escalation, Account score threshold).

**How it works:**

1. Create a Record-Triggered Flow on the target object (e.g., Opportunity).
2. Set execution to **After the record is saved** (asynchronous path).
3. Add an Action element, search "Send Slack Message".
4. Configure: Channel (Slack channel ID or name), Message (text with merge fields), and optional Thread timestamp for replies.
5. Save and activate the flow.

**Why not use before-save path:** Slack actions are callouts — they cannot execute synchronously in before-save context. Only after-save asynchronous paths support callout-based actions.

### Pattern 2: Create a Slack Channel from Flow on New Record

**When to use:** Automatically provision a dedicated Slack channel when a new record is created (e.g., create a deal room channel for every new Enterprise Opportunity).

**How it works:**

1. Create a Record-Triggered Flow on Opportunity.
2. After save, add Action "Create Channel".
3. Provide a channel name (derived from the record name — Slack channel names must be lowercase, max 80 chars, no spaces or special characters).
4. Add users to the channel using "Add Users to Channel" action with the Opportunity Owner and Account Team member IDs.
5. Store the returned channel ID in a custom field for future reference.

**Why not use manually:** For high-volume deal teams, manual channel creation is error-prone and slow. Automated provisioning from Flow ensures consistency.

### Pattern 3: Check User Connection Before Sending DM

**When to use:** Before sending a direct Slack message to a Salesforce user, verify they have connected their Salesforce and Slack accounts.

**How it works:**

1. Add Action "Check if User Is Connected" with the target User ID.
2. Branch on the result — if connected, proceed with "Send Slack Message" DM. If not connected, fall back to email notification.

**Why this matters:** Sending a DM to a user who hasn't connected their accounts fails silently or delivers to the wrong recipient.

---

## Decision Guidance

| Situation | Recommended Approach | Reason |
|---|---|---|
| Notify channel on record change | Send Slack Message in after-save record-triggered Flow | Standard pattern for CRM-to-Slack notifications |
| User-driven approval from Slack | Send Message to Launch Flow action | Button-triggered Flow invocation from Slack message |
| Auto-provision channel for new record | Create Channel action + Add Users to Channel | Consistent channel provisioning without manual work |
| Slack actions not in Flow Builder | Check package installed + workspace connected + permission set | All four prerequisites must be satisfied |
| Send DM to user | Check if User Is Connected first, then Send Slack Message | Avoid silent failures for unconnected users |

---

## Recommended Workflow

1. Confirm all four prerequisites: managed package installed, workspace connected, running user permission set assigned, OAuth token active.
2. Open Flow Builder and verify Slack actions appear in the Action catalog — if not, address prerequisites first.
3. For record-triggered flows, set execution context to after-save (asynchronous) before adding Slack actions.
4. Configure the Slack action with the correct channel reference — use Slack channel ID (not display name) for reliability.
5. For "Create Channel" actions, ensure channel names are lowercase, max 80 characters, no spaces, no special characters other than hyphens.
6. For "Send Message to Launch Flow", ensure the target Flow is an autolaunched Flow, activated, and the button label is clear.
7. Test in a sandbox: verify the Slack action executes and the message appears correctly before activating in production.

---

## Review Checklist

- [ ] Salesforce for Slack managed package installed in the org
- [ ] Salesforce org connected to Slack workspace (Manage Slack Connection in Setup)
- [ ] Running user has Sales Cloud for Slack or Slack Service User permission set
- [ ] Workspace OAuth token is active (not revoked)
- [ ] Record-triggered flows use after-save asynchronous execution path for Slack actions
- [ ] Channel names for Create Channel follow Slack naming rules (lowercase, no spaces, max 80 chars)
- [ ] User connection checked before sending DMs
- [ ] Target Flow for Send Message to Launch Flow is an activated autolaunched Flow

---

## Salesforce-Specific Gotchas

1. **Actions Invisible in Flow Builder Without Package** — If the Salesforce for Slack managed package is not installed, no Slack actions appear in Flow Builder's action search. This is a silent omission — there is no warning that the package is missing.

2. **Permission Set Missing Causes Silent Runtime Fault** — If the running user lacks Sales Cloud for Slack or Slack Service User permission set, Slack actions execute and appear to succeed in Flow Builder but fault at runtime without a clear permission error. Check flow fault paths to surface these errors.

3. **Revoked OAuth Token Makes Actions Disappear** — If the Slack workspace OAuth token is revoked (e.g., a Slack workspace admin revokes app access), Slack actions disappear from Flow Builder and fail silently at runtime. Verify token status in Setup before debugging.

4. **Synchronous Slack Actions in Before-Save Flows** — Attempting to call any Slack action in a before-save synchronous path causes a governor limit error (callouts not permitted in synchronous transactions). Always use after-save asynchronous execution.

5. **Channel Names Must Be Slack-Compatible** — Slack channel names must be lowercase, cannot contain spaces or most special characters (only hyphens allowed), and must be 80 characters or fewer. Flow variable substitution that produces uppercase or spaced values will cause the Create Channel action to fail at runtime.

---

## Output Artifacts

| Artifact | Description |
|---|---|
| Configured Salesforce Flow | Record-triggered or scheduled Flow using Slack Core Actions |
| Prerequisite setup checklist | Managed package, workspace connection, permission sets, OAuth token |
| Channel naming convention | Lowercase, hyphen-separated naming pattern for auto-provisioned channels |

---

## Related Skills

- slack-salesforce-integration-setup — for connecting Salesforce org to Slack workspace (prerequisite)
- slack-workflow-builder — for the reverse direction: Slack-native Workflow Builder calling Salesforce Flows
- flow-email-and-notifications — for non-Slack notification channels from Salesforce Flow
- agentforce-in-slack — for Agentforce agent deployment in Slack channels

Related Skills

ip-range-and-login-flow-strategy

8
from PranavNagrecha/AwesomeSalesforceSkills

Design and implement Salesforce Login Flows (Screen Flows assigned to profiles or Experience Cloud sites) that run post-authentication to enforce conditional MFA, IP-based branching, terms-of-service acceptance, or user data collection. Covers Login Flow creation in Flow Builder, profile/site assignment, IP-aware decision logic, and ConnectedAppPlugin extension points. NOT for static IP allowlisting or profile Login IP Ranges (see network-security-and-trusted-ips), org-wide session policies, or SSO/SAML IdP configuration.

customer-data-request-workflow

8
from PranavNagrecha/AwesomeSalesforceSkills

Implement GDPR/CCPA data subject rights (access, deletion, rectification) using Salesforce Privacy Center and/or custom workflow. NOT for general backup or org-level data retention policy.

omnistudio-vs-flow-decision

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when choosing between OmniStudio (OmniScript / Integration Procedure / FlexCard / DataRaptor) and Flow / Screen Flow / Apex for a given capability. Triggers: 'omnistudio or flow', 'omniscript vs screen flow', 'integration procedure vs subflow', 'flexcard vs lightning page'. NOT for general automation selection across Workflow/Process Builder/Apex (see automation-selection tree).

lwc-in-flow-screens

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when building, reviewing, or troubleshooting a custom Lightning Web Component that runs inside a Flow screen element, covering @api props exposed to Flow, FlowAttributeChangeEvent for output, validate() for user input validation, and flow navigation events. Triggers: 'lwc in flow screen', 'FlowAttributeChangeEvent', 'flow screen component not updating', 'flow validate method', 'flow navigation from lwc'. NOT for custom property editors (use custom-property-editor-for-flow), NOT for embedding a flow inside an LWC (use flow/screen-flows), NOT for auto-launched flows.

custom-property-editor-for-flow

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when building or reviewing an LWC Custom Property Editor for Flow screen or action configuration, including the `configurationEditor` metadata hook, builder-side APIs, validation, and value-change events. Triggers: 'custom property editor', 'Flow configuration editor', 'builderContext', 'inputVariables', 'configurationEditor'. NOT for ordinary runtime screen-component behavior when no Flow Builder design-time customization is involved.

slack-workflow-builder

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when designing or troubleshooting Slack Workflow Builder workflows that call Salesforce — especially the Salesforce connector step Run a Flow, mapping inputs/outputs, handling failures, and understanding limits. Triggers on: Slack Workflow Builder Salesforce, Run a Flow from Slack, autolaunched flow from Slack, Slack automation calling Salesforce. NOT for Salesforce Flow Builder tutorials unrelated to Slack (use flow skills), not for Flow Core Actions that send Slack messages from Salesforce (use flow-for-slack), not for initial org-to-workspace connection (use slack-salesforce-integration-setup), and not for building custom Slack apps outside Workflow Builder.

slack-salesforce-integration-setup

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when setting up or troubleshooting the Salesforce for Slack managed app — including connecting a Salesforce org to a Slack workspace, configuring the three-party admin handshake, linking Slack channels to Salesforce records, enabling record preview sharing, and managing org-level limits. Triggers on: Salesforce for Slack app not connecting, Slack org connection setup, Salesforce record sharing in Slack, Slack workspace admin approval, connecting Salesforce to Slack. NOT for building custom Slack apps or Slack bots (separate development platform), not for Slack Workflow Builder Salesforce connector (use slack-workflow-builder skill), not for Flow-based Slack messaging (use flow-for-slack skill).

slack-connect-patterns

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when designing, governing, or troubleshooting Slack Connect channel sharing between two independent organizations. Trigger phrases: external Slack channel collaboration, cross-org Slack channel setup, Slack Connect DLP policy, Slack partner channel governance, regulated industry Slack Connect compliance. Does NOT cover Salesforce-to-Salesforce integration, Salesforce for Slack app setup, or internal single-workspace Slack channels. NOT for Salesforce-to-Salesforce integration.

oauth-flows-and-connected-apps

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when choosing or reviewing Salesforce OAuth flows and connected-app policy for integrations, including client credentials, JWT bearer, authorization code, device flow, scopes, and token lifecycle controls. Triggers: 'OAuth flow', 'connected app', 'client credentials', 'JWT bearer', 'refresh token', 'integration user'. NOT for record-level sharing design or for simple Named Credential usage when the auth-flow decision is already settled.

workflow-rule-to-flow-migration

8
from PranavNagrecha/AwesomeSalesforceSkills

Migrate Workflow Rules to record-triggered Flows: field update mapping, email alert migration, outbound message alternatives using Flow Core Actions, time-based workflow replacement with Scheduled Paths. NOT for Process Builder migration (use process-builder-to-flow-migration), NOT for building new flows from scratch.

subflows-and-reusability

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when extracting reusable Flow logic into subflows, defining input and output variables, keeping parent flows maintainable, and sharing common automation contracts across multiple flows. Triggers: 'reuse this flow logic', 'how should subflow variables work', 'too much duplicated flow logic', 'subflow contract design'. NOT for Apex-called Flow execution direction or Flow Orchestration process design.

screen-flows

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when designing or reviewing interactive Flow screen experiences, including navigation, validation, screen component choice, custom LWC screen components, and user-safe commit timing. Triggers: 'screen flow validation', 'back button behavior in flow', 'custom flow screen component', 'screen flow UX'. NOT for Experience Cloud guest exposure or custom property editor design-time tooling.