Facebook Ads Performance Reporting and Google Sheets Sync - n8n Workflow

Automate Facebook Ads reporting using this powerful n8n workflow. Fetch campaign stats via the Facebook Graph API and sync detailed performance data to Google Sheets instantly.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Marketing professionals needing automated ad performance reports.

  • Data analysts looking to centralize marketing data outside the Facebook platform.

  • Users seeking ready-made n8n templates for complex marketing tasks.

  • Anyone who manages ad spending and requires daily or scheduled updates on KPIs.

Overview

This robust n8n workflow solves the problem of manual data extraction from the Facebook Ads platform. It provides a two-part automated solution: first, identifying active campaigns and adding their IDs to a Google Sheet database, and second, periodically pulling performance metrics (like clicks, conversions, and spend) for those campaigns using the Facebook Graph API. By deploying this n8n automation, users gain access to real-time, structured campaign data directly in Google Sheets, enabling faster analysis and better decision-making without constant manual API interaction. Every critical n8n node is configured for efficiency and reliability, making this one of the most useful n8n templates for marketing automation.

How it Works

This complex n8n workflow operates on two separate scheduled n8n trigger events to manage campaign setup and daily reporting.

Phase 1: Campaign Setup & Identification


  1. An initial scheduled n8n trigger (Set Schedule) starts the process.

  2. The workflow connects to the Facebook Graph API via the dedicated n8n node to pull all campaigns associated with a specified Ad Account.

  3. A Code n8n node transforms the incoming data structure for standardization.

  4. An If n8n node filters the list, ensuring the process continues only for campaigns that are currently active (Get Only Active Campaign).

  5. The active campaign IDs are recorded or updated in a designated Google Sheet file using the appropriate Google Sheets n8n node (Add your campaign to file).

Phase 2: Data Extraction & Reporting


  1. A second independent scheduled n8n trigger (Set Schedule1) starts the daily reporting cycle.

  2. The workflow reads the list of Campaign IDs from the tracking Google Sheet using the Get Campaign ID n8n node.

  3. For each ID, an HTTP Request n8n node queries the Facebook Graph API for detailed performance statistics.

  4. An If n8n node checks if campaign data was successfully returned (Checking if Campaign have data).

  5. If data exists, a Code n8n node (Checking Conversion) standardizes conversion metrics. The data streams are then merged and aggregated.

  6. Finally, a Google Sheets n8n node (Update Campaign statistics) updates the corresponding rows in the reporting spreadsheet with the latest metrics. If no data was found, a fallback Google Sheets n8n node updates the status in the sheet accordingly. This continuous n8n workflow ensures reporting accuracy.

Installation Guide

To deploy this essential n8n workflow, follow these steps:


  1. Import the n8n workflow: Copy the provided JSON into your n8n instance using the "New" menu -> "Import from JSON".

  2. Facebook Graph API Credentials: You must configure the Add credentials to the Facebook Graph API n8n node. This requires a Facebook developer application setup, including the appropriate Ad Account permissions and a valid Access Token.

  3. Google Sheets Credentials: Configure the required Google Sheets n8n node connections using OAuth 2.0 or service account credentials. Ensure the service account has read/write access to the target spreadsheets.

  4. Spreadsheet Configuration: Replace placeholder Sheet IDs, range names, and workbook URLs in all Google Sheets n8n nodes (Get Campaign ID, Add your campaign to file, Update Campaign statistics, etc.) with your specific data storage details.

  5. Activate the n8n trigger: Once all credentials and configurations are verified, activate both Set Schedule n8n trigger nodes to ensure the automation runs automatically based on your defined schedule.

Node Details

Schedule Trigger n8n node (Set Schedule, Set Schedule1): Initiates both main workflow sequences based on a set time interval, acting as the primary n8n trigger for this automation.
Facebook Graph API n8n node (Add credentials...): Handles the authentication necessary for connecting to the Facebook Marketing API.
HTTP Request n8n node (Get Campaign from AD Account, Get Campaign statistics): These powerful n8n node instances execute the actual API calls to fetch campaign lists and detailed performance metrics, retrieving the raw data needed for reporting.
Google Sheets n8n node: Used extensively (e.g., Get Campaign ID, Update Campaign statistics) for both fetching the list of campaigns to monitor and for writing the final, processed performance statistics, serving as the central database for this n8n workflow.
If n8n node (Get Only Active Campaign, Checking if Campaign have data): Critical flow control n8n nodes. They ensure that only active campaigns are processed and that the reporting path only continues if valid performance data is returned.
Code n8n node (Code1, Checking Conversion): Custom scripting nodes used for necessary data transformation, standardizing metrics, or cleaning the raw API output before it is written to the Google Sheet by the Google Sheets n8n node.


  • Merge n8n node and Aggregate n8n node: Used in the reporting path to combine the initial campaign metadata with the newly fetched statistics stream into a single, cohesive data structure for the final update action.

Related n8n Workflows

Paid

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by
Jacob
Jacob

Featured*