See llms.txt for all machine-readable content.

Back to Templates

Track Meta Ad Library winners with Apify, OpenAI, Google Sheets, and Slack

Quick Overview

This workflow runs daily to pull competitor ads from the Meta Ad Library via an Apify actor, scores and summarizes them with OpenAI, logs results to Google Sheets, and sends hot ads to Slack for review and warm ads to Gmail; it also emails a weekly Gmail report.

How it works

  1. Runs on a daily schedule (or manually for testing) and uses a separate weekly schedule to generate a 7-day report.
  2. On daily runs, starts the Apify Meta Ad Library actor, polls Apify until the run succeeds, and then downloads the actor dataset items.
  3. Validates required fields and deduplicates ads against prior runs using workflow static data, then stops quietly if no new ads are found.
  4. Scores each ad with rule-based signals (run length, variations, placements, copy keywords, and other metadata) and sends each record to OpenAI to produce a structured fit score, verdict, summary, outreach angle, and red flags.
  5. Blends the rule score and OpenAI fit score into a final score and tier, then upserts all ads into a Google Sheets tab keyed by ad ID.
  6. Sends hot ads to Slack as a single approval message and writes the approve/dismiss decision back to the corresponding Google Sheets rows, while sending warm ads as an HTML digest via Gmail and keeping cold ads only in the sheet.
  7. On weekly runs, reads the Google Sheets tab, compiles a 7-day tier and review summary with the top ads, and emails the report via Gmail.

Setup

  1. Create an Apify token and add an HTTP Header Auth credential (for example, Authorization: Bearer <token>) for the Apify HTTP requests.
  2. Connect Google Sheets credentials, create a spreadsheet tab for the ads log, and set the Google Sheet ID and tab name in the Config values.
  3. Connect an OpenAI credential (or replace the chat model node with another provider) and adjust the AI criteria and weighting in Config.
  4. Connect Slack credentials and set the Slack channel ID in Config (and update the separate Slack channel ID used for error alerts).
  5. Connect Gmail credentials and set the digest recipient email address in Config.
  6. Update the Apify actor input in Config (search terms, country, filters, and limits) and optionally tune thresholds like hot/warm scores and minimum days running.