Skip to main content

Hubspot CRM

The HubSpot CRM integration enables direct management of your HubSpot CRM account through yellow.ai's bot. This integration allows effortless creation, retrieval, updating, deletion, and searching for contacts in your HubSpot CRM account directly from the bot interface.

Supported Hubspot CRM actions in Yellow.ai​

Once the integration is established, you can perform the following HubSpot CRM actions directly from the bot interface.

ActionDescription
Create a contactCreates a new contact
Get a contactFetches a particular contact
Delete a contactDeletes a contact
Update a contactModifies details of a particular contact
Search a contact by phoneLooks for a contact using phone number
Search a contact by emailLooks for a contact using email address

Connect Hubspot CRM with Yellow.ai​

Prerequsites:

  1. An active Hubspot CRM account
  2. An active yellow.ai account.

To connect your Hubspot CRM account with Yellow.ai, follow the these steps:

  1. On the left navigation bar, go to Extensions > Integrations > CRM > Hubspot. Alternatively, you can use the Search box to find the integration app.

  2. In Give account name give a unique name to your Hubspot CRM account and click Connect.

info
  1. In a two-tier environment, add account names in Development and use them in Live.
  2. In a three-tier environment, add accounts in Staging and Sandbox, and they'll be available in Production.
  1. Sign in to your Hubspot CRM account when prompted. From there, select the Hubspot CRM account you want to link with Yellow.ai and click Choose Account to authorize Yellow.ai to access Hubspot CRM.

    drawing
  2. You can add up to 15 accounts. To add another Hubspot CRM account, click on Add account and follow the steps mentioned above.

Enable events for Hubspot CRM actions​

For the bot to perform certain actions when an event occurs in Hubspot CRM, the event needs to be activated.

The following are the events available for Hubspot in Yellow.ai:

EventDescriptionHubSpot subscription
hubspot-contact-createdContact is created in Hubspotcontact.creation
hubspot-contact-changedContact is modified in Hubspotcontact.propertyChange, contact.associationChange
hubspot-contact-deletedContact is deleted in Hubspotcontact.deletion, contact.privacyDeletion
hubspot-contact-mergedContacts are merged in Hubspotcontact.merge
hubspot-contact-restoredContact is restored in Hubspotcontact.restore

Companies, deals and tickets have the same five events. Replace contact with company, deal or ticket in both the event and the subscription. For example, deal.creation triggers hubspot-deal-created. Only contacts have privacyDeletion.

Add webhook to receive events​

HubSpot sends events to Yellow.ai through a webhook in an app that you create in your own HubSpot account. This app only sends events. The Hubspot CRM actions in your flows keep using the account you connected above.

note

HubSpot no longer allows new legacy private apps (Settings > Integrations > Private Apps). Creation stopped on 26 October 2026 for existing HubSpot accounts, and on 28 September 2026 for accounts created after that date. A legacy private app that already sends events to Yellow.ai keeps working, but HubSpot requires moving it to its new developer platform by September 2027. HubSpot's service keys can't send webhooks, so use the steps below for any new setup.

Prerequisites:

  1. A HubSpot user with Super Admin access, to create and install the app.
  2. Node.js 20 or later, to run the HubSpot CLI.

To create the app and its webhook:

  1. Go to Hubspot CRM integration and click Webhook URL next to the account name to copy it.

  2. Install the HubSpot CLI and sign in to your HubSpot account. hs account auth opens HubSpot in your browser to create a personal access key for the CLI.

    npm install -g @hubspot/cli@latest
    hs account auth
  3. Create a project with a privately distributed app that uses static auth and includes webhooks:

    hs project create --name yellow-ai-webhooks --project-base app --distribution private --auth static --features webhooks

    You can also run hs project create without flags and choose App, Private, Static and Webhooks in the prompts. The project contains src/app/app-hsmeta.json and src/app/webhooks/webhooks-hsmeta.json.

  4. In src/app/app-hsmeta.json, set requiredScopes to oauth plus the read scope of each object you want events for. Keep the permittedUrls block, which HubSpot requires.

    Events forScope
    Contactscrm.objects.contacts.read
    Companiescrm.objects.companies.read
    Dealscrm.objects.deals.read
    Ticketstickets
    "auth": {
    "type": "static",
    "requiredScopes": ["oauth", "crm.objects.contacts.read"]
    }
  5. Edit src/app/webhooks/webhooks-hsmeta.json so that it lists your subscriptions. Set targetUrl to the Webhook URL from step 1, pasted exactly as copied, including the ?id= part.

    {
    "uid": "yellow_ai_webhooks_webhooks",
    "type": "webhooks",
    "config": {
    "settings": {
    "targetUrl": "<Webhook URL copied in step 1>",
    "maxConcurrentRequests": 10
    },
    "subscriptions": {
    "legacyCrmObjects": [
    { "subscriptionType": "contact.creation", "active": true },
    { "subscriptionType": "contact.propertyChange", "propertyName": "lifecyclestage", "active": true },
    { "subscriptionType": "contact.deletion", "active": true }
    ],
    "hubEvents": [
    { "subscriptionType": "contact.privacyDeletion", "active": true }
    ]
    }
    }
    }
    • Add subscriptions to legacyCrmObjects, using the subscription types in the events table. contact.privacyDeletion goes in hubEvents.
    • Remove the crmObjects entries that come with the template. Yellow.ai doesn't process the object.* event types, so those events are ignored.
    • A propertyChange subscription watches the one property set in propertyName. Add one entry per property.
    • When a contact is created, HubSpot also sends a change to its lifecycle stage. If you subscribe to lifecyclestage, expect hubspot-contact-changed right after hubspot-contact-created.
  6. Upload the project and install the app in your HubSpot account:

    hs project upload
    hs project install-app

    If hs project install-app can't find the app straight after the upload, wait a few seconds and run it again. You can also install it in HubSpot: go to Development > Projects, open your project and its app, and click Install now on the Distribution tab.

