← All tutorialsGrowth

Lead-enrichment pipeline

For each new HubSpot contact: search LinkedIn, extract company + role, write back to CRM. Approval gate over 100 lookups/day.

Cost~$0.01 per contact
Operations
web_search.querytext_generation.generate

Prerequisites

  • HubSpot webhook for new contacts.
  • dailyRequestLimit=100 on the agent so a webhook storm is auto-throttled to `blocked` with reason `daily_limit_exceeded`.

Walkthrough

1. Trigger on webhook

HubSpot fires on contact.created. Your handler reads email + name.

2. Search

web_search.query for `<name> <email-domain> linkedin`. Take the top result.

3. Extract + write back

GPT-4o-mini extracts {company, role, seniority} as JSON. POST back to HubSpot via their API. Upivia only handles the search + LLM - the CRM write is your code.

Next steps

Audit every call at /audit-logs, watch spend at /usage, and tune budgets per service on the agent's page.

Create an account →