crm-lookup
Original:🇺🇸 English
Translated
Find a specific CRM record by ID, email, domain, or name fragment, and traverse associations for the full account picture.
3installs
Sourcehubspot/agent-cli-skills
Added on
NPX Install
npx skill4agent add hubspot/agent-cli-skills crm-lookupTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Source of truth
hubspot <command> --helpbulk-operations/SKILL.mdPick properties from the live schema
Schemas drift. Run for the live set. First-pass for a brief:
hubspot properties list --type <type>--properties| Object | |
|---|---|
| contacts | |
| companies | |
| deals | |
| tickets | |
Contact ad/campaign attribution lives on (e.g. , /, , ). Full list: .
hs_analytics_*hs_analytics_sourcehs_analytics_source_data_1_2hs_analytics_first_touch_converting_campaignhs_analytics_last_touch_converting_campaignhubspot properties list --type contacts | grep hs_analytics_1. Lookup by ID
Up to ~100 IDs in a single batch call:
bash
hubspot objects get --type contacts 12345 67890 23456 --properties email,firstname,lastname,company,phone,lifecyclestage2. Find one by email / domain (exact match)
emaildomain--filterbash
hubspot objects search --type contacts --filter "email=jane@acme.com" \
--properties email,firstname,lastname,company,lifecyclestage,hubspot_owner_id
hubspot objects search --type companies --filter "domain=acme.com" \
--properties name,domain,industry,annualrevenue,hubspot_owner_id
# OR — multiple emails in one call
hubspot objects search --type contacts \
--filter "email=alice@acme.com" --filter "email=bob@acme.com" --properties email,firstname3. Find by partial name (token + client-side narrowing)
~dealname~acmejqbash
hubspot objects search --type deals --filter "dealname~acme" --properties dealname,amount,dealstage \
| jq -c 'select(.properties.dealname | ascii_downcase | contains("acme corp"))'4. Find all associated records (two CLI calls, not xargs)
Pattern: → → batch. Never — that spawns one process per record. Use plural in (, , ); shows singular but only plural avoids a warning.
associations listjq -c '{id}'objects getxargs -I{} hubspot objects get …--fromcontacts:companies:deals:--helpbash
# All contacts at a company
hubspot associations list --from companies:67890 --to contacts \
| jq -c '{id}' \
| hubspot objects get --type contacts --properties email,firstname,lastname,jobtitle
# Open deals for a contact (filter client-side; "open" varies by pipeline)
hubspot associations list --from contacts:12345 --to deals | jq -c '{id}' \
| hubspot objects get --type deals --properties dealname,amount,dealstage,hs_is_closed \
| jq -c 'select(.properties.hs_is_closed != "true")'5. Get a record plus its associations
bash
contact_id=12345
hubspot objects get --type contacts $contact_id --properties email,firstname,lastname,company,lifecyclestage
# Associated company (usually one)
hubspot associations list --from contacts:$contact_id --to companies | jq -c '{id}' | head -1 \
| hubspot objects get --type companies --properties name,domain,industry,annualrevenue
# Associated deals
hubspot associations list --from contacts:$contact_id --to deals | jq -c '{id}' \
| hubspot objects get --type deals --properties dealname,amount,dealstage,closedateConstraints
- Search returns ≤100 per page. For more, use the pagination loop in .
bulk-operations/SKILL.md - is token-based; substring filtering happens in
~after the search.jq - If the lookup feeds a write (update, delete, merge), follow the → digest →
--dry-runflow in--confirm.bulk-operations/SKILL.md