info

Yellow.ai checks the secret token in the Webhook URL (the id parameter) on every call and rejects calls without a valid token. Yellow.ai doesn't validate HubSpot's X-HubSpot-Signature-v3 header, so you don't need to share your app's client secret. Keep the Webhook URL private.

Activate events in Yellow.ai​

To activate an event and use it in your flow,

  1. Go to Event > Integrations and search for Hubspot events and click Activate next to the respective event.

  2. Go to a flow and include that event in the Start node and build the flow to carry out the action when that event occurs.

Manage Hubspot CRM via Yellow.ai AI agent​

To manage your Hubspot CRM account through yellow.ai bot, follow these steps:

  1. Go to Automation and create a flow based on your requirement.

  2. In whichever point you want the bot to access Hubspot CRM, inlcude the Hubspot CRM node. For that, drag the node connector, go to Integrations > Hubspot.

    drawing
  3. Configure the Hubspot CRM node based on the descriptions provided in the following:

    drawing
  • Account name: Choose the Hubspot CRM account.
  • Action: Choose the action to be performed.
  • Depending on the selected object, the corresponding fields will be shown. To fill those fields, you need to collect it as an input from users beforehand. Construct the flow accordingly and store the data in variables. These variables will then be passed in those fields.
  1. Each Hubspot CRM action returns a response as a JSON object. Store that response in a variable and pass that variable in a message node to display that response to the end user.

For example, if you receive the following response, you can use this syntax {{{variables.variablename.results.0.properties.lastname}}} to filter out the contact's last name.

{
"total": 0,
"results": [
{
"createdAt": "2019-10-30T03:30:17.883Z",
"archived": false,
"id": "512",
"properties": {
"company": "Biglytics",
"createdate": "2019-10-30T03:30:17.883Z",
"email": "[email protected]",
"firstname": "Bryan",
"lastmodifieddate": "2019-12-07T16:50:06.678Z",
"lastname": "Cooper",
"phone": "(877) 929-0687",
"website": "biglytics.net"
},
"updatedAt": "2019-12-07T16:50:06.678Z"
}
],
"paging": {
"next": {
"link": "?after=NTI1Cg%3D%3D",
"after": "NTI1Cg%3D%3D"
}
}
}

Create a contact​

  1. In the Automation flow builder, select the Integrations node and click Hubspot from the list of integrations that have been enabled for that AI agent.

    drawing
  2. After clicking Hubspot, an Integration Action Node will be added to the flow builder. When you click that node, you will see all use cases of this integration in a drop-down. Choose Get contact, choose Create a contact action.

    drawing
  3. Fill in all the mandatory fields. The below-mentioned table consists of the sample value, data type, and description for all these fields.

Field nameSample valueData typeDescription
First nameJohnStringProvide the fist name of the contact.
CompanyYellow.aiStringProvide name of the contact's company.
Email[email protected]StringProvide email ID of the user
Last nameSmithStringProvide the fist name of the user.
Phone9980055678StringProvide the phone number of the user.
Websitehttps://www.yellow.aiStringProvide contact's company website.

Sample success response

{
"id": "166055775073",
"properties": {
"createdate": "2025-10-22T08:15:12.069Z",
"email": "[email protected]",
"firstname": "Dwij",
"hs_all_contact_vids": "166055775073",
"hs_associated_target_accounts": "0",
"hs_currently_enrolled_in_prospecting_agent": "false",
"hs_email_domain": "test.com",
"hs_full_name_or_email": "Dwij",
"hs_is_contact": "true",
"hs_is_unworked": "true",
"hs_lifecyclestage_lead_date": "1761120912069",
"hs_membership_has_accessed_private_content": "0",
"hs_object_id": "166055775073",
"hs_object_source": "INTEGRATION",
"hs_object_source_id": "370598",
"hs_object_source_label": "INTEGRATION",
"hs_pipeline": "contacts-lifecycle-pipeline",
"hs_prospecting_agent_actively_enrolled_count": "0",
"hs_prospecting_agent_total_enrolled_count": "0",
"hs_registered_member": "0",
"hs_sequences_actively_enrolled_count": "0",
"lastmodifieddate": "2025-10-22T08:15:12.069Z",
"lifecyclestage": "lead",
"num_notes": "0"
},
"createdAt": "2025-10-22T08:15:12.069Z",
"updatedAt": "2025-10-22T08:15:12.069Z",
"archived": false,
"url": "app.hubspot.com/go-to/44273183/0-1/166055775073"
}

