Facebook Ads to Gmail, client-ready PDF reports
Weekly Facebook Ads reporting has a special talent for eating your Monday morning. You pull numbers, clean them up, build a narrative, export a PDF, send it, then get the “can you resend with last week included?” email.
This hits agency account managers hardest, honestly. But performance marketers running multiple ad accounts and small business owners who still do “quick” reports in spreadsheets feel it too. Facebook Ads reports automation turns that repeating scramble into a consistent, client-ready PDF that lands in Gmail on schedule.
Below you’ll see exactly how the workflow pulls last week’s metrics, summarizes results with AI, generates a polished PDF, and emails it out without you babysitting the process.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Facebook Ads to Gmail, client-ready PDF reports
flowchart LR
subgraph sg0["Weekly Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Format Data"]
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch FB Data"]
n2@{ icon: "mdi:play-circle", form: "rounded", label: "Weekly Trigger", pos: "b", h: 48 }
n3@{ icon: "mdi:cog", form: "rounded", label: "Merge Reports", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Generate PDF"]
n5@{ icon: "mdi:message-outline", form: "rounded", label: "Send Email", pos: "b", h: 48 }
n6@{ icon: "mdi:robot", form: "rounded", label: "AI Report Writer", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Node", pos: "b", h: 48 }
n8@{ icon: "mdi:brain", form: "rounded", label: "OpenAI", pos: "b", h: 48 }
n9@{ icon: "mdi:robot", form: "rounded", label: "AI Summarizer", pos: "b", h: 48 }
n8 -.-> n9
n7 --> n4
n0 --> n9
n4 --> n5
n9 --> n3
n1 --> n0
n3 --> n6
n2 --> n1
n6 --> n7
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n2 trigger
class n6,n9 ai
class n8 aiModel
class n1,n4 api
class n0 code
classDef customIcon fill:none,stroke:none
class n0,n1,n4 customIcon
The Problem: Weekly Facebook reporting is fragile
Manual weekly reporting sounds manageable until you’re doing it for several accounts, several campaigns, and several stakeholders. You export Facebook metrics, then notice naming is inconsistent, dates don’t match, and one campaign has “—” where you expected numbers. Now you’re cleaning data instead of interpreting it. The worst part is the context switching: dashboard to spreadsheet to doc to PDF tool to email, then back again for revisions. Every handoff is a chance for mistakes, and clients spot mistakes fast.
The friction compounds. Here’s where it usually breaks down.
- You spend about 2 hours gathering and formatting metrics before you even write insights.
- Copy-paste errors creep in, so you double-check everything and still miss something.
- Clients get inconsistent reports when different people “write it their way.”
- Approvals slow down because the report doesn’t clearly answer “what changed and what do we do next?”
The Solution: Automatically generate and email a weekly PDF report
This n8n workflow runs every Monday and builds a ready-to-share Facebook Ads performance report for the previous week. It starts by pulling campaign metrics from the Facebook Graph API, then cleans and normalizes those metrics so the AI isn’t guessing what a field means. Next, an OpenAI-powered agent summarizes each campaign’s performance in plain language, including what worked, what didn’t, and what to test next week. Those campaign summaries get consolidated into one cohesive narrative. Finally, the workflow converts the finished report into a polished PDF using your preferred PDF generation API, and sends it to the client through Gmail.
The workflow starts with a weekly schedule trigger. It fetches Facebook Insights, standardizes the numbers, and uses OpenAI to create campaign-by-campaign insights plus a combined executive summary. Then it maps the content into HTML, generates the PDF, and emails it out.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you manage 6 Facebook ad accounts and send one weekly report per account. Manually, even a “simple” loop of pulling metrics (about 20 minutes), writing a summary (about 20 minutes), and exporting/sending (about 10 minutes) is roughly 50 minutes per account, or about 5 hours every Monday. With this workflow, you spend maybe 10 minutes total scanning the PDFs before they go out, while n8n handles the pulling, summarizing, and sending in the background. That’s basically your morning back.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Facebook Graph API for pulling weekly campaign metrics.
- OpenAI to summarize performance and write insights.
- PDF generation API key (get it from your provider like PDFCrowd or Placid).
Skill level: Intermediate. You will connect accounts, paste API keys, and tweak a few fields (like client email and date range).
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Weekly trigger runs on Monday. The workflow starts from a scheduled trigger so reporting happens even if you’re in meetings all morning.
Facebook metrics are pulled and cleaned. n8n requests the previous week’s Insights from the Facebook Graph API, then “Normalize Metrics” standardizes the output so each campaign is comparable.
OpenAI generates campaign insights and recommendations. The agent reviews each campaign’s metrics and creates plain-language notes you can actually send to a client, then the summaries are aggregated into one unified report narrative.
The report becomes a PDF and gets emailed. The narrative is mapped into HTML, passed to your PDF generation service, and the final PDF is sent through Gmail to your chosen recipients.
You can easily modify the reporting schedule to a different day based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Scheduled Trigger
This workflow starts on a weekly schedule and initiates the data pull from Facebook Insights.
- Add and open Scheduled Weekly Start.
- Set the weekly rule: Field to
weeks, triggerAtDay to1, triggerAtHour to8, and triggerAtMinute to30. - Confirm the node connects to Retrieve Facebook Insights to start the data fetch.
Step 2: Connect Facebook Insights Data Source
This step pulls campaign metrics from Facebook’s API and prepares them for normalization.
- Open Retrieve Facebook Insights and set URL to
https://graph.facebook.com/v20.0/act_[YOUR_ID]/insights?fields=campaign_name,impressions,clicks,spend,actions&date_preset=last_7d&access_token=[CONFIGURE_YOUR_TOKEN]. - Enable Send Headers and add a header parameter with name
Authand value[CONFIGURE_YOUR_TOKEN]. - Connect Retrieve Facebook Insights to Normalize Metrics.
⚠️ Common Pitfall: The Facebook token in the URL and header must be valid and not expired, or the request will fail.
Step 3: Set Up Metric Normalization and Campaign Analysis
This section standardizes the Facebook response and generates a per-campaign summary using an AI agent.
- In Normalize Metrics, keep the JavaScript Code as provided to flatten action types and convert metrics to numbers.
- Open Campaign Insight Agent and set Text to
=Here is Detail TO analyze Campaign_name: {{ $json.campaign_name }} Impressions: {{ $json.impressions }} clicks: {{ $json.clicks }} spend: {{ $json.spend }} date_start :{{ $json.date_start }} date_END {{ $json.date_stop }} Purchase:{{ $json.purchase }} link_click: {{ $json.link_click }}. - Ensure Campaign Insight Agent receives input from Normalize Metrics and outputs to Consolidate Summaries.
- Open Language Model Connector and select the model
gpt-4.1-mini.
Credential Required: Connect your OpenAI credentials in Language Model Connector. This node supplies the model used by Campaign Insight Agent, so credentials must be added on the parent connector, not the agent.
Step 4: Generate the HTML Report Narrative
The consolidated summaries are turned into a full HTML report using a separate AI prompt.
- Open Consolidate Summaries and keep Fields to Aggregate set to
output. - Configure Compose Report Narrative with model
gpt-4.1-miniand message content=Summary of All Compaigns: {{ $json.output }}plus the provided system prompt. - In Map HTML Output, add an assignment named
htmlwith value={{ $json["message"]["content"] }}. - Confirm the execution order: Consolidate Summaries → Compose Report Narrative → Map HTML Output.
Credential Required: Connect your OpenAI credentials in Compose Report Narrative.
Step 5: Configure PDF Creation and Email Delivery
This section converts HTML to a PDF and sends the report via Gmail.
- Open Create PDF Report and set URL to
https://api.pdfcrowd.com/convert/24.04with MethodPOSTand Content Typeform-urlencoded. - Add the body parameters: content_viewport_width =
balancedand text =={{ $json.html }}. - Set the header parameter authorization to
Basic [CONFIGURE_YOUR_API_KEY]. - In the response options, keep Output Property Name as
Facebook_Ads_Report_Week_of_Aug_12_2025.pdfto store the file binary. - Open Dispatch Email Notice, confirm Subject is
Weekly Facebook Ads Report | Aug 12 – Aug 18, 2025, and attach the binary propertyFacebook_Ads_Report_Week_of_Aug_12_2025.pdf.
Credential Required: Connect your Gmail OAuth2 credentials in Dispatch Email Notice.
Step 6: Test and Activate Your Workflow
Validate the full report flow, from data retrieval to email delivery.
- Click Execute Workflow to run the flow manually from Scheduled Weekly Start.
- Verify that Create PDF Report outputs a file named
Facebook_Ads_Report_Week_of_Aug_12_2025.pdfand that Dispatch Email Notice sends the email with the attachment. - Check the HTML content in Map HTML Output to confirm it begins with
<!DOCTYPE html>and includes campaign sections. - When satisfied, toggle the workflow to Active to enable weekly scheduling.
Common Gotchas
- Facebook Graph API credentials can expire or lose permissions after password changes. If things break, check your token status in the Meta Developers dashboard first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Gmail can block sending if you’re using the wrong auth method or the account has extra security checks. If emails don’t send, review the connected Gmail credential in n8n and confirm the sender account can send attachments.
Frequently Asked Questions
About 30 minutes if your API keys are ready.
No. You’ll connect accounts, paste keys, and edit a few fields like recipient email and date range.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs and your PDF generation API pricing.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but plan it upfront. You can swap the HTML layout in the “Map HTML Output” node, then keep the rest of the workflow the same. Common changes include adding ROAS/CPC, grouping by ad set instead of campaign, and inserting a branded cover page before the insights section.
Usually it’s an expired Facebook Graph API access token or missing permissions for Insights. Regenerate the token in Meta Developers, then update the credential in n8n. If it works sometimes and fails other times, you may be hitting rate limits when pulling lots of campaigns at once, so reduce the date range or stagger requests.
A lot, as long as your API limits and n8n plan can keep up. On n8n Cloud, your execution limit depends on the plan you choose, so high-volume agencies usually move up a tier. If you self-host, there’s no execution cap, but your server still has to process the workload and your Facebook/OpenAI/PDF APIs still have their own limits. Practically, most teams start with a handful of accounts, watch execution time on Mondays, then scale from there.
Often, yes. This workflow benefits from multi-step logic, cleanup, AI summarization, and a PDF generation call, which is where n8n tends to feel more flexible (and cheaper at scale if you self-host). Zapier or Make can still work if you want a very simple “pull metrics, send email” flow. If you’re unsure, Talk to an automation expert and we’ll map the cheapest option that won’t fall apart later.
Once this is running, Monday reporting becomes a quick review instead of a recurring fire drill. The workflow handles the repetitive parts so you can spend your time on decisions, not formatting.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.