Enrich new HubSpot leads with your AWS Lambda function

By General Input

When a new contact hits HubSpot, we run your Lambda enrichment, save the score and firmographics back to the record, and ping your sales channel.

Integrations

  • HubSpot
  • AWS Lambda
  • Slack Bot

Type

Deterministic Code

Categories

  • Sales
  • Engineering

When a new contact is created in HubSpot, run my AWS Lambda enrichment function on it, write the result back onto the contact, and post a summary to the sales channel in Slack.

Trigger: HubSpot webhook on the contact.creation event. Every new contact — form submission, list import, manual add, integration push — should fire this workflow exactly once.

Step 1. From the webhook payload, resolve the HubSpot contact and read its email, company (or associated company name), and any utm_source, utm_medium, utm_campaign, utm_term, and utm_content properties. If company isn't set on the contact, fall back to the primary associated company's name when one exists.

Step 2. Call AWS Lambda Invoke synchronously (InvocationType = RequestResponse) against the customer's enrichment function. The function name is a workflow input the user provides at setup — do not create or manage the function; it is customer-owned. Send the event payload as JSON with the shape { email, company, utm: { source, medium, campaign, term, content } }. Parse the JSON body of the response. Expected shape: { leadScore: number, firmographics: { industry, employeeCount, revenue, region, ... }, routingOwner: string }. If the response is missing or malformed, skip the HubSpot update and still send the Slack message with just the basics so the team is not blind.

Step 3. Update the contact in HubSpot with Update Contact, targeting the contact ID from the trigger. Map leadScore to a numeric contact property (default name: lead_score) and each key in firmographics to a matching contact property by name. Only write fields that came back non-empty — never blank out an existing HubSpot value with an empty enrichment value.

Step 4. Send a Message with the Slack bot into the sales channel (channel is a workflow input; default #sales). Include the contact's full name, company, lead score, and suggested routing owner, plus a link back to the HubSpot contact record so the rep can jump straight in.

Every step is a known node — HubSpot webhook, AWS Lambda Invoke, HubSpot Update Contact, Slack bot Send a Message — so build this as a code workflow, not an agent.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasoniMessage campaign console with pre-flight checks and delivery boardLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsA searchable RFP answer library your bid team drafts fromLinkedIn Ads budget pacing dashboard for every client account