Pin Cap walkthroughs to the matching Linear issue

By General Input

Every hour on weekdays, find new Cap recordings with a Linear issue ID in the title and post the video link as a comment on that issue.

Integrations

  • Cap
  • Linear

Type

Agentic Task

Categories

  • Engineering

Build me an agent workflow that watches my team's Cap recordings and pins each one to the matching Linear issue whenever the recording's title mentions a Linear issue ID.

Trigger: cron, every hour on weekdays (Monday through Friday, roughly 9am to 6pm in my timezone).

Each run, the agent should:

1. Call Cap's List Videos operation to fetch the most recent recordings. Paginate enough to cover anything created since the last run; an hour of recordings will easily fit in one page.

2. For each video, scan the title for a Linear issue identifier matching the pattern UPPERCASE-PREFIX dash NUMBER (for example ENG-412, FE-9, OPS-1024). Match the first identifier found. If the title has no clean identifier, skip the video silently.

3. For each matched video, call Linear's Add Comment to Issue operation using the extracted identifier as the issueId. The comment body should be one short line: "Walkthrough recording attached: <title> (<duration as Mm Ss>) <video link>".

4. Maintain a lightweight persistent memory of which (videoId, issueId) pairs have already been commented on, and skip any pair that is already in memory so we never comment twice for the same recording on the same issue. Start with empty memory on the first run.

5. If a Linear comment call fails (issue not found, prefix doesn't match a team in the workspace, permission error), log the failure and continue with the next video. Do not retry the same failure on future runs; move on.

Run quietly. If there is nothing new to comment on, do nothing and exit. No Slack or email notification step is needed.

Related prompts

Explore more prompts
Catch feature flags that never got switched on in productionWeekly alert noise review board for incident.io on-callMorning triage board for your Kernel browser agent runsTrack every half finished LaunchDarkly rollout in one boardFind the customers stuck contacting support again and againTurn shipped Linear work into Intercom product announcementsVoice agent QA review board for your Hume EVI callsClose the loop between Front tickets and Linear bug fixesOpen a Heroku release war room the moment production looks wrongFind the themes Help Scout tags miss and file them in Linear