Conversational Reporting for Meta Ads using AI - n8n Workflow

Build a powerful conversational Meta Ads reporting tool using this advanced n8n workflow. Integrate GPT-4.1 to analyze real-time campaign data and deliver instant summaries.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Digital Marketing Agencies needing instant client performance summaries.
Growth Managers seeking a natural language interface for ad account monitoring.
Developers looking for advanced n8n templates integrating LangChain agents with third-party APIs.
Data Analysts requiring quick access to Facebook Graph API data via a simple chat interface.

Overview

Managing and reporting on Meta (Facebook) advertising campaigns can be time-consuming, requiring manual navigation through dashboards. This powerful n8n workflow solves this by creating a conversational interface. By using the AI Agent feature in n8n, users can simply ask questions (e.g., 'What was the spend on ad account XYZ last month?'). The core value of this n8n workflow lies in its ability to parse complex natural language requests, execute defined tools (which are internal n8n workflows themselves), pull detailed data from the Facebook Graph API using specific n8n node configurations, and synthesize the results back into an easy-to-understand conversational response. This solution elevates standard n8n automation by incorporating complex AI reasoning and decision-making.

How it Works

The entire process is initiated by a specialized n8n trigger designed for chat interfaces.


  1. Trigger and Initialization: The workflow starts with the When chat message received n8n trigger. This feeds the user's message directly to the AI Agent.

  2. AI Orchestration: The AI Agent node, configured with the OpenAI Chat Model (GPT-4.1) and supported by Simple Memory for conversation context, analyzes the request.

  3. Tool Selection: Based on the user's query, the AI Agent decides which Tool Workflow to use: list accounts (if the user wants to see available accounts) or account details (if the user requests performance data for a specific account and date range).

  4. Internal Tool Execution: When a tool is invoked, the request lands on the When Executed by Another Workflow n8n trigger, which acts as the execution endpoint for the tools.

  5. Command Routing: A Switch n8n node directs the flow based on the incoming command (list_accounts or account).

  6. Data Retrieval (List Accounts): If listing accounts, a Facebook Graph API n8n node fetches the available ad accounts.

  7. Data Retrieval (Account Details): If fetching account details, parameters (id, since, until) are standardized using the Edit Fields1 n8n node. This leads to four parallel calls using the Facebook Graph API n8n node to retrieve Campaigns, Ad Sets, Ads, and Account Insights.

  8. Data Consolidation: A Merge n8n node collects the results from the four parallel branches. The final Code n8n node structures the combined data into a clean JSON object.

  9. Response Generation: This structured JSON data is returned to the AI Agent, which uses GPT-4.1 to generate a concise, conversational summary for the user.

Installation Guide

To deploy this n8n workflow, follow these steps:


  1. Import: Copy the provided n8n workflow JSON and import it into your n8n instance.

  2. OpenAI Credentials: Set up credentials for the OpenAI Chat Model n8n node, ensuring you have access to gpt-4.1 or equivalent.

  3. Meta Ads Credentials: Configure the Facebook Graph account credentials used by the facebookGraphApi n8n node instances. This requires a Facebook App and appropriate permissions for reading Meta Ads data.

  4. LangChain Configuration: Ensure your n8n instance has the @n8n/n8n-nodes-langchain package installed, as this n8n workflow relies heavily on these specialized n8n node types.

  5. Tool Workflow Linkage: Note that the Tool Workflow nodes reference a specific internal n8n workflow ID (UXdblREvbkvy3WSs). If you imported this as a template, you may need to update the workflowId parameter in the list accounts and account details n8n node instances to point to the correct ID of the Meta Ads data retrieval logic, ensuring the entire n8n template functions correctly.

  6. Activation: Activate the When chat message received n8n trigger to enable external conversational interaction.

Node Details

This advanced n8n workflow utilizes a complex array of nodes:

When chat message received (n8n trigger): The entry point for the conversational flow. It listens for incoming chat messages to start the process.
AI Agent (LangChain Agent): The central decision-maker. It utilizes memory, a language model, and defined tools to fulfill user requests based on the underlying n8n workflow.
OpenAI Chat Model (n8n node): Configured to use the high-performance gpt-4.1 model for superior reasoning and data summarization.
Simple Memory (LangChain Memory): Maintains context across multiple chat messages, enabling follow-up questions within the same n8n workflow session.
Tool Workflow (n8n node): Used twice (list accounts and account details). These nodes instruct the AI Agent on how to call the internal data retrieval logic by executing a separate, specified n8n workflow ID (the one started by the When Executed by Another Workflow n8n trigger).
When Executed by Another Workflow (n8n trigger): The entry point for the Meta Ads data tool, allowing the AI Agent to programmatically invoke the data retrieval sub-process.
Switch (n8n node): Routes the execution based on the command input received from the tool execution (listaccounts or account).
Facebook Graph API (n8n node): Used five times to interact directly with Meta Ads:
graph: adaccounts: Retrieves a list of available ad accounts.
account: campaigns, account: adsets, account: ads: Retrieves operational data for the specified account.
account: ads1: Fetches account insights (metrics like spend, CTR, etc.) based on the dynamic timerange provided by the AI and configured in this n8n node.
Code (n8n node): Final consolidation step, combining the parallel outputs of campaigns, adsets, ads, and insights into a single, comprehensive object for the AI Agent to summarize.

Related n8n Workflows

Free

Nodes: 12 Nodes
Updated: December 26 2025
View all
Created by
Konrad Roziewski
Konrad Roziewski

Using self-hosted n8n since 2022. Specializing in AI, ETL, marketing and product management workflows.

Featured*