Salesforce + Slack: never miss a stale deal follow up
Stale deals don’t usually die loudly. They just sit there in Salesforce, untouched, while your team swears they’ll “follow up tomorrow.” Then “tomorrow” turns into next week.
Sales Ops feels it first, because reporting gets messy fast. Sales Managers feel it in forecast calls. And if you run a small agency or services business, you feel it in cash flow. This Salesforce Slack follow-ups automation makes stalled Opportunities impossible to ignore, without you nagging people all day.
It runs every morning, finds deals that haven’t moved stages, drafts the follow-up for you, posts a clean summary to Slack, and creates a Salesforce Task so the owner has a clear next action.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Salesforce + Slack: never miss a stale deal follow up
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Edit Fields", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/salesforce.svg' width='40' height='40' /></div><br/>Perform a query"]
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/salesforce.svg' width='40' height='40' /></div><br/>Get an opportunity"]
n4@{ icon: "mdi:robot", form: "rounded", label: "Message a model", pos: "b", h: 48 }
n5@{ icon: "mdi:web", form: "rounded", label: "query_soql", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Create Task"]
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Parse JSON"]
n8@{ icon: "mdi:message-outline", form: "rounded", label: "Send Email SMTP Customer", pos: "b", h: 48 }
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/slack.svg' width='40' height='40' /></div><br/>Send Message To Internal Team"]
n7 --> n8
n7 --> n6
n7 --> n9
n5 -.-> n4
n1 --> n2
n4 --> n7
n2 --> n3
n0 --> n1
n3 --> n4
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n4 ai
class n5,n6 api
class n7 code
classDef customIcon fill:none,stroke:none
class n2,n3,n6,n7,n9 customIcon
The Challenge: Stale Opportunities That Quietly Kill Revenue
If your pipeline is even moderately busy, “stale” deals are guaranteed. Reps get pulled into calls, proposals, internal fires, and suddenly an Opportunity hasn’t moved stages in two weeks. The worst part is that the work to fix it is scattered: check the Opportunity, skim Notes, figure out who the main Contact is, craft a follow-up, then remember to log a Task so it’s trackable. That context switching is exhausting, so the follow-up gets delayed again. And again.
It adds up fast. Here’s where it breaks down in real teams:
- Someone has to manually hunt for stuck deals, usually right before a pipeline meeting.
- Follow-ups get written from scratch, which means inconsistent tone and missed details from prior Notes.
- Slack reminders happen, but they’re vague, so nobody knows what to do next.
- Without a Task tied to the Opportunity owner, accountability turns into “I thought you handled it.”
The Fix: Daily Stale-Deal Detection + AI Follow-Up Drafts
This workflow runs automatically every morning at 8:00 and checks Salesforce for Opportunities that have been sitting in the same stage for too long. You choose the threshold (7 days, 14 days, 30 days) and the workflow queries for deals where your Stage_Unchanged_Days__c matches that value, excluding Closed Won and Closed Lost. For each stale Opportunity, it pulls the full record, then sends the deal context to an OpenAI model. The model can also fetch recent Notes, the primary Contact, and the Opportunity Owner via a SOQL helper, then returns one structured JSON response with everything you need: a client email draft, an SMS template, a Slack-ready summary, and a Salesforce Task payload. n8n parses that JSON, sends the email through SMTP, posts the summary to Slack, and creates the Task assigned to the Opportunity owner so the deal gets a real next step.
The workflow starts on a schedule and immediately sets your “stale” definition. Then it finds matching Opportunities, loops through them, and generates drafts using the deal’s real history (Notes and owner/contact context). Finally, it dispatches three outcomes in parallel: email out, Slack update in, and a Salesforce Task logged where it belongs.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you have 12 stale Opportunities in a week. Manually, a rep might spend about 10 minutes per deal to open the record, scan Notes, find the right contact, draft a follow-up, and then create a Task. That’s about 2 hours of pure admin. With this automation, the rep spends maybe 5 minutes reviewing what’s drafted (Slack summary plus email), then hits send or tweaks wording. The busywork drops to about an hour, and the follow-up actually happens.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Salesforce to query Opportunities and assign Tasks
- Slack to notify the team or deal owner
- OpenAI API key (get it from the OpenAI dashboard)
Skill level: Intermediate. You’ll connect credentials, edit a SOQL query, and test with a few Opportunities.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
Morning schedule kicks it off. At 8:00 each day, the workflow starts and sets your stale threshold (for example, 14 days in the same stage).
Salesforce gets queried for stalled deals. It pulls Opportunities where Stage_Unchanged_Days__c matches the threshold and the stage is not Closed Won or Closed Lost, then fetches full deal details per Opportunity.
AI drafts the next actions with real context. The OpenAI step generates one structured JSON response that includes an email, an SMS template, a Slack summary, and a Salesforce Task payload. It can also pull recent Notes, the primary Contact, and the owner using a SOQL helper call.
Messages go out and the Task gets logged. n8n parses the JSON, sends the client email via SMTP, posts the summary to Slack, and creates a Salesforce Task assigned to the Opportunity owner.
You can easily modify the stale threshold to match your pipeline rhythm, or change the Slack destination from a channel to a specific rep based on ownership. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the workflow timing so the automation runs on a consistent schedule.
- Add and open Scheduled Automation Start.
- Set the schedule rule to run at Hour
8(as configured under the interval trigger). - Connect Scheduled Automation Start to Assign Stale Threshold.
Step 2: Connect Salesforce and Identify Stale Opportunities
Define the stale window and query Salesforce for opportunities that have not changed recently.
- Open Assign Stale Threshold and set the stale_days value to
14. - Open Retrieve Stale Opportunities and set Resource to
search. - Set the Query to
=Select id from opportunity where Stage_Unchanged_Days__c = {{ $json.stale_days }} And StageName Not In ('Closed Won', 'Closed Lost'). - Credential Required: Connect your salesforceOAuth2Api credentials for Retrieve Stale Opportunities.
- Open Fetch Opportunity Record and set Resource to
opportunityand Operation toget. - Set Opportunity ID to
={{ $json.Id }}. - Credential Required: Connect your salesforceOAuth2Api credentials for Fetch Opportunity Record.
Step 3: Set Up the AI Drafting Assistant
Use the AI model to draft the email, SMS, Slack message, and task payload based on Salesforce data.
- Open Generate Follow-Up Drafts and confirm the model is set to
gpt-5.1. - Ensure the system prompt includes the full instructions and the JSON output schema as configured.
- Credential Required: Connect your openAiApi credentials for Generate Follow-Up Drafts.
- Open SOQL Query Helper and set URL to
https://[mydomain].salesforce.com/services/data/v64.0/query/. - Set the query parameter q to
={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', ``, 'string') }}. - Credential Required: Connect your salesforceOAuth2Api credentials for SOQL Query Helper.
- Confirm SOQL Query Helper is connected as an AI tool for Generate Follow-Up Drafts (credentials are configured on the tool node).
Step 4: Parse the AI Output
Convert the AI response into structured JSON for downstream actions.
- Open Extract Draft Output and set JavaScript Code to
return JSON.parse($input.first().json.output[0].content[0].text). - Ensure Generate Follow-Up Drafts connects to Extract Draft Output.
Extract Draft Output outputs to both Dispatch Client Email, Create Follow-Up Task, and Notify Internal Slack in parallel.
Step 5: Configure Output Actions
Send the drafted messages and create a Salesforce task for the opportunity owner.
- Open Dispatch Client Email and set To Email to
={{ $json.email.to }}. - Set Subject to
={{ $json.email.subject }}and Text to={{ $json.email.body }}. - Set From Email to
[YOUR_EMAIL]and Email Format totext. - Credential Required: Connect your smtp credentials for Dispatch Client Email.
- Open Notify Internal Slack and set Text to
={{ $('Extract Draft Output').item.json.slack.message }}. - Set Channel to your target channel ID (currently
[YOUR_ID]). - Credential Required: Connect your slackApi credentials for Notify Internal Slack.
- Open Create Follow-Up Task and set URL to
https://[mydomain ].salesforce.com/services/data/v60.0/sobjects/Task. - Set Method to
POST, Specify Body tojson, and JSON Body to={{ $json.task.api_body }}. - Credential Required: Connect your salesforceOAuth2Api credentials for Create Follow-Up Task.
Step 6: Test & Activate
Validate the workflow end-to-end, then turn it on for daily execution.
- Click Execute Workflow to run Scheduled Automation Start manually.
- Confirm that Retrieve Stale Opportunities returns records and Fetch Opportunity Record pulls full details.
- Verify Generate Follow-Up Drafts produces output that Extract Draft Output parses into
email,sms,slack, andtaskobjects. - Check that the email is sent by Dispatch Client Email, a Slack message is posted by Notify Internal Slack, and a task is created by Create Follow-Up Task.
- When successful, toggle the workflow to Active so it runs at the scheduled time.
Watch Out For
- Salesforce OAuth credentials can expire or lack the right scopes. If things break, check the Salesforce connected app and the n8n credential status first.
- If you’re querying Notes or related objects through the SOQL helper, your Salesforce permissions matter. A user that can read Opportunities but not Notes will produce thin AI drafts.
- Default AI prompts are generic. Add your product language and tone in the OpenAI “Generate Follow-Up Drafts” step early, or you will keep rewriting messages every morning.
Common Questions
About 30–45 minutes if your Salesforce, Slack, SMTP, and OpenAI credentials are ready.
Yes, but someone should be comfortable editing a Salesforce query and testing with a few Opportunities. No app code is required.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs, which are usually a few cents per batch of deals depending on message length.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
You can change the stale definition in the “Assign Stale Threshold” step, and refine which deals qualify by editing the SOQL in “Retrieve Stale Opportunities.” If you want different messaging, adjust the prompt in “Generate Follow-Up Drafts,” then keep the same JSON structure so “Extract Draft Output” can still route email, Slack, and the Task payload. Common customizations include routing Slack messages to the owner instead of a channel, filtering by minimum amount, and skipping certain record types.
Usually it’s expired OAuth credentials or missing permissions on the Salesforce user tied to the n8n credential. Check that the user can read Opportunities, related Contacts, and any Notes you’re pulling via SOQL, then re-auth in n8n and re-run a single test deal.
On n8n Cloud Starter, you’re typically fine for a small team doing daily checks, and higher plans handle more volume. If you self-host, there’s no execution limit; it mainly depends on your server and Salesforce/OpenAI rate limits. In practice, this workflow processes deals one-by-one through the AI step, so if you have a large backlog (hundreds of stale deals), expect the run to take a while and consider batching or limiting the query.
Often, yes. This workflow mixes a scheduled Salesforce query, AI generation that returns structured JSON, and a multi-branch output (email + Slack + Task) in one place, which is easier to maintain in n8n when logic grows. n8n also gives you a self-hosting path if you don’t want per-task pricing to creep up as volume increases. Zapier or Make can still be fine for a simple “find records then send a Slack message” setup. The moment you care about consistent drafts, SOQL helpers, or Salesforce Task payloads, n8n is usually the cleaner option. Talk to an automation expert if you’re weighing tradeoffs.
Once this is live, stalled deals stop slipping through the cracks, and your team gets a clear next action every morning. Set it up once, then let the workflow do the nudging.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.