Sync new Wistia video leads to HubSpot and Google Sheets
Every hour, pull fresh email captures from your Wistia videos into HubSpot and a shared Google Sheet so your sales team has one source of truth.
Every hour, sync any new Wistia Turnstile email captures from my videos into HubSpot and a Google Sheet so my sales team has a single source of truth for video-sourced leads. This should run as a deterministic code workflow on an hourly cron trigger.
Step 1: Call Wistia's List Medias operation to enumerate the active videos on my account. Page through results so the workflow covers every video, not just the first page.
Step 2: For each video, call Wistia's Get Media Analytics Conversions operation with a date range covering roughly the last hour (use a small overlap window, like the last 70 minutes, to avoid dropping leads between runs). Pull the email, the video that was viewed, the timestamp, and percent watched if available.
Step 3: Dedupe the conversions by email plus video hashed ID across the batch, then shape each row into a HubSpot contact payload. Set the email, set a custom property called wistia_source_video to the video title, and set lifecycle stage to lead. Then call HubSpot's Batch Upsert Contacts operation matched by email so existing contacts get updated and new ones get created.
Step 4: For each new lead from this run, append one row to a Google Sheet using Google Sheets' Append Values operation. Columns: timestamp, email, video title, video URL, percent watched. The sheet ID and tab name should be configurable.
If any individual video's conversions call fails, log the error and continue with the rest so a single bad video does not block the whole sync. At the end, return a small summary with counts: videos scanned, new leads upserted to HubSpot, rows appended to the sheet.
Additional information
What does this prompt do?
- Checks every one of your Wistia videos once an hour for new form captures (email opt-ins from Turnstile).
- Adds or updates each viewer as a HubSpot contact, tagged with the exact video that converted them.
- Appends one row per new lead to a shared Google Sheet so your sales team has a running, single source of truth.
- Skips anyone already in your list so HubSpot stays clean and reps never see duplicates.
What do I need to use this?
- A Wistia account with Turnstile lead capture turned on for the videos you want to track.
- A HubSpot account where you can create or update contacts, plus a custom contact property for the source video name.
- A Google Sheet you control, with columns for timestamp, email, video title, video URL, and percent watched.
How can I customize it?
- Change how often it runs, from every hour to once a day, or run it for only one Wistia project.
- Choose which HubSpot lifecycle stage to assign and which custom property stores the source video name.
- Add extra columns to the Google Sheet, like UTM source, watch duration, or the rep who should own the lead.
FAQs
Will this work if my sales team uses HubSpot Free?
What happens if the same person fills out a form on two different videos?
Can I send the leads somewhere other than HubSpot?
Why does it run every hour instead of in real time?
What if a viewer enters an invalid email?
Related templates
Every night we run your saved Databricks query and refresh a Google Sheet with the results, so your team reads the latest numbers without a login.
Every morning, automatically record yesterday's match results and each league's latest table into a spreadsheet you can chart or pivot.
The moment a new contact lands in HubSpot, we check their email against known data breaches and flag the high-risk ones so your team can act fast.
Every morning we check your list of IP addresses for abusive activity, update your spreadsheet, and alert your team only about the risky ones.
Automatically add every new Azure DevOps work item to a Google Sheets tracker so your team can filter, sort, and report without opening Azure DevOps.
Check key email accounts against known data breaches every weekday, log every exposure to a spreadsheet, and get a Slack alert when a new breach shows up.
Stop copying video leads by hand.
Connect Wistia, HubSpot, and Google Sheets once, and Geni keeps every new video lead in sync, every hour.