Meta Ads Daily Performance Report Automation - n8n Workflow

Automate Meta Ads reporting using this powerful n8n workflow. Schedule daily data retrieval, update Google Sheets, and send performance summary emails via Gmail. Leverage these efficient n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Digital Marketing Managers: Who need reliable, automated daily performance reports without manual data pulls.
Agencies: Seeking standardized, repeatable Meta Ads reporting solutions for multiple clients.
Data Analysts: Looking for a no-code/low-code solution to centralize marketing data in Google Sheets.
n8n Users: Interested in advanced n8n workflow examples combining scheduling, HTTP requests, and email reporting.

Overview

Managing daily performance reports for advertising campaigns can be highly time-consuming. This efficient n8n workflow solves that challenge by providing a fully automated reporting pipeline for Meta (Facebook) Ads. Instead of manually logging into the Ads Manager, downloading CSVs, and creating summaries, this n8n template handles everything.

Every morning, the n8n trigger initiates the process. It retrieves campaign-level insights from the previous day, cleans and structures the complex API response, logs the detailed metrics into a Google Sheet for long-term storage and analysis, and simultaneously compiles a human-readable HTML report delivered via Gmail. This end-to-end automation ensures data accuracy, timeliness, and significantly reduces administrative overhead. It is a perfect example of how combining several powerful n8n node types can create robust business intelligence tools.

How it Works

The entire process is controlled by a scheduled n8n trigger, running daily at 9 AM:


  1. Scheduled Start: The Trigger - Daily at 9AM n8n trigger starts the execution every morning.

  2. Date Calculation: The Set Yesterday's Date n8n node uses a small JavaScript snippet to calculate the date of the previous day, which is crucial for the API request's time range parameter.

  3. Data Retrieval (Meta API): The Fetch Ads Data n8n node uses an HTTP Request to connect to the Facebook Graph API, dynamically requesting daily campaign insights (spend, results, CPM, etc.) for the day calculated in the previous step.

  4. Transformation and Cleaning: The powerful Transform Ads Data Code n8n node processes the nested JSON output from the Meta API. It flattens the structure, extracts key metrics like spend and costperresult, and ensures all data is formatted cleanly for downstream systems. This customized n8n node is vital for data integrity.

  5. Parallel Data Logging: The data branches into two parallel processes. The first uses the Update Google Sheet n8n node to append the clean, row-level data directly to a defined Google Sheet, ensuring a persistent record.

  6. Email Generation: Concurrently, the second path uses the Generate Email HTML Code n8n node. This n8n node iterates over all campaigns retrieved, building a professional HTML table body containing all campaign metrics.

  7. Final Report: Finally, the Send Email Report Gmail n8n node uses the generated HTML content as the email body, delivering the comprehensive daily report directly to your inbox. This streamlined n8n workflow provides immediate access to critical advertising performance indicators.

Installation Guide

To deploy this comprehensive n8n workflow template, follow these steps:


  1. Import: Copy the provided JSON data and import it directly into your n8n instance via the Workflows section ('New' -> 'Import from JSON').

  2. Credentials Setup: You must configure the following three credentials:

Facebook Graph API: Set up a credential for the Fetch Ads Data n8n node, linking it to your Meta Ads account and ensuring it has read permissions for insights.
Google Sheets: Set up an OAuth2 credential for the Update Google Sheet n8n node. Ensure the service account or user has write access to the target spreadsheet.
* Gmail: Set up an OAuth2 credential for the Send Email Report n8n node.

  1. Configure HTTP Request: In the Fetch Ads Data n8n node, replace AccountID> in the URL parameter with your actual Facebook Ad Account ID (e.g., act_123456789).

  2. Configure Google Sheet: In the Update Google Sheet n8n node, select the correct Document ID and Sheet Name where you want the data to be logged.

  3. Activate: Once credentials and configurations are complete, set the n8n workflow status to 'Active'. The daily reporting n8n trigger will execute at 9 AM daily.

Node Details

Trigger - Daily at 9AM (Schedule Trigger n8n trigger):
Function: Serves as the primary n8n trigger, initiating the report generation process.
Key Configuration: Configured to run daily, specifically at 9:00 AM.
Set Yesterday's Date (Set n8n node):
Function: Calculates and stores the ISO date string for the previous day, making it available for dynamic API calls.
Key Configuration: Uses a small JS expression (new Date().setDate(date.getDate() - 1)) to calculate 'yesterday'.
Fetch Ads Data (HTTP Request n8n node):
Function: Retrieves campaign-level metrics from the Meta Ads API.
Key Configuration: Uses the facebookGraphApi credential type. The time range is dynamically set using the yesterday variable: {"since":"{{ $json.yesterday }}","until":"{{ $json.yesterday }}"}.
Transform Ads Data (Code n8n node):
Function: Crucial for parsing and normalizing data. It extracts metrics nested deep within the API response structure, ensuring consistency.
Key Configuration: Maps fields like campaign_name, spend, and handles potential missing data by defaulting results to '0'.
Update Google Sheet (Google Sheets n8n node):
Function: Appends the structured daily data to a specified Google Sheet, providing a permanent data archive.
Key Configuration: Operation set to append. Columns are explicitly mapped to incoming n8n workflow fields (Date, Spend, Results, etc.).
Generate Email HTML (Code n8n node):
Function: Converts the item data generated by the n8n workflow into a clean HTML table format, ready for email transmission.
Key Configuration: Iterates through input items to construct HTML elements within a structured report body.
Send Email Report (Gmail n8n node):
Function: Sends the final, formatted HTML report to the recipient.
* Key Configuration: Uses the HTML output from the previous n8n node as the message body. Subject is static: 'Facebook Ads Report for Yesterday'.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by
Karan Kathuria
Karan Kathuria

Featured*