Find scalable Meta Ads winners with Claude and email the budget plan via Gmail

Go to Workflow
0 views
Built by Nocode Expert Nocode Expert
Created on July 31, 2026

Description

Quick overview
This workflow pulls Meta Ads performance and budget data, identifies ads beating account benchmarks, calculates safe budget lifts for capped winners, and uses Anthropic Claude to write a scaling plan, then emails the formatted report via Gmail.

How it works
Runs when you start the workflow manually.
Fetches account, ad, ad set, and campaign insights plus ad set and campaign budget entities from the Meta Marketing API for the selected date preset.
Calculates the account benchmark (ROAS for sales accounts or cost per result for lead-gen), filters ads that meet spend and results thresholds, and ranks the top winners that beat the benchmark.
Detects whether each winner is budget-capped and/or has frequency headroom, then computes an approved budget step and estimated extra weekly results or revenue for capped winners.
Sends the ranked winners and approved budget steps to Anthropic Claude to generate a concise scale order, recommended first move, and stop-scaling caution.
Formats the AI output and winner details into a text report and emails it using Gmail.

Setup
Set environment variables for META_ACCESS_TOKEN, META_AD_ACCOUNT_ID, and optionally META_API_VERSION, with access to the required Meta Marketing API insights and entity endpoints.
Add an Anthropic API key in ANTHROPIC_API_KEY for the Claude request.
Connect a Gmail account and set the recipient, subject, and any other email options in the Gmail node.
Review and tune thresholds (date preset, minimum spend/results, beat percentage, frequency headroom, cap utilisation, and lift percentage) in the configuration code step before activating.

Nodes Used (3)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
HTTP Request
n8n-nodes-base.httpRequest