Reconcile blended ROAS, MER and CAC with Meta, Google, TikTok and Claude
Ready for 3.0What this workflow does
This workflow has 11 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Facebook Graph API. It also calls business-api.tiktok.com, oauth2.googleapis.com and api.anthropic.com over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Set config: store revenue, new customers, extra platforms (Code): runs custom JavaScript code
- Fetch Meta spend & revenue (Meta) (Facebook Graph API): uses Facebook Graph API
- Fetch TikTok spend & revenue (HTTP Request): calls business-api.tiktok.com
- Get Google access token (HTTP Request): calls oauth2.googleapis.com (POST)
- Fetch Google Ads spend & revenue (HTTP Request): calls an HTTP API (POST)
- Assemble platform table (Code): runs custom JavaScript code
- Reconcile blended ROAS, MER & platform over-claim gap (Code): runs custom JavaScript code
- Build AI efficiency brief prompt (Code): runs custom JavaScript code
- Write marketing-efficiency brief with Claude AI (HTTP Request): calls api.anthropic.com (POST)
- Show blended ROAS / MER scorecard (Code): runs custom JavaScript code
Services it uses
HTTP calls to: business-api.tiktok.com, oauth2.googleapis.com, 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 - Facebook Graph API
n8n-nodes-base.facebookGraphApi - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick overview This workflow pulls ad spend and platform-reported revenue from Meta (with placeholders for Google Ads and TikTok), combines it with your actual store revenue and new-customer count, calculates blended ROAS/MER and blended CAC plus…