Skip to main content

How to create or update contacts in Hubspot

Updated this week

Summary

This guide explains how to configure the HubSpot Create or update contact action in Astra. Once set up, this action automatically creates or updates contact records in HubSpot based on customer conversations, helping you keep your CRM data accurate and up to date.

How the action works

When this action runs:

  • Astra looks for a Contact in HubSpot using the customer’s email

  • If the contact exists, it updates the record based on your configuration

  • If the contact does not exist, it can create a new one (depending on your settings)

This ensures your contact data stays in sync without manual effort.

Instructions

Follow these steps to configure the action:

Step 1: Open the HubSpot create or update contact template

  • Log in to your Astra account

  • Go to the Action Library

  • Select HubSpot — create or update contact

  • Open the Configuration step

Step 2: Set up the action intent

What you do

  • Enter a clear action name and intent

  • Click Edit action intent anytime to update it

What happens

  • A well-defined intent helps the agent decide when to trigger this action

Offline Sync

  • Keep this OFF to run the action during the conversation

  • Turn it ON to run the action after the conversation ends

Step 3: Select your HubSpot account

What you do

  • Choose an existing HubSpot account

  • Or click Add account to connect a new one

What happens

  • All data created or updated by this action will be saved in the selected account

Step 4: Configure contact creation and updates

Allow creating and updating new contacts

  • When ON:

    • Creates a new contact if none exists for the email

    • Fully updates contacts created through Astra

  • When OFF:

    • Does not create new contacts

Allow updating existing fields

  • When ON:

    • Updates mapped fields for contacts already in HubSpot (even if not created through Astra)

  • When OFF:

    • Does not update existing contact properties

    • Only applies summary updates as a note (if configured)

Step 5: Map fields (HubSpot → Astra)

Field mapping defines how data flows from Astra into HubSpot.

What you do

For each row:

  • Select a HubSpot contact property (left side)

  • Match it with an Astra field (right side)

What happens

  • When the action runs, Astra writes the mapped data to the corresponding HubSpot contact properties

Required fields

You must map the following field:

  • email

The action will not run without it.

Adding more fields

  • Click Map field to add additional mappings

  • You can map:

    • Standard properties (email, phone, name, etc.)

    • Custom properties from your HubSpot account

Note: Only supported fields and editable custom properties (text-like types) are available for mapping.

Creating new Astra fields

You can create new Astra fields while mapping.

These fields will:

  • Be available in the agent configuration

  • Appear as contact attributes for selection

Using the summary field

If a summary is provided:

  • Astra creates or updates a note on the contact with the conversation summary

If you also map a HubSpot property to Summary:

  • The same summary is written to that contact property

  • A note is still created and linked to the contact

What happens when the action runs

Here’s the end-to-end behavior:

  • Astra looks up a Contact using the mapped email

  • If no contact is found:

    • A new contact is created only if allowed by your settings

  • If a contact exists:

    • The contact is updated based on your configuration

  • If full updates are restricted:

    • Only the summary note may be added or updated

Additional feature: Offline Sync

Offline Sync allows the action to run after the conversation ends instead of during the conversation.

When enabled

  • The action runs once after the conversation is complete

Conversation end conditions

  • Text agent: 10 minutes after the last message

  • Voice agent: When the call ends

This is useful when you want to capture finalized information instead of updating data in real time.

What to do next

Once configured, your action will automatically:

  • Capture customer details from conversations

  • Create or update contacts in HubSpot

  • Keep your CRM data up to date without manual effort

You can now use this action as part of your automation workflows in Astra.

Did this answer your question?