Back to Blog
n8nSalesforceintegrationCRMautomation

n8n + Salesforce Integration: 5 Workflows to Automate Your CRM

n8nautomation TeamApril 11, 2026
TL;DR: n8n connects directly to Salesforce via its built-in node, letting you automate lead routing, contact syncing, deal alerts, and reporting without writing Apex code. This guide covers five production-ready workflows you can build today.

The n8n Salesforce integration gives you direct access to leads, contacts, opportunities, accounts, and custom objects — all through a visual workflow builder. Instead of paying for expensive Salesforce add-ons or writing Apex triggers, you can wire up automations in minutes using n8n's built-in Salesforce node. Whether you need to route inbound leads, keep your spreadsheets in sync, or send deal alerts to Slack, n8n handles it without writing a single line of code.

Why Automate Salesforce with n8n

Salesforce is powerful, but its built-in automation tools — Flow Builder, Process Builder, and Apex — come with steep learning curves and platform lock-in. n8n sits outside your Salesforce org and connects it to 400+ other services. That means you can build workflows that span Salesforce, Slack, Google Sheets, email providers, databases, and AI models in a single canvas.

Here's what makes n8n a strong fit for Salesforce automation:

  • No per-user Salesforce license costs — n8n authenticates via a single connected app, so you don't need additional Salesforce seats for your automations
  • Cross-platform workflows — trigger actions in Salesforce based on events in Stripe, HubSpot, Jira, or any API
  • Full data control — self-host or use managed hosting like n8nautomation.cloud to keep your CRM data within your infrastructure
  • No execution limits — unlike Salesforce Flow, which counts against your org's governor limits, n8n runs on its own compute

Connecting Salesforce to n8n

Before building workflows, you need to set up a Salesforce Connected App and configure OAuth credentials in n8n. Here's the process:

  1. In Salesforce Setup, navigate to App Manager and click New Connected App
  2. Enable OAuth Settings and add the scopes api, refresh_token, and offline_access
  3. Set the callback URL to your n8n instance's OAuth callback path: https://your-instance.n8nautomation.cloud/rest/oauth2-credential/callback
  4. Copy the Consumer Key and Consumer Secret from the connected app
  5. In n8n, add a new Salesforce OAuth2 API credential, paste your key and secret, and click Connect

Tip: If you're using a Salesforce sandbox for testing, change the environment toggle to "Sandbox" in your n8n Salesforce credential settings. This points authentication to test.salesforce.com instead of login.salesforce.com.

Once connected, the Salesforce node gives you access to operations on Leads, Contacts, Opportunities, Accounts, Cases, Tasks, and Custom Objects — covering virtually every standard CRM workflow.

Workflow 1: Route New Leads Instantly

Slow lead response kills conversion rates. This workflow checks Salesforce for new leads every minute and routes them to the right sales rep based on territory, deal size, or product interest.

Nodes used:

  1. Schedule Trigger — runs every 60 seconds
  2. Salesforce node — operation: Get All on the Lead object, filtered by CreatedDate = TODAY and OwnerId = unassigned queue ID
  3. Switch node — routes based on the State or Country field to match territory rules
  4. Salesforce node — operation: Update on the Lead object, setting OwnerId to the assigned rep's Salesforce user ID
  5. Slack node — sends a message to the rep's channel: "New lead assigned: {{$json.Company}} — {{$json.Email}}"

The Switch node is where your routing logic lives. You can add as many output branches as you have territories. Each branch connects to its own Salesforce Update node with the correct owner ID hardcoded or pulled from a lookup table in Google Sheets.

Workflow 2: Sync Contacts Between Salesforce and Google Sheets

Many teams maintain a master contact list in Google Sheets for marketing, customer success, or executive reporting. This workflow keeps it current without manual exports.

Nodes used:

  1. Schedule Trigger — runs daily at 6:00 AM
  2. Salesforce node — operation: Get All on the Contact object with fields: Name, Email, Phone, Account.Name, LastModifiedDate
  3. Google Sheets node — operation: Read Rows to fetch existing entries
  4. Merge node — mode: Combine By Matching Fields, matching on Email to identify new and updated contacts
  5. Google Sheets node — operation: Append or Update Row for each matched/new contact

