Skip to main content

Facebook ads reporting automation with Facebook Graph API and Google Sheets

Workflow preview

Workflow preview
100%
Facebook ads reporting automation with Facebook Graph API and Google Sheets preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Facebook Ads Reporting Automation — Automatically Fetch & Sync Campaign Statistics This automation enables you to automatically fetch daily campaign data from Facebook Ads without manual exports. I...

Best for

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

Tools used

n8n-nodes-base.code, n8n-nodes-base.merge, n8n-nodes-base.aggregate, n8n-nodes-base.stickynote, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.facebookgraphapi

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Facebook ads reporting automation with Facebook Graph API and Google Sheets
Workflow name
Facebook ads reporting automation with Facebook Graph API and Google Sheets

Facebook Ads Reporting Automation — Automatically Fetch & Sync Campaign Statistics

This automation enables you to automatically fetch daily campaign data from Facebook Ads without manual exports. It requires connection to the Facebook Graph API and a Google Sheets account where all data is stored and updated in real time.

How does it work?

The workflow connects to your Facebook Ads account via the Facebook Graph API to retrieve the latest campaign data, including campaign status, spend, results, reach, and other key performance metrics.

Retrieved data is automatically synced to a Google Sheets spreadsheet, making it easy to analyze, report, and share with your team or clients.

The automation runs daily at a scheduled time, ensuring your campaign stats are always up-to-date.

What can you use it for?

Efficiently track Facebook Ads performance without manual data handling.

Generate real-time reports for marketing teams or clients.

Quickly identify trends and optimize ad spend based on fresh data.

Centralize data from multiple campaigns for better decision-making.

Requirements:

Active Facebook Ads account with access to Facebook Graph API credentials. Facebook App with ads_read permissions and a valid access token

Google account with permission to use Google Sheets.

Basic setup of API credentials and Google Sheets integration.

Create a new spreadsheet and name it (e.g., Facebook Campaign Stats). In the first row, create the following column headers (exact order required):

| Id Campaign | Campaign name | Campaign status | Statistic | Impressions | Clicks | CPC | CTR | Conversions | Cost per conversion | Spend money | From | To |

Make sure the sheet is editable by the automation and accessible via Google Sheets API (OAuth2 or service account).

contact: [email protected]

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 - Code1

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

Block 2 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 3 - Aggregate

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

Block 4 - Sticky Note1

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

Block 5 - Sticky Note5

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

Block 6 - Update row in sheet4

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

Block 7 - Get Only Active Campaign

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 8 - Get Campaign from AD Account

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Checking if Campaign have data

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Update Campaign statistics

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

Block 11 - Get Campaign statistics

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - Checking Conversion

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

Block 13 - Get Campaign ID

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

Block 14 - Add credentials to the Facebook Graph API

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

Block 15 - Add your campaign to file

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

Block 16 - Set Schedule

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

Block 17 - Set Schedule1

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

3. Summary Table

Workflow Facebook ads reporting automation with Facebook Graph API and Google Sheets
Complexity advanced
Nodes 17
Categories Market Research
Author Jacob
Published 23 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6328/6328.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 Facebook ads reporting automation with Facebook Graph API and Google Sheets do?

Facebook Ads Reporting Automation — Automatically Fetch & Sync Campaign Statistics This automation enables you to automatically fetch daily campaign data from Facebook Ads without manual exports. I...

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.