Send a Slack alert when a Salesforce deal changes stage using Flow Builder

low complexityCost: $0 (included)

Prerequisites

Prerequisites
  • Salesforce org with access to Flow Builder (Enterprise, Unlimited, or Developer edition)
  • Slack workspace with either the Salesforce for Slack app installed or an Incoming Webhook URL
  • Admin or System Administrator profile in Salesforce (required to create and activate flows)

Overview

Salesforce Record-Triggered Flows fire automatically when a record is created or updated. You'll create a flow that watches the Opportunity object for changes to the StageName field, then sends a Slack notification with the deal details and a link back to the record.

Record-Triggered Flows replace Workflow Rules and Process Builder

Salesforce retired Workflow Rules and Process Builder in December 2025. All new automations should use Record-Triggered Flows. If you have existing Process Builder automations sending Slack alerts, migrate them to flows.

Step 1: Create a new Record-Triggered Flow

Navigate to Setup → Flows → New Flow → Record-Triggered Flow.

Configure the trigger:

  • Object: Opportunity
  • Trigger the Flow When: A record is updated
  • Condition Requirements: All Conditions Are Met
  • Condition 1: StageName — Is Changed — True

Set When to Run the Flow for Updated Records to Only when a record is updated to meet the condition requirements.

This ensures the flow only fires when the StageName field actually changes, not on every Opportunity save.

Step 2: Add a Decision element (optional)

If you only want alerts for specific stage transitions, add a Decision element after the trigger:

  • Label: Check Stage
  • Outcome 1 — High-Value Stages:
    • StageName Equals Negotiation/Review
    • OR StageName Equals Closed Won
    • OR StageName Equals Closed Lost
  • Default Outcome: No alert needed

Route the High-Value Stages outcome to the Slack action. Route the default outcome to the end of the flow.

Skip this step if you want alerts for every stage change.

Step 3: Send a Slack notification

You have two options depending on your Slack setup.

Option A: Salesforce for Slack app (native action)

If your org has the Salesforce for Slack app installed:

  1. Add an Action element
  2. Search for Send Slack Message
  3. Configure:
    • Channel or DM: Enter your Slack channel ID (e.g., C0123456789)
    • Message: Use merge fields to build the message text

Example message:

🔄 Deal Stage Changed
{!Opportunity.Name} moved to {!Opportunity.StageName}
Amount: {!Opportunity.Amount}
Owner: {!Opportunity.Owner.Name}
View: {!Opportunity.Id}

Option B: HTTP Callout to Slack Incoming Webhook

For custom Block Kit formatting, use an HTTP Callout action:

  1. Go to Setup → Named Credentials and create a credential for your Slack webhook URL
  2. Go to Setup → External Services and register a new service pointing to the Slack webhook
  3. In your flow, add an Action element using the External Service callout

The HTTP body should be:

{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "🔄 *Deal Stage Changed*\n*Acme Corp — Enterprise License* moved to *Negotiation/Review*\nAmount: $125,000\nOwner: Jane Smith"
      }
    },
    {
      "type": "context",
      "elements": [
        {
          "type": "mrkdwn",
          "text": "<https://yourorg.my.salesforce.com/006XXXXXXXXXXXXXXX|View in Salesforce>"
        }
      ]
    }
  ]
}

In Flow Builder, replace the hardcoded values with merge fields like {'{'}!Opportunity.Name{'}'} and {'{'}!Opportunity.StageName{'}'}.

Named Credentials keep secrets out of flows

Never hardcode a Slack webhook URL directly in a flow. Use Named Credentials so the URL is stored securely and can be rotated without editing the flow.

Step 4: Activate the flow

  1. Click Save and give your flow a name (e.g., "Opportunity Stage Change → Slack Alert")
  2. Click Activate
  3. Test by editing an Opportunity's stage in Salesforce and verifying the Slack message appears
Governor limits in bulk updates

Record-Triggered Flows fire per record in bulk operations (Data Loader, API batch updates). Salesforce enforces governor limits — up to 2,000 records per transaction. If you bulk-update thousands of opportunities, the flow executes for each one. Consider adding entry conditions to limit which records trigger alerts in bulk scenarios.

Cost

Record-Triggered Flows and the Salesforce for Slack app are included in Enterprise, Unlimited, and Developer editions at no additional cost.

Need help implementing this?

We build and optimize automation systems for mid-market businesses. Let's discuss the right approach for your team.