Configure Cotonity agents to automatically create new HubSpot contacts when prospects interact with your chatbot, form, or booking flow.
When to create vs. update
Before creating a contact, Cotonity performs a deduplication check against HubSpot using the email address as the primary identifier. If a contact with the same email already exists, the agent switches to an update operation rather than creating a duplicate. This behavior is enabled by default and can be customized in the action settings — for example, you might also check by phone number or a custom unique identifier. The deduplication log is available in the workflow run history, showing which records were created fresh versus merged into existing ones.
Configuring the Create Contact action
In the Cotonity workflow builder, add a HubSpot: Create Contact action block. Map dynamic values from the conversation or form to the required HubSpot fields. At minimum you must supply an email address; all other standard and custom properties are optional. Use Cotonity's expression syntax — for example, {{session.user.firstName}} — to pull collected data into the field values. You can also set static values such as a default lifecycle stage of Lead or an owner assignment based on the agent's configured territory rules.
Setting lifecycle stage and owner
Properly tagging new contacts with the right lifecycle stage ensures they enter the correct HubSpot workflows and sequences. For inbound chat leads, Subscriber or Lead is typically appropriate; for contacts who have already booked an event, Marketing Qualified Lead or Opportunity may be more accurate. Owner assignment can be handled by round-robin logic built into the Cotonity action, or you can defer to HubSpot's own rotation rules by leaving the Owner field blank. Cotonity also supports territory-based assignment using the contact's country or zip code.
Handling errors gracefully
If the HubSpot API returns an error during contact creation — such as an invalid property value or a rate limit response — Cotonity's retry logic attempts the operation up to three times with exponential back-off. If all retries fail, the workflow transitions to a configurable error branch where you can notify a human agent, save the contact details to a fallback queue, or send the user a follow-up email. Failed creation attempts are surfaced in the workflow error log with the full HubSpot API error payload for debugging.