Reconcile blended ROAS, MER and CAC with Meta, Google, TikTok and Claude
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
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
What it does
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 over-claiming, and uses Anthropic Claude to generate a short executive efficiency brief. How it works 1. Runs manually to start the reconciliation for the configured date range. 2. Loads the reporting window plus store revenue, new-customer count, and any additional platform spend/revenue inputs. 3. Calls the Meta Marketing API to fetch account-level ad spend and conversion value, then merges it with the additional platform figures. 4. Calculates total spend, total platform-reported revenue, blended ROAS/MER, blended CAC, and the over-claim amount and percentage, plus per-platform reported ROAS. 5. Sends the reconciled metrics to Anthropic Claude to generate a terse JSON brief with a verdict, over-claim note, and recommended action. 6. Prints a console scorecard with blended ROAS/MER, CAC, over-claiming, per-platform breakdown, and the Claude-generated brief. Setup 1. Set the environment variables METAACCESSTOKEN, METAADACCOUNTID, and optionally METAAPIVERSION for the Meta Marketing API request. 2. Add your ANTHROPICAPIKEY environment variable to enable the Anthropic Claude API call. 3. Replace the mock store revenue and new-customer values with a real data source such as Shopify or Stripe, and replace the Google Ads and TikTok placeholder figures with real Google Ads and TikTok connectors if needed. 4. Adjust the datepreset (for example, last30d) and any extra platforms you want included in the blended metrics. Requirements - A Meta access token with adsread on the ad account - A store revenue source (Shopify or Stripe) for actual revenue and new-customer count - An Anthropic API key (Claude) - Optional: Google Ads and TikTok Ads access to include those platforms Customization - Replace STOREREVENUE and NEWCUSTOMERS in Config with a Shopify or Stripe node - Replace the Google Ads and TikTok placeholders in EXTRAPLATFORMS with real ad-platform nodes - Adjust DATEPRESET (e.g. last30d) Additional info Built by nocode.expert (done-for-you automation and tracking). Computes blended ROAS, MER and CAC plus the platform over-claim gap that survives iOS attribution loss. All secrets read from environment variables.