Keep Gladly customers in sync with new HubSpot contacts

Every time you add a contact in HubSpot, we automatically create or update their Gladly profile so support always sees up-to-date customer details.

Deterministic Code
GladlyHubSpotCustomer SupportOperationsData Sync
PromptCreate

Whenever a new contact is created in HubSpot, keep our Gladly support system in sync by upserting that person as a Gladly customer. Trigger this on HubSpot's new-contact poll trigger so it runs automatically each time a contact is added in the CRM.

From the new HubSpot contact, read the email, first name, last name, and phone number. If the contact has no email address, stop and skip it. Email is the natural key for this sync because Gladly customer emails are unique per organization, and a contact with no email cannot be matched safely.

Look the person up in Gladly with Find Customers, searching by the contact's email. Because Gladly customer emails are unique across the org, at most one profile will match.

If no matching Gladly customer exists, create one with Create Customer, setting the customer name from the HubSpot first and last name, the email from the HubSpot email, and the phone from the HubSpot phone. If a matching customer already exists, update it with Update Customer so its name, email, and phone match the HubSpot contact.

Map the fields deterministically: combine HubSpot's first name and last name into the Gladly customer name, put the HubSpot email into the customer's email, and put the HubSpot phone into the customer's phone. This is a one-way sync from HubSpot into Gladly: only create or update, never delete a Gladly customer, and do not run this in reverse. Gladly REST reference: https://developer.gladly.com/rest/

Additional information

What does this prompt do?
  • Watches HubSpot for new contacts and adds each one into Gladly automatically.
  • Matches people by email, so an existing Gladly customer gets updated instead of duplicated.
  • Copies name, email, and phone across so support agents see the same details as your CRM.
  • Skips any contact without an email and never deletes anyone in Gladly.
What do I need to use this?
  • A HubSpot account where your contacts live.
  • A Gladly account with permission to create and update customer profiles.
  • Contacts in HubSpot that include an email address so they can be matched.
How can I customize it?
  • Narrow which HubSpot contacts sync, for example only those that already have a phone number.
  • Choose which details to copy across, such as adding company or address alongside name, email, and phone.
  • Adjust how first and last name are combined into the Gladly customer name.

Frequently asked questions

Will this create duplicate customers in Gladly?
No. We look each person up by email first, so an existing Gladly customer is updated rather than duplicated.
What happens to contacts that don't have an email address?
They are skipped. Email is how we match people between HubSpot and Gladly, so a contact needs one to sync.
Does this ever delete anything in Gladly?
Never. It only creates new customers or updates existing ones. Nothing is removed.
Does it sync changes in both directions?
No. This is a one-way sync from HubSpot into Gladly. Changes you make in Gladly are not sent back to HubSpot.
How soon does a new contact appear in Gladly?
Shortly after the contact is created in HubSpot. The workflow checks for new contacts regularly and syncs them automatically.

Stop retyping customer details into Gladly.

Keep your support team's view in Gladly automatically in step with every new contact you add in HubSpot.