HubSpot

Find HubSpot Contact

Finds a contact by email address.

Unverified

What the model is told

Find a contact in HubSpot by email address. Returns results[0] with its record id and properties (first name, last name, email, phone, lifecycle stage), or an empty results array if they do not exist.

Request

POSThttps://api.hubapi.com/crm/v3/objects/contacts/search

Headers

  • Content-Typeapplication/json
  • AuthorizationBearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN

Body

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "email",
          "operator": "EQ",
          "value": "{{email}}"
        }
      ]
    }
  ],
  "properties": [
    "firstname",
    "lastname",
    "email",
    "phone",
    "lifecyclestage"
  ],
  "limit": 1
}

Parameters

  • email stringThe email address of the contact to find.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "40f3105f-9553-4498-94d5-40ced089ad00",
    "type": "HTTP_REQUEST",
    "label": "Find HubSpot Contact",
    "name": "find_hubspot_contact",
    "customName": false,
    "description": "Find a contact in HubSpot by email address. Returns results[0] with its record id and properties (first name, last name, email, phone, lifecycle stage), or an empty results array if they do not exist.",
    "parameters": [
      {
        "name": "email",
        "type": "string",
        "description": "The email address of the contact to find."
      }
    ],
    "config": {
      "endpoint": {
        "method": "POST",
        "url": "https://api.hubapi.com/crm/v3/objects/contacts/search"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Authorization",
          "value": "Bearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN"
        }
      ],
      "body": "{\n  \"filterGroups\": [\n    {\n      \"filters\": [\n        {\n          \"propertyName\": \"email\",\n          \"operator\": \"EQ\",\n          \"value\": \"{{email}}\"\n        }\n      ]\n    }\n  ],\n  \"properties\": [\n    \"firstname\",\n    \"lastname\",\n    \"email\",\n    \"phone\",\n    \"lifecyclestage\"\n  ],\n  \"limit\": 1\n}",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.