Enrich new HubSpot leads with your AWS Lambda function

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.

Deterministic Code
HubSpotAWS LambdaSlack BotSalesEngineeringLead EnrichmentNotifications & Alerts
PromptCreate

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.

What does this prompt do?

  • Watches HubSpot for brand-new contacts, including form fills, list adds, and manual creates.
  • Sends the contact's email, company, and campaign details to your existing AWS enrichment function and reads back the result.
  • Writes the returned lead score and enrichment fields onto the matching HubSpot contact properties.
  • Posts a summary to your sales channel in Slack with the contact name, company, score, and suggested owner so the right rep picks it up fast.

What do I need to use this?

  • A HubSpot account you can log into, with permission to see contact-creation events.
  • Your existing enrichment function running on AWS, plus an access key that can call it.
  • A Slack workspace and the channel where sales should be notified about new inbound leads.

How can I customize it?

  • Change which HubSpot contact properties the lead score and enrichment fields land in.
  • Swap in a different sales channel, or reformat the Slack message to include extra fields.
  • Adjust which contact fields get sent to your function (add region, phone, form ID, referrer, and so on).

FAQs

Do I need to build the enrichment function first?
Yes. This workflow assumes you already have an enrichment function running on AWS. The workflow simply calls it with each new contact and applies whatever it returns. If you don't have one yet, build the function first and then hook it up here.
Will this run for every new HubSpot contact?
Yes. Any event that creates a contact in HubSpot triggers the workflow: form submissions, list imports, manual adds, or contacts pushed in by another tool.
What if my function fails or returns nothing useful?
The HubSpot contact is left as it was, no fields are overwritten with blanks, and the Slack notification still goes out with the basics so sales isn't blind. You can rerun the workflow on the contact once the function is back.
Can I send the alert somewhere other than Slack?
Yes. Swap the Slack step for Microsoft Teams, email, or any other tool we support. The HubSpot and enrichment steps stay the same.
Does this replace HubSpot's built-in workflow tool?
It complements it. HubSpot workflows can't call your own AWS code directly, which is why teams reach for tools like this to bridge inbound leads and their internal scoring service.

Related templates

Build a credential rotation checklist when someone leaves

When someone leaves, we check which shared passwords they used in their final months and post a ranked rotation list to your security channel.

1Password
Rippling
Slack Bot
+1
Agentic Task
Weekly Amazon S3 bucket security audit posted to Slack

Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.

Amazon S3
Slack Bot
Google Sheets
Agentic Task
Log Agorapulse social conversations to HubSpot contacts

Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.

Agorapulse
HubSpot
Slack Bot
Agentic Task
Turn procurement portal tenders into CRM deals each morning

Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.

Anchor Browser
Google Sheets
HubSpot
+1
Agentic Task
Clean up HubSpot contacts from your Amazon SES suppression list

Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.

Amazon SES
HubSpot
Slack Bot
Agentic Task
Draft polite follow-ups for emails that never got a reply

Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.

Aurinko
Google Sheets
Slack Bot
Agentic Task

Stop letting inbound leads sit unenriched.

Every new HubSpot contact gets scored, enriched, and routed to the right rep the moment the form is submitted.