Auto-attach Cap walkthroughs to the right HubSpot deal

By General Input

Every two business hours, new Cap sales walkthroughs get filed on the matching HubSpot deal automatically, so AEs stop pasting share links into deal notes by hand.

Integrations

  • Cap
  • HubSpot
  • Slack Bot

Type

Agentic Task

Categories

  • Sales
  • Operations

I want an agent that auto-attaches new Cap sales walkthrough recordings to the right HubSpot deal so my AEs stop manually pasting Cap share links into deal notes.

Trigger: cron, every 2 hours, business hours only (default 9am to 6pm on weekdays in the workspace's local timezone). Cap does not support webhooks or first-class polling, so a recurring cron is the right approach. The workflow should only consider Cap recordings created since the last run.

Step 1. Pull new recordings from Cap. Use Cap's List Videos to fetch recordings whose createdAt is after the previous run's high-water mark (or the last 2 hours on the first run). Skip recordings whose transcriptionStatus is PROCESSING so we pick them up on the next pass once they finish. The public share link is https://cap.so/s/{id}.

Step 2. Reason over each recording's title to extract a likely company or contact name. Titles tend to look like "Acme Demo Walkthrough", "Initech - product tour", "Walkthrough for Jane @ Globex", "Stark Industries discovery follow-up". Pull out the most likely company name first; if there isn't one, pull a contact's full name. If the title is generic (e.g. "demo", "recording", "untitled", "test"), mark it low-confidence and skip.

Step 3. Find the right HubSpot deal. Use HubSpot's Search Companies to find a single confident match for the extracted company name (exact-ish name match, prefer companies with recent activity). Then use HubSpot's Search Deals to find that company's most active open deal: filter to dealstage not equal to closedwon or closedlost, sort by hs_lastmodifieddate descending, and take the top hit. If the title only gave you a contact name, try Search Companies via the contact's likely domain or fall back to Search Deals filtered by associated contact name. Only proceed when there is exactly one strong match.

Step 4. File the note. Use HubSpot's Create Note with a body that includes the recording title, the duration rounded to minutes, and the Cap share link. Associate the note with the matched deal and, when available, the deal's primary contact. Don't auto-create companies, contacts, or deals; if any of those don't exist, treat the recording as a skip.

Step 5. When in doubt, skip. Skip rules: no confident company or deal match, multiple plausible matches, the only matching deal is closed, or the title is generic. Skipping is the right behavior here, since a wrong note attached to the wrong deal is worse than no note at all.

Step 6. Send a Slack nudge for skips. After each run, use Slack Bot's Send a Message to post one short message to a sales channel I will pick at setup time, listing every skipped recording with its title, duration, Cap share link, and a one-line reason it was skipped (e.g. "no company match", "two possible deals", "generic title"). If there were zero skips, do not post anything. Do not post a message for successful attachments; the HubSpot note is the receipt.

Edge cases: if HubSpot returns 429, back off and retry. If Cap returns a recording with empty title and empty externalUserId, skip it as low-confidence. De-dupe defensively on Cap video id so a recording is never noted twice across overlapping runs. Persist the high-water mark across runs.

Inputs I want to set when I install this: the Slack channel for the skipped-recordings nudge, the cron cadence and business-hours window, and a confidence threshold setting (default: only attach when there is exactly one company match and one active open deal).

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