Help With Salesforce + HubSpot Integration: Auto-Match Leads to Accounts by Domain

Hi all – I’m looking for guidance on building a Salesforce Flow that supports our HubSpot integration and helps cleanly associate new Leads with existing Accounts.

Here’s the scenario:

  • We have a working integration between HubSpot and Salesforce.

  • When a new Lead is created in Salesforce (often via HubSpot form submission), I want to automatically associate that Lead to an existing Account if the email domain matches.

  • Specifically:

    1. When a Lead is created, extract the domain from the Lead’s email address.
    2. Search all Accounts to find a match based on that domain (e.g., @acmecorp.com matches acmecorp.com).
    3. If only one Account is found with that domain, associate the Lead to that Account.
    4. If multiple Accounts share the same domain, I want the Flow to then compare the Lead’s Company Name to Account names to find a more precise match.

Has anyone built a Flow like this before?

Any shared examples, screenshots, or tips (including where to watch out for gotchas with the integration) would be hugely appreciated.

Thanks in advance!

Hey @Lesaphil !

Are you trying to achieve that automatic association in HubSpot or in Salesforce?

In HubSpot there’s a default setting to associate contacts with companies based on domain, you just need to go to Settings > Objects > Companies and then make sure the option to associate contacts based on email domain is checked (See screenshot below)

Hope this helps! Let me you if you need further support - I offer free consultations

Carolina De Mares

Brandgang

Goirkekanaaldijk 14

5046 AT Tilburg

Thank you! I was looking for the association to happy in our Salesforce instance. However, I will make sure this is turned on in HS as well!