Auto-enrich new HubSpot companies with brand and NAICS data

When a new company lands in HubSpot, fill in its logo, description, industry, NAICS code, location, and LinkedIn from brand intelligence, without overwriting anything already on the record.

Agentic Task
HubSpotContext.devSalesLead EnrichmentData Sync

Build me an agent workflow that auto-enriches every new company in HubSpot with brand intelligence from Context.dev.

Trigger: a HubSpot poll trigger on the companies_created event. The workflow runs once per newly created company.

For each new company, the agent should:

1. Read the company record from HubSpot (use Get Company) to see which properties are already populated. Resolve the company's domain: use the HubSpot domain property if present, otherwise look at the primary associated contact's work email and take the domain from that. If the email is a free or disposable provider (gmail.com, yahoo.com, outlook.com, etc.), skip the company and stop.

2. Call Context.dev Retrieve Brand Data by Domain with the bare domain (no http, no www). Capture the logo URL, a short company description, primary brand colors, the postal address (city and state in particular), and social links (LinkedIn especially). If Context.dev returns a 404 or any error indicating the domain isn't known, no-op the entire workflow: do not write anything back to HubSpot.

3. Call Context.dev Classify NAICS Industries for the same domain. Pick the single highest-confidence 2022 NAICS code from the results. If multiple codes tie on confidence, pick the first.

4. Call HubSpot Update Company on the original company ID. Only write fields that are currently empty on the record. Map: logo URL into a custom company property named logo_url (string), the brand description into description, the primary NAICS code into a custom property named naics_code (string), the broad industry label into industry, the city into city, the state into state, and the LinkedIn URL into linkedin_company_page. Never overwrite a value that's already set.

Rules across the whole workflow:

- Quiet no-op on 404 from Context.dev. We'd rather have an empty field than wrong data.

- Never send empty strings to HubSpot. If Context.dev didn't return a value for a field, omit that field from the update payload entirely.

- Treat the existing HubSpot values as truth. The agent reads the record before enriching and only fills blanks.

- The naics_code and logo_url custom properties need to exist on the company object in HubSpot. If they don't, surface a clear setup message to the user telling them to create the properties (single-line text) and try again.

Additional information

What does this prompt do?
  • Watches HubSpot for newly created company records and runs the moment one appears.
  • Pulls each company's logo, short description, brand colors, address, and social links from brand intelligence on its domain.
  • Picks the best matching 2022 NAICS industry code and writes it back to the company record.
  • Quietly skips fields that already have a value, and skips the company entirely when no brand match exists, so good data is never overwritten with blanks.
What do I need to use this?
  • A HubSpot account with permission to read and update company records.
  • A Context.dev account and API key for brand and NAICS lookups.
  • A one-time custom HubSpot property for the logo URL and the NAICS code, so the agent has a clean place to write them.
How can I customize it?
  • Pick which fields to fill in (logo, description, city, state, LinkedIn, NAICS) and leave the rest off.
  • Change the fallback when a company's domain is empty: use the primary contact's work email, or just skip it.
  • Switch to SIC codes instead of NAICS, or store both side by side on the company record.

Frequently asked questions

What happens to companies that already have an industry or LinkedIn URL?
Nothing. The agent reads what's already on the record and only fills in fields that are blank. Existing values are always preserved.
What if the brand lookup doesn't recognize the company's domain?
The agent quietly moves on. No blank or guessed values get written back, so your CRM never gets polluted with empty strings or wrong data.
What if a new company has no domain, only a contact email?
The agent uses the primary associated contact's work email to infer the domain. Free email providers like gmail.com are ignored so personal addresses don't create bad enrichment.
I don't have a custom NAICS property in HubSpot yet. Is that a problem?
You can add one in about 30 seconds from HubSpot's company property settings. We'll walk through naming it during setup.
Will this hit my HubSpot rate limits?
No. The agent processes new companies one at a time as they're created and uses a single write per record, which stays well under HubSpot's normal usage limits.

Stop researching every new HubSpot company by hand.

Connect HubSpot and Context.dev once, and Geni fills in logos, industries, NAICS codes, and socials the moment a company is created.