Daily competitor video log in Google Sheets

By General Input

Every morning at 7am ET, pull yesterday's competitor videos from Tubular Labs and log them as fresh rows in your share-of-voice Google Sheet.

Integrations

  • Tubular Labs
  • Google Sheets

Type

Deterministic Code

Categories

  • Marketing
  • Operations

Build a code workflow that maintains a rolling, day-by-day competitor video performance log in Google Sheets, so my marketing team can chart share-of-voice and benchmark against creators we care about.

Trigger: cron, every morning at 7:00 AM America/New_York.

Inputs the workflow should accept at configure time: the Google Sheets spreadsheet ID, the Config tab name (default "Config"), and the Daily Log tab name (default "Daily Log").

Step 1 — Read the competitor watchlist. Use Google Sheets Get Values to read the Config tab. Assume the first row is a header and each subsequent row is one competitor with at least two columns: a friendly competitor name and a Tubular creator / channel identifier (channel ID, creator ID, or platform handle). Skip empty rows.

Step 2 — Fetch yesterday's videos and metrics from Tubular Labs. For each competitor row, call Tubular Labs Execute GraphQL Query to fetch: every video that creator/channel published in the last 24 hours, the video title, the canonical URL, the platform (YouTube, TikTok, Instagram, Facebook, Twitter, Twitch), the 1-day-post-upload cumulative view count, like count, comment count, and share count (Tubular exposes 1, 2, 3, 7, and 30-day measurement windows — use the 1-day window), and the creator's current total subscribers/followers. Send the API key in the Authorization header with no Bearer prefix. Handle GraphQL errors in the response body, not just HTTP status.

Step 3 — Append rows to the Daily Log. Use Google Sheets Append Values on the Daily Log tab with valueInputOption USER_ENTERED. Append one row per video with these columns in order: Date (the trigger date in YYYY-MM-DD, ET), Competitor (friendly name from Config), Platform, Video Title, Video URL, Views (1-day), Likes (1-day), Comments (1-day), Shares (1-day), Engagement (likes + comments + shares), Follower Count (creator total at run time). If a competitor published nothing in the window, append no rows for them — do not write a blank/placeholder row.

Behavior rules: this is a deterministic pipeline, no judgement calls or LLM steps. If Tubular returns a rate-limit error (HTTP 429 or extensions.code RATE_LIMITED), back off and retry with exponential delay. If a single competitor errors, log it and continue with the rest — never let one bad row block the whole run. The Daily Log tab should keep growing forever; do not clear or rewrite existing rows. Assume the Daily Log header row already exists; if it doesn't, the workflow can create it on the first run.

Output: the Google Sheet is the source of truth. Charts, pivots, and any downstream BI dashboards are built on top of the Daily Log tab in Sheets — the workflow itself just keeps that tab fresh.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seatsBuild audience segments from product usage and push to LoopsTurn the people who engage with your posts into Pipedrive leads