Score Meta ad account health weekly with Claude and Gmail
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs on a schedule (every week). It uses only n8n's built-in nodes. It also calls api.anthropic.com over HTTP.
How it runs
Trigger: On a schedule (every week).
- Set config: health score (Code): runs custom JavaScript code
- Build comparison windows (Code): runs custom JavaScript code
- Fetch account this week (Meta) (HTTP Request): calls an HTTP API
- Fetch account prior week (Meta) (HTTP Request): calls an HTTP API
- Fetch ad set insights (Meta) (HTTP Request): calls an HTTP API
- Fetch ad set entities (Meta) (HTTP Request): calls an HTTP API
- Fetch ad insights (Meta) (HTTP Request): calls an HTTP API
- Run checks and score (Code): runs custom JavaScript code
- Build AI triage prompt (Code): runs custom JavaScript code
- Rank fixes with Claude AI (HTTP Request): calls api.anthropic.com (POST)
…plus 1 more step. See the full node list below.
HTTP calls to: api.anthropic.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (3)
- Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick overview This workflow pulls hourly performance from the Meta Marketing API for the last 30 days, calculates cost-per-result by hour, asks Anthropic Claude to recommend a dayparting schedule, and emails a formatted report via Gmail. How it works 1. Runs…