The Merge node is key here. By matching on email, you avoid duplicates and only update rows where Salesforce data has changed. For large orgs with thousands of contacts, add a WHERE LastModifiedDate >= YESTERDAY SOQL filter in the Salesforce node to limit the query to recently changed records.

Workflow 3: Slack Alerts for Opportunity Stage Changes

Sales managers need to know the moment a deal moves to "Negotiation" or "Closed Won." This workflow watches for stage changes and sends formatted Slack notifications.

Nodes used:

  1. Schedule Trigger — runs every 5 minutes
  2. Salesforce node — operation: Get All on Opportunity, filtered with SOQL: WHERE StageName IN ('Negotiation/Review','Closed Won','Closed Lost') AND LastModifiedDate >= LAST_N_MINUTES:5
  3. IF node — checks StageName value to determine the notification type
  4. Slack node — sends a rich message to #sales-pipeline with the opportunity name, amount, stage, and owner

For Closed Won deals, you can extend this workflow with a branch that creates an invoice in Stripe or Xero, or triggers an onboarding sequence in your project management tool.

Note: Salesforce API rate limits apply. The default is 100,000 API calls per 24 hours for Enterprise Edition. Polling every 5 minutes with a few workflows stays well under this limit, but monitor your usage in Setup → Company Information if you add many workflows.

Workflow 4: Enrich Leads with AI Using n8n and Salesforce

Raw leads from web forms often have minimal data — just a name and email. This workflow enriches them automatically before a rep ever sees the record.

Nodes used:

  1. Webhook node — receives a POST request from your web form or Salesforce outbound message
  2. HTTP Request node — calls a company data API (like Clearbit or Apollo) with the lead's email domain to fetch company size, industry, and location
  3. OpenAI node — generates a lead summary: "Based on [Company] in [Industry] with [size] employees, suggest the best product tier and talking points"
  4. Salesforce node — operation: Update on the Lead object, writing enrichment data to custom fields (Company_Size__c, AI_Summary__c)
  5. Slack node — notifies the assigned rep with the enriched lead profile

This is where hosting on n8nautomation.cloud pays off. Webhook-triggered workflows need your n8n instance running 24/7 with a stable URL. Managed hosting handles uptime, SSL, and backups so your lead enrichment never goes down.

Workflow 5: Automated Weekly Pipeline Reports

Instead of pulling Salesforce reports manually every Monday, this workflow generates a pipeline summary and delivers it to your inbox or Slack channel.

Nodes used:

  1. Schedule Trigger — runs every Monday at 8:00 AM
  2. Salesforce node — operation: Get All on Opportunity with SOQL: WHERE IsClosed = false AND CloseDate = THIS_QUARTER
  3. Code node — aggregates the data: total pipeline value, deal count by stage, average deal size, and top 5 deals by amount
  4. OpenAI node — (optional) generates a natural-language summary of the pipeline state and week-over-week changes
  5. Gmail node — sends the formatted report to the sales team distribution list

The Code node handles the aggregation with a few lines of JavaScript:

const opps = $input.all().map(i => i.json);
const totalValue = opps.reduce((sum, o) => sum + (o.Amount || 0), 0);
const byStage = {};
opps.forEach(o => {
  byStage[o.StageName] = (byStage[o.StageName] || 0) + 1;
});
const top5 = opps.sort((a, b) => b.Amount - a.Amount).slice(0, 5);
return [{ json: { totalValue, byStage, top5, dealCount: opps.length } }];

This gives your leadership team a consistent, automated view of the pipeline without anyone logging into Salesforce. You can extend it by storing weekly snapshots in a database to track pipeline trends over time.

Tip: Use n8n's built-in error handling to add an Error Trigger workflow that notifies you in Slack if any Salesforce workflow fails. This way you catch expired OAuth tokens or API limit issues before they affect your sales process.

These five workflows cover the most common Salesforce automation needs — lead management, data syncing, notifications, AI enrichment, and reporting. Each one runs reliably on a managed n8n instance at n8nautomation.cloud, starting at $15/month with no execution limits. Pick the workflow closest to your biggest time sink and build it first. Most take under 30 minutes to set up.

Ready to automate with n8n?

Get affordable managed n8n hosting with 24/7 support.