AddThisFeature

HubSpot Lead Capture

Create or enrich HubSpot contacts and link them to companies, deals, and source context.

involved Sales & Marketing Tools

What it adds

A capture path that matches or creates a HubSpot contact and company, associates them, and attaches how the lead arrived.

What your agent is told to do

5
  1. 1

    Search for an existing contact and an existing company before creating either, matching the contact on the normalized email and the company on the domain, and associate to what you find rather than adding a parallel record.

  2. 2

    Write only properties the app is the source of truth for. Skip blanks entirely, and treat any property a salesperson can edit as theirs unless an admin has explicitly opted into letting the app overwrite it.

  3. 3

    Capture the source context the app knows and CRM users do not — the plan, the referring campaign, the signup path, the in-app actions taken — because that is the part of the record that justifies the integration.

  4. 4

    Run the whole capture in the app's existing background-job system, and record a per-lead sync status with the failure reason. The original conversion must be committed and confirmed to the user before any CRM call is attempted.

  5. 5

    Do not let this feature and any other CRM sync in the app both claim the same lead. Designate one CRM as the destination for a given lead type in configuration, so a signup does not appear as three unrelated records across three systems.

Edge cases it handles

8
  • Creating a contact without searching first produces duplicates that sales teams then have to merge by hand. Search on the normalized email, and search the company on domain, before any create.
  • Sales teams correct and enrich records constantly. An update that writes every mapped property, including empty ones, replaces a hand-verified phone number with nothing — send only non-empty values for properties the app owns.
  • A connection can reach more than one CRM account, and pipelines and their stages differ between them. Pin the account, pipeline, and stage at configuration time and validate they still exist before each write.
  • Custom properties have types, allowed option values, and can be archived. A string written into a numeric or enumeration property fails, so validate the mapping against the current property definitions and pause with a named error rather than dropping the lead.
  • A CRM failure must never roll back the app-side conversion. Persist the lead locally, mark the sync failed with its reason, make it retryable, and leave the user's signup or purchase intact and confirmed.
  • Token expiry, revoked scopes, and rate limits all surface as failures that look alike. Distinguish them: refresh on expiry, mark the connection broken on revocation, and back off and requeue on rate limiting.
  • Associating a contact to the wrong company is worse than leaving it unassociated. Where the domain match is ambiguous — shared mail domains, contractors, subsidiaries — leave it unassociated and flag it for a human.
  • While the provider is down, capture must stay open. Queue the work, show pending status on the lead, and never present the outage to the person filling in the form.

Definition of done

9
  • Existing contacts and companies are found and reused instead of duplicated.
  • Blank and app-unowned values never overwrite CRM data.
  • Records are created in the configured account and pipeline, validated before each write.
  • Property type mismatches and archived properties pause the mapping with a named, actionable error.
  • A failed sync leaves the original conversion complete and is visible and retryable.
  • Ambiguous company matches are left unassociated and flagged rather than guessed.
  • Only one CRM destination is configured per lead type.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.