Flag Meta Audience Network wasted spend with Meta Marketing API and Claude
Ready for 3.0What this workflow does
This workflow has 8 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Gmail. It also calls api.anthropic.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Set config: results & AN thresholds (Code): runs custom JavaScript code
- Fetch placement insights (Meta) (HTTP Request): calls an HTTP API
- Flag Audience Network leaks (Code): runs custom JavaScript code
- Build AI action prompt (Code): runs custom JavaScript code
- Rank Audience Network leaks with Claude AI (HTTP Request): calls api.anthropic.com (POST)
- Compile Audience Network leak report (Code): runs custom JavaScript code
- Send a message (Gmail): uses Gmail
Services it uses
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 (4)
- Manual Trigger
n8n-nodes-base.manualTrigger - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow pulls Meta Ads placement insights, flags underperforming Audience Network slices based on spend and CPA thresholds, uses Anthropic Claude to rank recommended actions, and compiles a plain-text leak report that is sent via Gmail.…