At a Glance — n8n Salesforce Integration
- Native node included: Salesforce node supports Leads, Contacts, Accounts, Opportunities, Cases, Tasks, and custom objects — plus a Trigger node for real-time record events
- Auth: OAuth2 Connected App — Setup → App Manager → New Connected App; enable OAuth, add n8n callback URL, copy Consumer Key + Secret, set scopes to
api refresh_token - Trigger options: Salesforce Trigger node (polls at interval, min 1 min) or Outbound Messaging via Process Builder/Flow (real-time, within seconds — requires Salesforce admin)
- Custom objects: Use the 'Custom Object' resource in the node; for SOQL queries or bulk operations, use HTTP Request node with Salesforce OAuth2 credentials to call the REST API directly
- Most common workflows: New lead → Slack/email alert, deal Won → QuickBooks invoice, Jira issue created → Salesforce case, Zendesk ticket → Salesforce case
- n8n vs Salesforce Flow: Use Salesforce Flow for within-Salesforce logic; use n8n for anything that moves data between Salesforce and external systems
n8n Salesforce Node Overview
n8n ships with a Salesforce node that covers the core CRM objects: Leads, Contacts, Accounts, Opportunities, Cases, Tasks, and custom objects. There is also a Salesforce Trigger node for reacting to new or updated records. Authentication is OAuth2 via a Salesforce Connected App — the same mechanism Salesforce uses for all its API integrations.
The most important distinction: n8n is for cross-system automation. If you need to update a field in Salesforce based on another Salesforce record, use Salesforce Flow. If you need to sync a Salesforce lead to Slack, create a Zendesk ticket when a Salesforce case opens, or push deal data to QuickBooks — n8n is the right tool.
Connecting Salesforce to n8n
You need a Salesforce Connected App to generate OAuth2 credentials. This is a one-time setup done by a Salesforce admin:
- In Salesforce Setup, search for App Manager → click New Connected App
- Name it "n8n Integration", set contact email
- Under API (Enable OAuth Settings): check Enable OAuth Settings
- Set Callback URL to your n8n OAuth callback URL (shown in the n8n credential form)
- Add OAuth scopes: Full access (full) or more granular:
api,refresh_token,offline_access - Save — wait 10 minutes for propagation, then copy Consumer Key and Consumer Secret
In n8n, create a Salesforce OAuth2 credential, enter the Consumer Key and Secret, select your environment (production or sandbox), and click Connect.
Always build and test n8n Salesforce workflows against your sandbox first. In the n8n Salesforce credential, set Environment to Sandbox. Sandbox orgs use a different login URL (test.salesforce.com), so you need a separate credential for sandbox vs production. The Connected App must be installed in the sandbox as well — done via Setup → App Manager in the sandbox org.
Workflow: Web Form → Salesforce Lead
The classic lead capture workflow: a form submission on your website creates a Salesforce lead automatically, without manual data entry.
- Webhook Trigger — receive form submission from Typeform, Tally, HubSpot forms, or your custom form
- Set node — map form fields to Salesforce Lead fields:
FirstName,LastName,Email,Company,Phone,LeadSource - Salesforce node (Lead → Get All) — search for existing lead by email to prevent duplicates
- IF node — does the lead already exist?
- Salesforce node (Lead → Create) — create new lead on false branch
- Salesforce node (Lead → Update) — update existing lead on true branch
- Slack node — post notification to your sales team channel: "New lead: [name] from [company]"
Setting LeadSource correctly on creation is important for attribution — pass the form name or UTM source as the lead source so your Salesforce reports accurately show where leads are coming from.
Workflow: Opportunity Stage Change → Multi-System Actions
When an opportunity moves to a new stage in Salesforce, downstream actions often need to happen in other systems: notify the delivery team, create a project in Monday.com, send a contract, or trigger an onboarding sequence.
- Salesforce Trigger — object: Opportunity, trigger: Updated, filter by
StageNamefield change - IF node — check
StageNamevalue (e.g. "Closed Won") - On "Closed Won" branch:
- Slack node — post to #sales: "Deal closed: [name], $[amount]"
- HTTP Request node — create Monday.com item for project delivery
- HubSpot node — update contact lifecycle stage to Customer
- On "Proposal/Price Quote" branch:
- HTTP Request node — trigger DocuSign or PandaDoc to send the contract template
The Salesforce Trigger node polls Salesforce at a set interval (configurable down to 1 minute). For true real-time triggers, configure Salesforce Outbound Messaging or a Flow-based webhook that POST to an n8n Webhook trigger instead.
Workflow: Salesforce Case ↔ Zendesk Ticket Sync
Support teams that use both Salesforce and Zendesk often need cases to be visible in both systems. This bidirectional sync keeps them in step:
Salesforce → Zendesk: Salesforce Trigger on Case create → Zendesk node (Ticket → Create) with subject, description, priority, and requester email. Store the Zendesk ticket ID back on the Salesforce Case via a Case → Update step.
Zendesk → Salesforce: Zendesk Trigger on ticket status change → Salesforce node (Case → Update) with the new status. Look up the Salesforce Case ID from the Zendesk ticket's custom field where you stored it in the first step.
See also: Zendesk to Salesforce sync with n8n for a detailed walkthrough of this pattern.
Running SOQL Queries from n8n
The n8n Salesforce node's "Get All" operations support simple filters, but for complex queries — multi-object joins, aggregate functions, conditional logic — you need SOQL (Salesforce Object Query Language). Use the HTTP Request node with your Salesforce OAuth2 credential:
- URL:
https://yourorg.salesforce.com/services/data/v58.0/query?q=SELECT+Id,Name,Amount+FROM+Opportunity+WHERE+StageName='Closed+Won'+AND+CloseDate=THIS_QUARTER - Method: GET
- Authentication: select your Salesforce OAuth2 credential
The response includes a records array. For paginated results (more than 2,000 records), check nextRecordsUrl in the response and loop until done is true.
Frequently asked questions
Does n8n have a native Salesforce node? Yes. n8n includes a built-in Salesforce node that supports Leads, Contacts, Accounts, Opportunities, Cases, Tasks, and custom objects. There is also a Salesforce Trigger node that fires on record create or update events using Salesforce outbound messaging or polling. Authentication is OAuth2, which you configure with a Salesforce Connected App. The node supports both Salesforce production and sandbox environments.
How do you connect n8n to Salesforce? Create a Connected App in Salesforce (Setup → Apps → App Manager → New Connected App). Enable OAuth settings, add the n8n OAuth callback URL as a redirect URI, and set scopes to 'Full access' or specific scopes like 'api', 'refresh_token'. Copy the Consumer Key and Consumer Secret. In n8n, create a Salesforce OAuth2 credential with these values and click Connect to authorize through the Salesforce OAuth2 flow.
What Salesforce objects can n8n read and write? The n8n Salesforce node natively supports: Leads (create, update, get, get all, delete, add to campaign), Contacts (create, update, get, get all, delete, add to campaign), Accounts (create, update, get, get all, delete), Opportunities (create, update, get, get all, delete), Cases (create, update, get, get all, delete), Tasks (create, update, get, get all, delete), and custom objects via the generic 'Custom Object' resource. For SOQL queries and bulk operations, use the HTTP Request node with Salesforce OAuth2 credentials to call the REST API directly.
How do you trigger n8n workflows from Salesforce events? Two approaches: (1) Salesforce Trigger node — n8n polls Salesforce for new or updated records at a set interval (minimum 1 minute). Set the object type and trigger condition (new record, updated field). (2) Outbound Messaging — configure Salesforce Process Builder or Flow to send an outbound message to your n8n webhook URL when a record change occurs. This is real-time (within seconds) but requires Salesforce admin configuration.
Can n8n sync Salesforce leads with other systems automatically? Yes. A common pattern is bidirectional sync: when a lead is created in Salesforce, n8n creates a matching contact in HubSpot, Mailchimp, or your marketing platform. When the lead's status changes in Salesforce, n8n updates the corresponding record in the other system. For the Salesforce → other direction, use the Salesforce Trigger node on record updates. For the other direction → Salesforce, trigger from the source system's webhook and write to Salesforce via the Salesforce node.
What is the difference between using n8n vs Salesforce Flow for automation? Salesforce Flow is native to Salesforce and ideal for automating actions within Salesforce — updating fields, creating records, sending alerts based on Salesforce triggers. n8n is better for cross-system automation — connecting Salesforce to external apps like Slack, Google Sheets, QuickBooks, or Zendesk. Use Salesforce Flow for Salesforce-internal logic, and n8n when you need to move data between Salesforce and systems outside the Salesforce ecosystem.
Need Salesforce Automation Built?
Entech Solutions builds n8n workflows connecting Salesforce to your full stack — Zendesk, Slack, QuickBooks, NetSuite, Monday.com, and more. See our n8n Salesforce integration service page, or get in touch to discuss your use case.