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.
Frequently asked questions
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?
Stop copying video leads by hand.
Connect Wistia, HubSpot, and Google Sheets once, and Geni keeps every new video lead in sync, every hour.