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.
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.