n8n

How to Sync Salesforce Account and Contact Data?

Move company and contact data from a spreadsheet into Salesforce without manual typing. Great for sales teams importing lists from events, partners, or exports. The flow creates missing accounts and updates contacts by email.

When you run it, the system downloads a hosted Excel file, reads each row, and searches Salesforce for a matching account name. It removes duplicate companies in the file, creates accounts only when they do not exist, and keeps the account ID when a match is found. Then it upserts contacts by email and links them to the correct account. Merge, If, Set, and Rename Keys nodes control the logic so accounts are clean and contacts connect to the right place.

To set it up, provide a public file URL or replace the download step with your storage tool. Your sheet must include Company Name, First Name, Last Name, and Email. Expect faster imports and fewer errors, especially for quarterly list loads or trade show leads. Map fields carefully, verify the Account ID mapping on the contact node, and run a small test before a full import.

What are the key features?

  • Manual run that downloads an Excel file from a URL and parses rows
  • Salesforce account search using a name match to find existing records
  • Duplicate removal to keep only one account per company before creation
  • Conditional check to separate existing accounts from new accounts
  • Account creation only for companies not found in Salesforce
  • Rename Keys step to store the Salesforce Account ID for contact linking
  • Upsert contacts by email so updates do not create duplicates
  • Merge steps to bring together account and contact data for clean mapping

What are the benefits?

  • Reduce manual entry from hours to minutes for bulk imports
  • Eliminate duplicate accounts by checking names before creation
  • Improve contact accuracy by upserting with email as the unique key
  • Link every contact to the correct account using the account ID
  • Handle large spreadsheets reliably with clear checks and merges

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Salesforce. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager or by double clicking a Salesforce node, create a new Salesforce credential. Choose OAuth2, follow the on screen steps to sign in to your Salesforce org, and save the credential with a clear name like Salesforce Prod or Salesforce Sandbox.
  4. Open the Download file node and replace the sample URL with your hosted spreadsheet link. Make sure the link is publicly accessible or switch to another file source node if your file requires authentication.
  5. Open the Spreadsheet File node and confirm the file format is set correctly for your Excel file. Ensure the header row has columns named Company Name, First Name, Last Name, and Email.
  6. Open the Search Salesforce accounts node and review the SOQL query. Keep the name match logic or adjust the field names if your sheet uses different headers.
  7. Open the Create Salesforce account node and confirm that the Name field maps to the Company Name from the spreadsheet.
  8. Open the Create Salesforce contact node. Set the operation to Upsert and the external ID to Email. Map Last Name, First Name, and Email. In additional fields, set Account ID to the value from the Account ID field in the flow. Make sure the field key is accountId in Salesforce.
  9. Run a small test with a few rows. Check Salesforce to confirm that no duplicate accounts were created and that contacts are linked to the correct account.
  10. If contacts are not linked, verify the Set Account ID and Rename Keys steps and confirm the contact node uses the correct Account ID field. If accounts duplicate, review the Remove duplicate companies node and your company name formatting.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Salesforce

Sign up

Pro Suite + Web Services API add-on: $125/user / mo (billed annually)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.