Alert Slack on large Salesforce opportunities using n8n

low complexityCost: $0-24/moRecommended

Prerequisites

Prerequisites
  • n8n instance (cloud or self-hosted)
  • Salesforce Connected App with OAuth credentials (Consumer Key + Secret)
  • Slack app with Bot Token (chat:write scope)

Why n8n?

n8n gives you richer Slack formatting than Salesforce's native Send Slack Message action. With n8n, you can build full Block Kit messages with sections, context blocks, account details, and deep links. Self-hosted n8n is free with unlimited executions, and the visual editor makes it easy to add logic like routing different deal sizes to different channels.

The trade-off is polling latency. n8n checks Salesforce for new Opportunities every 1-5 minutes instead of firing instantly like Flow Builder. For most teams, this delay is acceptable — leadership doesn't need to know about a new deal within seconds.

How it works

  • Salesforce Trigger node polls for new Opportunities at a configurable interval (default: 1 minute)
  • IF node checks whether the Amount exceeds your threshold (e.g., $50,000)
  • Salesforce node fetches the Account name for additional context
  • Slack node posts a Block Kit message with deal name, amount, stage, owner, account, and a direct Salesforce link

Step 1: Create a Salesforce Connected App

In Salesforce Setup, navigate to App Manager and click New Connected App:

  • Enable OAuth Settings: checked
  • Callback URL: your n8n OAuth callback URL (e.g., https://your-n8n.app.n8n.cloud/rest/oauth2-credential/callback)
  • OAuth Scopes: Full access (full) or at minimum api and refresh_token

Save and copy the Consumer Key and Consumer Secret.

Step 2: Add Salesforce Trigger

Add a Salesforce Trigger node:

  • Credential: Create a new Salesforce OAuth2 credential using the Connected App keys
  • Event: Opportunity Created

This polls Salesforce for new Opportunities on your configured interval.

Step 3: Filter by amount

Add an IF node:

  • Condition: {{ $json.Amount }} greater than 50000

Only opportunities over $50K proceed to the next step.

Configurable threshold

Store the threshold in workflow static data so you can change it without editing the IF node: $getWorkflowStaticData('global').dealThreshold || 50000.

Step 4: Fetch Account details

Add a Salesforce node to get the Account name:

  • Operation: Get
  • Object: Account
  • Record ID: {{ $('Salesforce Trigger').first().json.AccountId }}

Step 5: Send Slack alert

Add a Slack node:

  • Channel: #executive-deals or #sales-leadership
  • Message Type: Block Kit
{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": ":dart: *New Large Opportunity Created*\n*{{ $('Salesforce Trigger').first().json.Name }}*\nAmount: *${{ parseFloat($('Salesforce Trigger').first().json.Amount).toLocaleString() }}*\nStage: {{ $('Salesforce Trigger').first().json.StageName }}\nOwner: {{ $('Salesforce Trigger').first().json.Owner.Name }}\nAccount: {{ $('Get Account').first().json.Name }}"
      }
    },
    {
      "type": "context",
      "elements": [
        {
          "type": "mrkdwn",
          "text": "<https://your-org.lightning.force.com/lightning/r/Opportunity/{{ $('Salesforce Trigger').first().json.Id }}/view|View in Salesforce>"
        }
      ]
    }
  ]
}

Replace your-org with your Salesforce domain.

Step 6: Activate

  1. Test by creating an Opportunity over $50K in Salesforce
  2. Verify the Slack alert appears with correct deal details
  3. Toggle the workflow to Active

Troubleshooting

Common questions

How many n8n executions does this workflow use per day?

Each poll cycle is 1 execution, regardless of how many Opportunities are returned. At 1-minute intervals, that's 1,440 executions/day. n8n Cloud Starter includes 2,500/month — so this workflow alone would exceed that. Either increase the poll interval to 5 minutes (288/day) or self-host for unlimited executions.

Does each Opportunity count as a separate execution?

No. The poll is 1 execution. Downstream nodes (IF, Salesforce Get, Slack) process each record within that same execution. If 5 large deals are created in one poll cycle, it's still 1 execution.

Can I route different deal sizes to different Slack channels?

Yes. Replace the IF node with a Switch node. Route $50-100K deals to #sales-leadership and $100K+ deals to #executive-deals. Each branch gets its own Slack node with a different channel configured.

Cost

  • n8n Cloud: Each trigger poll counts as 1 execution. Deals under $50K stop at the IF node but still count as 1 execution.
  • Self-hosted: Free, unlimited executions.

Looking to scale your AI operations?

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