SCALIX help

← All tools

hubspot_get_contact

HubSpot read low risk

Part of the HubSpot Agent.

What it does

Fetch a single HubSpot contact by its record id (hs_object_id) or by a unique property such as email. Returns the standard envelope {success:true,data} where data is the contact's id, requested properties (defaults include email, firstname, lastname, createdate, lastmodifieddate, hs_object_id), createdAt/updatedAt, archived flag, and optionally associated object ids (e.g., deals) when associations are requested. Use to read back a contact you just upserted, to resolve an email to a contact id before associating it to a deal, or to confirm field values during reconciliation. [POLICY] Read and surface ONLY the authorizing client's own contact data, for that client's consented purposes; never use retrieved contact data to enrich/append/verify other profiles, seed prospecting, or commingle across clients. Do not retain member-derived fields beyond the LinkedIn retention windows.

Inputs

NameTypeRequiredDescription
contact_idstringnoHubSpot contact record id (hs_object_id). Provide this OR id_value+id_property (exactly one lookup mode).
id_valuestringnoValue of the unique identifier property to look up by (e.g., the email address). Requires id_property.
id_propertystringnoUnique property name to resolve id_value against, e.g. "email". Sent as the idProperty query param, except hs_object_id: the record id is what the lookup means without idProperty (the default when omitted), so it is not sent.
propertiesarraynoList of property names to return (e.g., [email, firstname, lastname, jobtitle, lifecyclestage, hs_lead_status]).
associationsarraynoObject types whose associated ids to include, e.g. [deals].

Safeguards

Policy

Read/surface ONLY the authorizing client's own contact data for that client's consented purposes. NEVER reuse retrieved data to enrich/append/verify other profiles, build a prospecting or cross-account database, or commingle across clients. Do not retain member-derived fields beyond LinkedIn retention windows.

Reminder

Request only the properties you need; treat returned PII as client-confidential and non-portable.

Errors

Error classMeansWhat to doRetry
authInvalid or expired OAuth token / session (401 Unauthorized).Refresh the HubSpot OAuth token and retry; do not reuse the rejected token.no
permissionToken lacks crm.objects.contacts.read scope or portal denied access (403 Forbidden).Grant crm.objects.contacts.read and reconnect; surface the missing scope.no
validationHubSpot 400: malformed property name, or both/neither lookup id provided. Surface HubSpot's exact message. (An unknown or non-unique id_property answers not_found, below.)Provide exactly one of contact_id or id_value+id_property and valid property names, then retry.no
not_foundNo contact matches the given id or unique-property value (404 Not Found). HubSpot's 404 names nothing, so the message names the id, or for a lookup by value the id_property (never the value); an id_property that is not a unique contact property answers the same 404.Confirm the id/email (hubspot_search_contacts) and the id_property name; if expected to exist, the contact may have been merged or deleted -- report clearly, do not fabricate.no
rate_limitHubSpot 429 Too Many Requests (TEN_SECONDLY_ROLLING or daily policy).Back off using X-HubSpot-RateLimit-* / Retry-After and retry with jitter.yes
platformHubSpot server error (500/502/503).Retry with exponential backoff; if persistent, report HubSpot unavailability.yes

Edge cases

  • Empty result: lookup by email may legitimately return 404 when no contact exists -- distinguish 'not found' from an error and return success:false not_found.
  • Merged contacts: a stale id may 404 or resolve to the surviving record; resolve via email if id fails.
  • Default vs requested properties: only requested properties (plus defaults) are returned; absent properties are omitted, not returned as null.
  • Associations are returned as ids only; fetching the associated object requires a separate read.
  • Read-after-write lag: get-by-id is strongly consistent (prefer it over search immediately after an upsert).
  • Retention: if the contact carries LinkedIn member-derived fields, surface but do not cache beyond the retention window.