Facebook Lead Ads to HubSpot and Slack, every 15 minutes

By General Input

Sweep new Facebook and Instagram lead form submissions every 15 minutes, sync them to HubSpot, and post a qualified alert with a draft intro email to Slack.

Integrations

  • Meta Ads
  • HubSpot
  • Slack Bot

Type

Agentic Task

Categories

  • Sales
  • Marketing

Build an agent workflow that runs on a cron every 15 minutes to move new Facebook and Instagram Lead Ad submissions from Meta Ads into HubSpot and post an enriched alert to Slack.

Trigger: cron, every 15 minutes.

On each run, the agent should:

1. For each active lead form in the configured Meta Ads account, use Meta Ads Get Ad Leads to pull the latest lead submissions. Keep a small state note of the last-seen lead id per form so we only process new submissions and never post the same lead twice.

2. For every new lead, use HubSpot Search Contacts to check whether a contact already exists (match on the email captured on the form). Remember whether this was a new create or an existing update, because we surface that in Slack.

3. Upsert the lead into HubSpot via HubSpot Batch Upsert Contacts, matched on email. Write standard properties (first name, last name, email, phone) plus source campaign, source ad, source ad set, and each form question and answer. Batch upserts up to 100 leads per HubSpot call when a single sweep pulls in many at once.

4. Take the email domain of the new lead and use HubSpot Search Companies to see if there is an existing company with that domain. If yes, remember the company name so we can flag this as an account-based touch in Slack.

5. Write a short qualification summary (2 to 4 sentences) from the form answers, calling out fit signals like company size, role, budget, or timeline where present. Also draft a one-paragraph intro email the AE can copy: friendly, references the specific ad or offer the lead responded to, and ends with a soft ask for a 15-minute call.

6. Post one message per lead to the configured sales Slack channel using Slack Bot Send a Message. The message should include: the lead's full name and title, email and phone, the campaign and ad they came from, whether they are new or already in HubSpot, the account-based flag when the domain matched a company, the qualification summary, and the draft intro email in a code block so it's easy to copy.

Inputs to expose on the workflow: the Meta Ads account id, the Slack channel id for sales alerts, and an optional list of lead form ids to restrict to (default: all active lead forms on the account).

Guardrails: if Get Ad Leads returns nothing new for a form, skip silently. If HubSpot rejects a contact (bad email, etc.), still post the Slack message but note the sync failure so the AE can fix it manually. Never post the same lead twice, even across runs.

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