Meta ads to Google Sheets: daily & historical campaign performance report
$20/month : Unlimited workflows
2500 executions/month
THE #1 IN WEB SCRAPING
Scrape any website without limits
HOSTINGER 🎉 Early Black Friday Deal
DISCOUNT 20% Try free
DISCOUNT 20%
Self-hosted n8n
Unlimited workflows - from $4.99/mo
#1 hub for scraping, AI & automation
6000+ actors - $5 credits/mo
Overview
This template automatically exports Meta (Facebook) Ads campaign performance into Google Sheets — both daily and for historical backfills. It’s ideal for performance marketers, agencies, and analytics teams who want a reliable data pipeline from Meta Ads into their reporting stack.
What this workflow does
- Runs a daily cron job to pull yesterday’s campaign-level performance from the Meta Ads Insights API.
- Flattens the API response and calculates key KPIs like CPL, CPA, ROAS, CTR, CPC, CPM, frequency and more.
- Appends one row per campaign per day to a Google Sheet (for dashboards and further analysis).
- Provides a separate Manual Backfill section to import historical data using a
time_rangeparameter (e.g. last 12–24 months).
Use cases
- Build Looker Studio / Power BI dashboards on top of a clean, daily Meta Ads dataset.
- Track ROAS, CPL, CPA, CTR, and frequency trends over time.
- Combine campaign data with CRM or ecommerce data in the same spreadsheet.
- Quickly backfill past performance when onboarding a new Meta Ads account.
How it works
Daily Incremental Flow
- A
Schedule Triggerruns every day at 05:00. - The
Set confignode defines ad account, date preset (yesterday), and Google Sheet details. - The
Meta Insightsnode calls the Facebook Graphinsightsedge atlevel=campaign. - The
Codenode flattens the data and derives CPL, CPA, ROAS, and other KPIs. - The
Google Sheetsnode appends the rows to yourMeta_Daily_Datasheet.
- A
Manual Backfill Flow
- A
Manual Triggerlets you run the flow on demand. - The
Set backfill confignode definesbackfillSinceandbackfillUntil. - The
Meta Insights (time_range)node fetches performance for that historical range. - The same transform logic is applied, and rows are appended to the same sheet.
- A
Prerequisites
- A Meta Business account with:
- A system user and a long-lived access token with
ads_read/read_insights.
- A system user and a long-lived access token with
- A Google Sheet with a header row that matches the mapped column names.
- n8n credentials for:
- Facebook Graph API
- Google Sheets OAuth2
Setup steps
- Import this template into your n8n instance.
- Open the
Set configandSet backfill confignodes:- Set your
adAccountId(e.g.act_123456789012345). - Set your
sheetId(Google Sheet ID) and sheet name (e.g.Meta_Daily_Data).
- Set your
- Configure your Facebook Graph API and Google Sheets credentials in n8n.
- (Optional) Run the Manual Backfill section for your desired historical ranges (e.g. per quarter).
- Enable the workflow so the Daily Incremental section runs automatically.
Customization
- Change
levelfromcampaigntoadsetoradif you need more granular reporting. - Add breakdowns (e.g.
publisher_platform,platform_position) to split by platform and placement. - Extend the transform code with additional KPIs or dimensions that match your reporting needs.
- Use a separate sheet for raw data and build dashboards on top of a cleaned or pivoted view.
Consulting & support
If you need help with:
- E-Commerce Strategy & Development (Shopify, Shopware 6, Magento 2, SAP Commerce Cloud, etc.)
- Growth & Performance Marketing (Google / Meta / Microsoft Ads, etc.)
- Data & Analytics Setups (tracking, dashboards, attribution, gdpr, etc.)
please reach out to Serendipity Technologies:
We can help you turn this workflow into a full analytics stack and reporting system tailored to your business.