Sync new TikTok lead form leads to HubSpot and Slack
Every 15 minutes, pull fresh TikTok Instant Form leads, add them to HubSpot, and ping your sales team in Slack so no lead sits cold.
Build a code workflow that runs on a cron every 15 minutes and syncs new TikTok Lead Generation Instant Form submissions into HubSpot, then notifies the sales team in Slack. This is deterministic pipeline work with clear steps, so keep it a code workflow, not an agent.
Trigger: cron, every 15 minutes. Persist a last-run timestamp in workflow state (per form is fine) so each run only fetches leads submitted since the previous run. On the very first run, look back a short window like the last 30 minutes so we do not backfill everything.
Step 1. Enumerate active lead forms. Call the tiktok-ads Get Instant Pages operation for the configured advertiser_id to list the advertiser's Instant Pages / Instant Forms. Filter to forms that are active. The advertiser_id should be a workflow input the user configures once.
Step 2. For each form, pull new leads. Call the tiktok-ads Create Lead Download Task operation for that form, scoped to the time window since the last successful run. Poll or wait until the task is ready, then call the tiktok-ads Download Leads operation to fetch the leads file. Parse it into a normalized list of leads with email, first name, last name, phone, form id, form name, submission timestamp, and any custom form fields.
Step 3. Upsert into HubSpot. Map the fields as follows: email -> email, first name -> firstname, last name -> lastname, phone -> phone. Write the originating form name to a custom contact property (default name tiktok_lead_form, but let the user rename it). Also stamp a lead_source property with the value "tiktok-lead-gen" so these are easy to segment later. Send everything through the hubspot Batch Upsert Contacts operation matched on email, in batches of up to 100 contacts. Capture the returned HubSpot contact id for each lead.
Step 4. Notify Slack. For each new lead, call the slack Send a Message operation to a channel that the user configures (default #new-leads). The message should include the lead's name, email, phone, form name, and a clickable HubSpot contact URL of the form https://app.hubspot.com/contacts/<portalId>/contact/<contactId>. Keep the message compact and scannable, one message per lead so it is easy to claim.
Configuration the workflow should expose as inputs: TikTok Ads advertiser_id, HubSpot portal id (for building the contact URL), Slack channel id or name, optional lookback window for the first run, and an optional map from TikTok custom form field ids to HubSpot property names.
Edge cases: dedupe within a single run so the same email does not get two Slack pings; skip rows that are missing an email since HubSpot upsert needs it; if a TikTok download task fails, log the error and continue with the other forms rather than aborting the whole run; only advance the last-run timestamp after HubSpot and Slack both succeed for that form.
Additional information
What does this prompt do?
- Checks your TikTok Ads account every 15 minutes for new Instant Form submissions across all active lead forms.
- Creates or updates each lead as a contact in HubSpot, matched on email, and tags them with the source form so you always know where they came from.
- Posts a fresh message to your #new-leads Slack channel with the person's name, email, phone, form, and a direct link to their HubSpot record.
- Only pulls leads that came in since the last run, so nothing gets missed and nothing gets double-imported.
What do I need to use this?
- A TikTok Ads Manager account with at least one active Instant Form (Lead Generation) campaign.
- A HubSpot account where new contacts can be created or updated.
- A Slack workspace with a channel like #new-leads that the sales team watches.
How can I customize it?
- Change the schedule from every 15 minutes to every 5 minutes for hotter follow-up, or every hour if your volume is low.
- Swap the Slack channel, or route different form names to different channels or reps.
- Adjust how form fields map to HubSpot properties, including any custom questions you ask on the form.
- Add extra steps like assigning the contact to a HubSpot owner, enrolling them in a workflow, or scoring them before Slack goes out.
Frequently asked questions
How fast will my reps see a new TikTok lead?
What if the same person fills out two different forms?
Does this work with HubSpot Free?
Will old leads get re-imported the first time it runs?
Can I use Salesforce or Pipedrive instead of HubSpot?
Related templates
Stop losing TikTok leads to slow follow-up.
Connect TikTok Ads, HubSpot, and Slack once, and Geni keeps every new lead flowing into your CRM and in front of your reps.