Mirror new HubSpot contacts into Google Contacts

By General Input

The moment a contact is created in HubSpot, they land in your Google Contacts so your phone shows their name the next time they call or text.

Integrations

  • HubSpot
  • Google Contacts

Type

Deterministic Code

Categories

  • Sales
  • Operations

Build a code workflow that mirrors every new HubSpot contact into my Google Contacts so my phone shows their name the next time they call or text.

Trigger: a HubSpot webhook on the contact.creation event. HubSpot posts the new contact's vid and properties to the workflow; respond with a 2xx immediately so HubSpot does not retry.

From the HubSpot payload, pull these contact properties: firstname, lastname, email, phone, mobilephone, company, jobtitle, lifecyclestage. If any are missing on the webhook payload, fetch the contact from HubSpot by id to fill them in.

Step 1 (dedupe): call Google Contacts Search Contacts with the contact's email as the query. If there is a hit on the same email, stop and log skipped-duplicate. Per Google's docs, send a warmup Search Contacts call with an empty query once at the start of the workflow before the real search.

Step 2 (ensure the HubSpot group exists): call Google Contacts List Contact Groups and look for a group named "HubSpot". If it does not exist, call Create Contact Group with name "HubSpot". Cache the resourceName for use in step 4.

Step 3 (create the contact): call Google Contacts Create Contact with these mapped fields:

  • names: a single entry with givenName = firstname and familyName = lastname (names is a singleton field, only one entry allowed)

  • emailAddresses: one entry with value = email and type = "work"

  • phoneNumbers: one entry per non-empty phone, with phone tagged type "work" and mobilephone tagged type "mobile"

  • organizations: one entry with name = company and title = jobtitle

  • userDefined: two entries, { key: "source", value: "HubSpot" } and { key: "lifecycleStage", value: lifecyclestage }

Capture the resourceName returned by Create Contact.

Step 4 (add to the group): call Google Contacts Modify Contact Group Members with the HubSpot group resourceName and resourceNamesToAdd = [new contact's resourceName].

Important Google People API constraints to respect in the code: singleton fields (names, biographies, birthdays, genders) must have at most one entry; mutations for the same user must be sent sequentially (steps 2 -> 3 -> 4 in order, no parallel calls); writes may take a few minutes to propagate, so do not read back the created contact and assert on it.

Error behavior: on any non-2xx from Google, log the HubSpot vid and the error and stop. Do not retry blindly on 409 conflicts because that usually means the contact group name collided or the contact already exists.

This is a deterministic CRM-to-address-book mirror. No AI drafting, no enrichment, no email or Slack notifications. Just the webhook in, the four ordered Google Contacts calls, and a 2xx back to HubSpot.

Related prompts

Explore more prompts
Turn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRMLead response desk with a running clock on every new leadApprove Lusha enrichment field by field before HubSpot saves it