I'm attempting to query hubspot from a clay table to see if a contact already exists using email address as the identifier. We heavily use hubspot where under the email property you can have a primary email address and additional email addresses. When I use the hubspot lookup object function the only thing that is being queried is the primary email address. Does anyone know how to query the additional email address fields? In salesforce I would do this with an SOQL query, but hubspot doesn't have that option it doesn't seem.
Since you're dealing with HubSpot's multiple email structure, you might want to try Sculptor first - it's our built-in AI tool in the top-right corner that can help build more complex workflows and automations for free. Sculptor might be able to suggest a workaround for querying those additional email fields.
What specific additional email field names does your HubSpot setup use, and have you tried using Sculptor to see if it can build a solution for this?
If you still need help with querying additional email fields in HubSpot, I’m here to assist further. Would you like to provide more details about your HubSpot setup or your experience with Sculptor so far?
You need to use an API call to connect HubSpot and Clay using HubSpot’s API documentation. After that, you can search contacts by email. I will also share the exact endpoint you should use, which is: https://api.hubapi.com/crm/v3/objects/contacts/search This endpoint allows you to search using both the primary email and additional email addresses.
You're absolutely right! Using the HTTP API with that search endpoint is the way to go for querying additional email fields. [1]
You can set this up in Clay by:
Adding an HTTP API enrichment
Using POST method with https://api.hubapi.com/crm/v3/objects/contacts/search
In the request body, you can specify search criteria that includes additional email properties [2]
Since you already know the exact endpoint, have you tried setting up the HTTP API call yet, or would you like me to walk through the specific configuration steps?
Perfect! That JSON structure will work well for the HubSpot search endpoint. For the HTTP API setup in Clay:
Method: POST
Endpoint:https://api.hubapi.com/crm/v3/objects/contacts/search
Body: Use your JSON structure with dynamic email reference like:
{
"filterGroups": [{
"filters": [{
"propertyName": "email",
"operator": "EQ",
"value": "/Email Column"
}]
}],
"properties": ["firstname", "lastname", "email"]
}Make sure to add quotes around the dynamic column reference for the email value. [1]
Could you paste your complete JSON body here so I can check the formatting?
If you still need help with your JSON body formatting or the HTTP API setup, I’m happy to assist. Would you like to share the full JSON you’re using so I can take a look?
