Sales · n8n

Automatically Enrich New Salesforce Contacts with Clearbit Data

When a new contact is created in Salesforce, this workflow instantly fetches enriched company and person data from Clearbit and writes it back to the Salesforce contact record. Data teams get clean, complete contact profiles without any manual research.

difficulty Intermediatesetup 45 minresult Every new Salesforce contact is automatically enriched with Clearbit firmographic and demographic data, saving hours of manual data entry and improving CRM data quality.
  1. 1

    Trigger on New Salesforce Contact

    Add a Salesforce Trigger node and set the Object to Contact and Event to Create. Connect your Salesforce credentials. This node polls Salesforce every minute and fires whenever a new contact is created, passing the contact's fields downstream.

  2. 2

    Extract the Contact Email

    Add a Set node named Extract Email. Create a new field called email and set its value to the expression {{ $json.Email }} from the trigger output. This isolates the email address so it can be passed cleanly to Clearbit.

  3. 3

    Call Clearbit Enrichment API

    Add an HTTP Request node named Clearbit Enrich. Set Method to GET and URL to https://person.clearbit.com/v2/combined/find. Under Query Parameters add a key email with value {{ $json.email }}. Under Authentication choose Header Auth and add header Authorization with value Bearer YOUR_CLEARBIT_API_KEY. Store your API key in n8n credentials for security.

  4. 4

    Check Clearbit Returned Data

    Add an IF node named Enrichment Found?. Set the condition to check that {{ $json.person.email }} is not empty. The true branch continues to update Salesforce; the false branch ends silently when no Clearbit data is found for the contact.

  5. 5

    Write Enriched Data Back to Salesforce

    Add a Salesforce node named Update Contact. Set Operation to Update and Object to Contact. Set the Contact ID field to {{ $('Salesforce Trigger').item.json.Id }}. Map fields such as Title from {{ $json.person.employment.title }}, Company from {{ $json.company.name }}, and Phone from {{ $json.person.phone }}. Only the true branch from the IF node connects here.

Frequently asked questions

What happens if Clearbit cannot find data for an email address?

The IF node checks whether Clearbit returned a valid person record. If no data is found, the workflow stops gracefully on the false branch and the Salesforce contact is left unchanged. You can optionally connect a Slack or email notification to the false branch to flag unmatched contacts for manual review.

Will this overwrite existing data already in Salesforce contact fields?

Yes, the Update Contact node will overwrite any mapped fields with Clearbit data. If you want to protect existing values, add a second IF node before the update step that checks whether the Salesforce field is already populated, and only proceed with the update if the field is empty.

How do I keep my Clearbit API key secure in n8n?

In n8n, go to Credentials and create a new Generic Credential of type Header Auth. Set the header name to Authorization and the value to Bearer followed by your Clearbit API key. Then select this credential in the HTTP Request node instead of pasting the key directly into the URL or parameters field.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.