Skip to main content

Meta ads to Google Sheets: daily & historical campaign performance report

Workflow preview

Workflow preview
100%
Meta ads to Google Sheets: daily & historical campaign performance report preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow 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 analy...

Best for

  • Market Research automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.set, n8n-nodes-base.facebookgraphapi, n8n-nodes-base.code, n8n-nodes-base.googlesheets, n8n-nodes-base.manualtrigger, n8n-nodes-base.scheduletrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Reinhard Schmidbauer.

Original n8n.io source

1.1 Workflow description

Title
Meta ads to Google Sheets: daily & historical campaign performance report
Workflow name
Meta ads to Google Sheets: daily & historical campaign performance report

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_range parameter (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

  1. Daily Incremental Flow

    • A Schedule Trigger runs every day at 05:00.
    • The Set config node defines ad account, date preset (yesterday), and Google Sheet details.
    • The Meta Insights node calls the Facebook Graph insights edge at level=campaign.
    • The Code node flattens the data and derives CPL, CPA, ROAS, and other KPIs.
    • The Google Sheets node appends the rows to your Meta_Daily_Data sheet.
  2. Manual Backfill Flow

    • A Manual Trigger lets you run the flow on demand.
    • The Set backfill config node defines backfillSince and backfillUntil.
    • 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.

Prerequisites

  • A Meta Business account with:
    • A system user and a long-lived access token with ads_read / read_insights.
  • A Google Sheet with a header row that matches the mapped column names.
  • n8n credentials for:
    • Facebook Graph API
    • Google Sheets OAuth2

Setup steps

  1. Import this template into your n8n instance.
  2. Open the Set config and Set backfill config nodes:
    • Set your adAccountId (e.g. act_123456789012345).
    • Set your sheetId (Google Sheet ID) and sheet name (e.g. Meta_Daily_Data).
  3. Configure your Facebook Graph API and Google Sheets credentials in n8n.
  4. (Optional) Run the Manual Backfill section for your desired historical ranges (e.g. per quarter).
  5. Enable the workflow so the Daily Incremental section runs automatically.

Customization

  • Change level from campaign to adset or ad if 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:

👉 https://www.serendipity.at

We can help you turn this workflow into a full analytics stack and reporting system tailored to your business.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Set config (Meta + Sheets)

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Fetch Meta Insights (yesterday)

Type / Role
n8n-nodes-base.facebookGraphApi - facebookGraphApi
Config choices
Version 1

Block 5 - Transform Meta data for Sheets

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Append daily rows to Google Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 7 - Manual backfill trigger

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 8 - Set backfill config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Fetch Meta Insights (time_range)

Type / Role
n8n-nodes-base.facebookGraphApi - facebookGraphApi
Config choices
Version 1

Block 10 - Transform backfill data for Sheets

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Append backfill rows to Google Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 12 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Daily schedule (06:00)

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

3. Summary Table

Workflow Meta ads to Google Sheets: daily & historical campaign performance report
Complexity intermediate
Nodes 14
Categories Market Research
Author Reinhard Schmidbauer
Published 04 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11499/11499.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Meta ads to Google Sheets: daily & historical campaign performance report do?

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 analy...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research use case.