Instant Vapi call for every new HubSpot lead

By General Input

Kick off a personalized Vapi qualification call the moment an inbound lead lands in HubSpot, with a Google Sheets audit log and a Slack heads-up.

Integrations

  • HubSpot
  • Vapi
  • Google Sheets
  • Slack

Type

Deterministic Code

Categories

  • Sales
  • Operations

Build me a deterministic code workflow that runs every time a new contact is created in HubSpot and instantly kicks off a personalized Vapi qualification call, then logs it. This is the classic speed to lead pattern for inbound form and paid ad funnels.

Trigger: HubSpot webhook, contact.creation (a new contact was created). The webhook payload will include the contact id and the contact properties for phone, firstname, lastname, email, and any custom lead source or campaign fields (for example hs_analytics_source, hs_latest_source, utm_campaign, lead_source).

Step 1: Read the contact payload. Extract contactId, phone, firstName, lastName, email, source, and campaign. If phone is missing or empty, exit early with a clear log line like "skipped: no phone". If the contact already has a lifecycle stage or lead status equal to disqualified (for example lifecyclestage = other or a custom hs_lead_status = DISQUALIFIED), also exit early with "skipped: disqualified". Do not proceed further in either case.

Step 2: Call Vapi Create Call. Use my qualification assistantId (expose it as a workflow input so I can swap assistants per campaign). Set the customer to the contact's phone number in E.164 format. Use my Vapi phoneNumberId (also a workflow input) as the outbound caller. Pass assistantOverrides.variableValues with firstName, source, and campaign so the assistant's opener can personalize ("Hi {{firstName}}, I saw you came in from {{source}}..."). Capture the returned Vapi call id.

Step 3: Google Sheets Append Values. Append one row to the tracking sheet (spreadsheetId and sheet name are workflow inputs). Columns in order: timestamp (ISO 8601, UTC), hubspot_contact_id, phone, first_name, email, source, campaign, vapi_assistant_id, vapi_call_id.

Step 4: Slack Send a Message. Post to a channel id that is a workflow input. Message body should read something like: "📞 Dispatched Vapi call to {firstName} {lastName} ({phone}) from source {source}. Vapi call id: {vapiCallId}. HubSpot contact: https://app.hubspot.com/contacts/<portalId>/contact/{contactId}". Take portalId as a workflow input so the link resolves for my portal.

Rules: fully deterministic, no LLM reasoning nodes, no branching beyond the two early exits (missing phone, disqualified). Every step should log its inputs and outputs so I can debug from the run history. If Vapi Create Call fails, still write a row to the sheet with vapi_call_id = ERROR and the error message in a notes column, and post a red-flag Slack message so I know a dispatch failed.

Workflow inputs I want exposed: vapi_assistant_id, vapi_phone_number_id, sheets_spreadsheet_id, sheets_sheet_name, slack_channel_id, hubspot_portal_id. Everything else comes from the webhook payload.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageWin back LiveChat visitors whose chats went unansweredLet support send one-off Loops emails without an engineerTurn Mailjet email clicks into ranked HubSpot follow-upsStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsA searchable RFP answer library your bid team drafts fromLinkedIn Ads budget pacing dashboard for every client account