Reporting is essential, but manual data entry is a waste of talent. Data without insights is just a spreadsheet, yet media buyers often spend so much time gathering the data that they have little energy left for the actual analysis. In this guide, I will break down a sophisticated n8n workflow that pulls data directly from the Meta Marketing API, analyzes it with AI, and automatically populates a Google Slides presentation—complete with graphs and video previews.
Watch the full technical walkthrough of this automation here:
The Concept: "One-Click" Reporting
The goal is simple: Press one button, and the workflow runs. It creates a copy of your standard reporting template, pulls the last month's data, generates charts in Google Sheets, writes insights using an LLM (like GPT-4 or Gemini), and pastes everything into the new slide deck. This covers performance overviews, cost-per-reach analysis, campaign breakdowns, and even creative reviews.
Note: This workflow is inspired by templates from platforms like Markifact. While templates are great, successful automation requires customizing the logic to match your agency's specific reporting style.
Step 1: The Setup & Triggers
The workflow starts with a Schedule Trigger (e.g., run on the 1st of every month). It then duplicates your master Google Slides template and a master Google Sheet (used for generating charts) to create fresh files for the current month. This ensures you never overwrite your templates.
We also use a Date & Time node to calculate the reporting period dynamically. If the workflow runs in December, it automatically knows to pull data from November 1st to November 30th.
Step 2: Pulling Data from Meta Marketing API
We use the HTTP Request Node to fetch data from Meta. Instead of downloading CSVs, we query the API directly for metrics like Reach, Spend, Impressions, and Clicks.
- Endpoint:
https://graph.facebook.com/v24.0/act_{AD_ACCOUNT_ID}/insights - Granularity: Monthly (to see trends over time).
- Token: You need a permanent System User Access Token to ensure the workflow doesn't break.
Since the API returns a massive amount of JSON data, we use a Code Node to filter and structure only the metrics we need for our specific slides.
Step 3: Generating Charts via Google Sheets
Google Slides doesn't generate charts natively; it reads them from Google Sheets. Our n8n workflow sends the cleaned Meta data into the newly created Google Sheet. The charts in that sheet automatically update based on the new numbers.
We then use the Google Slides API to "copy" that updated chart from the Sheet and "paste" it into the specific Slide ID in our presentation. This is how we automate the visual "Cost vs. Reach" analysis without taking a single screenshot.
Step 4: AI-Generated Insights
Numbers tell you what happened; insights tell you why. We pass the aggregated data (e.g., "Cost increased by 10%, Reach decreased by 5%") to an AI Agent with a specific prompt:
"You are a marketing analyst. Analyze the month-on-month trends. Focus on significant shifts in efficiency. Generate 3 concise bullet points."
The AI returns professional commentary, which n8n then inserts into the text placeholders (e.g., {{GS_analysis_text}}) in the Google Slide. This gets 80% of the analysis done, allowing the media buyer to just polish the final output.
Step 5: The "Creative Review" Slide (The Tricky Part)
The most impressive part of the report is the Creative Review, where we show the Top 6 performing ads. This is technically complex because we aren't just pasting text; we are embedding video previews.
Here is the logic:
- Get Top Ads: Query the API for ads sorted by Spend or ROAS.
- Get Creative ID: Retrieve the specific creative associated with that ad.
- Download Video: Use the source URL (which is short-lived) to download the MP4 file to n8n.
- Upload to Drive: Upload the file to a specific Google Drive folder to get a permanent ID.
- Insert Video: Use the Google Slides API
createVideorequest to place that Drive file onto the slide at specific X/Y coordinates.
This completely eliminates the manual work of finding the ad, recording a screencast, and dragging it into the deck.
Why Templates Aren't Enough
While this automation is powerful, "copy-pasting" a workflow often isn't enough. Every client cares about different metrics. An e-commerce brand cares about ROAS and Purchases; a lead-gen business cares about CPL and Lead Quality. Common mistakes in automation often stem from trying to force a rigid template onto a unique business process.
To truly benefit from this, you need to first standardize your own reporting logic, and then build the automation around it.
Conclusion
Automating your monthly reporting isn't about replacing media buyers; it's about freeing them from "screenshot hell" so they can focus on strategy. By leveraging n8n, you can turn a 4-hour task into a 5-minute review process.
Building this involves complex API handling, from managing Facebook Page Tokens to calculating X/Y coordinates on slides. If you want this efficiency without the headache of debugging JSON code, Osinity can help.
We build custom workflow automation solutions tailored to your agency's needs. With our risk-free 30-day validation period, we implement the system first, and you only pay when you see the time savings.
Ready to reclaim your first week of the month? Contact Osinity today.