A sample screenshot


Get a contact​

  1. In the Hubspot integration action node, choose Get a contact.

    drawing
  2. Fill in all the mandatory fields. The below-mentioned table consists of the sample value, data type, and description for all these fields.

Field nameSample valueData typeDescription
Contact ID166055775073stringProvide the unique contact ID of the user to fetch their details.

Sample Success Response

{
"id": "166055775073",
"properties": {
"createdate": "2025-10-22T08:15:12.069Z",
"email": "[email protected]",
"firstname": "Dwij",
"hs_object_id": "166055775073",
"lastmodifieddate": "2025-10-22T08:15:20.886Z",
"lastname": null
},
"createdAt": "2025-10-22T08:15:12.069Z",
"updatedAt": "2025-10-22T08:15:20.886Z",
"archived": false,
"url": "app.hubspot.com/go-to/44273183/0-1/166055775073"
}

A sample screenshot of Get contact:

drawing

Delete a contact​

  1. In the Hubspot integration action node, choose Delete a contact action.

    drawing
  2. Fill in all the mandatory fields. The below-mentioned table consists of the sample value, data type, and description for all these fields.

Field nameSample valueData typeDescription
Contact ID166055775073stringProvide the unique contact ID of the user to delete their details.

Update a contact​

  1. In the Hubspot integration action node, choose Update a contact action.

    drawing
  2. Fill in all the mandatory fields. The below-mentioned table consists of the sample value, data type, and description for all these fields.

Field nameSample valueData typeDescription
Contact ID166055775073stringProvide the unique contact ID of the contact to update their details.
First nameJohnStringProvide the fist name of the contact.
CompanyYellow.aiStringProvide name of the contact's company.
Email[email protected]String
Last nameSmithStringProvide the fist name of the contact.
Phone9980055678StringProvide the phone number of the contact.
Websitehttps://www.yellow.aiStringProvide contact's company website.

Sample success response

{
"id": "166055775073",
"properties": {
"createdate": "2025-10-22T08:15:12.069Z",
"firstname": "Dwij",
"hs_is_contact": "true",
"hs_is_unworked": "true",
"hs_object_id": "166055775073",
"hs_object_source": "INTEGRATION",
"hs_object_source_id": "370598",
"hs_object_source_label": "INTEGRATION",
"hs_pipeline": "contacts-lifecycle-pipeline",
"hs_searchable_calculated_phone_number": "9678452348",
"lastmodifieddate": "2025-10-22T08:25:04.424Z",
"lifecyclestage": "lead",
"phone": "9678452348"
},
"createdAt": "2025-10-22T08:15:12.069Z",
"updatedAt": "2025-10-22T08:25:04.424Z",
"archived": false,
"url": "app.hubspot.com/go-to/44273183/0-1/166055775073"
}

A sample screenshot


Search a contact by phone​

  1. In the Hubspot integration action node, choose Search a contact by phone action.

    drawing
  2. Fill in all the mandatory fields. The below-mentioned table consists of the sample value, data type, and description for all these fields.

Field nameSample valueData typeDescription
Phone9987765434StringProvide the phone number of the contact to search their details.

Sample Success Response

{
"total": 1,
"results": [
{
"id": "166055775073",
"properties": {
"createdate": "2025-10-22T08:15:12.069Z",
"email": "[email protected]",
"firstname": "Dwij",
"hs_object_id": "166055775073",
"lastmodifieddate": "2025-10-22T08:25:04.424Z",
"lastname": null
},
"createdAt": "2025-10-22T08:15:12.069Z",
"updatedAt": "2025-10-22T08:25:04.424Z",
"archived": false
}
]
}

A sample screenshot:


Search a contact by email​

  1. In the Hubspot integration action node, choose Search a contact by email action.

    drawing
  2. Fill in all the mandatory fields. The below-mentioned table consists of the sample value, data type, and description for all these fields.

Field nameSample valueData typeDescription
Email[email protected]StringProvide the email ID of the contact to search their details.

Sample Success Response

{
"total": 1,
"results": [
{
"id": "166055775073",
"properties": {
"createdate": "2025-10-22T08:15:12.069Z",
"email": "[email protected]",
"firstname": "Dwij",
"hs_object_id": "166055775073",
"lastmodifieddate": "2025-10-22T08:15:20.886Z",
"lastname": null
},
"createdAt": "2025-10-22T08:15:12.069Z",
"updatedAt": "2025-10-22T08:15:20.886Z",
"archived": false
}
]
}

A sample screenshot:

References​

  1. HubSpot: Create a new app using the CLI
  2. HubSpot: Configure a webhook subscription
  3. HubSpot: Webhooks API guide (subscription types and scopes)
  4. HubSpot: Legacy private app creation being disabled