Auto-enrich new HubSpot companies with brand and NAICS data

By General Input

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.

Integrations

  • HubSpot
  • Context.dev

Type

Agentic Task

Categories

  • Sales

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.

Related prompts

Explore more prompts
Turn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRMLead response desk with a running clock on every new leadApprove Lusha enrichment field by field before HubSpot saves it