Push new Airtable leads into Instantly and HubSpot

By General Input

When a new lead lands in your Airtable outbound queue, add it to the right Instantly campaign and mirror it into HubSpot in one pass.

Integrations

  • Instantly
  • Airtable
  • HubSpot

Type

Deterministic Code

Categories

  • Sales
  • Operations

Build me a code workflow that pushes new leads from my Airtable outbound queue into Instantly and mirrors them into HubSpot, in one deterministic pass per row.

Trigger: poll Airtable using the new_record event on my Outbound Queue table. The user will pick the base, table, and (optionally) a view at setup time. Each polled row is one workflow run.

Step 1. Read the Airtable row. The fields I care about are: email, first_name, last_name, company, title, instantly_campaign_id (the campaign UUID this lead should go into), and any custom variable columns such as icebreaker and personalization_line. Treat instantly_campaign_id and email as required; if either is missing, skip the row and write "Missing email or campaign" into the Error column on that row using Airtable Update Record, then end the run.

Step 2. Call Instantly Add Leads in Bulk against the campaign UUID on the row. Map first_name, last_name, email, company_name, and personalization (title) into the Instantly lead schema. Put any extra Airtable columns I flagged as custom variables into the lead's custom_variables object (Instantly only accepts strings, numbers, booleans, or null as values, so coerce accordingly). Send exactly one lead per call (this row), with skip_if_in_workspace and skip_if_in_campaign both off unless the user opts in. Read the response: Instantly returns counts for total_sent, leads_uploaded, skipped_count, and an array describing each skipped lead with its reason (blocklisted, duplicate, invalid email, etc.).

Step 3. If the lead was uploaded successfully, call HubSpot Batch Upsert Contacts with idProperty set to email. Set properties: email, firstname, lastname, company, jobtitle, lifecyclestage = "outreach", and a custom property (default name instantly_campaign) holding the campaign name or UUID from the Airtable row. Use upsert (not create) so existing contacts are updated in place rather than duplicated.

Step 4. Call Airtable Update Record on the original row. If Instantly accepted the lead, set the Synced checkbox to true, write the returned Instantly lead UUID into an Instantly Lead ID column, and stamp the current timestamp into a Synced At column. If Instantly skipped the lead, leave Synced unchecked and write the human-readable skip reason into the Error column so the RevOps owner can see why it didn't sync. Do not retry skipped leads automatically; the row stays in the queue with the error recorded.

Make the field names (instantly_campaign_id, custom variable columns, Synced, Error, Instantly Lead ID, Synced At) configurable at setup so users with different Airtable schemas can map their own column names without editing code. Default to the names above.

Credentials needed: Airtable (OAuth, read and write on the base), Instantly (API key v2 with leads:create and leads:read scopes), HubSpot (OAuth with crm.objects.contacts.write and crm.schemas.contacts.read so the campaign property can be validated).

Related prompts

Explore more prompts
Turn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRMLead response desk with a running clock on every new leadApprove Lusha enrichment field by field before HubSpot saves it