Google Sheets + PDF.co: client-ready spend PDFs
Reporting shouldn’t feel like rebuilding the same document every week. But if you’re copying spend rows out of Google Sheets, totalling them by hand, and trying to make the final PDF look “client-ready,” you already know how easy it is to miss a row or paste the wrong total.
Marketing managers get the “can you send this today?” message. Agency owners feel it when every client wants a slightly different view. And a solo consultant doesn’t have time to play designer. This Sheets PDF reports automation turns raw spend rows into a consistent report you can share without second-guessing it.
You’ll set up an n8n workflow that pulls your sheet, aggregates spend by channel, asks AI to write a plain-English summary, then renders a polished PDF via PDF.co using your own HTML template.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Google Sheets + PDF.co: client-ready spend PDFs
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n1@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n2@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Get Marketing Data", pos: "b", h: 48 }
n4@{ icon: "mdi:cog", form: "rounded", label: "Sum Spend by Channel", pos: "b", h: 48 }
n5@{ icon: "mdi:cog", form: "rounded", label: "Sum Spend", pos: "b", h: 48 }
n6@{ icon: "mdi:robot", form: "rounded", label: "Write Summary", pos: "b", h: 48 }
n7["<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/merge.svg' width='40' height='40' /></div><br/>Combine All"]
n8["<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/>Convert to PDF Upload"]
n9@{ icon: "mdi:web", form: "rounded", label: "Create PDF", pos: "b", h: 48 }
n10@{ icon: "mdi:cog", form: "rounded", label: "Covert to 1 row", pos: "b", h: 48 }
n5 --> n7
n7 --> n8
n6 --> n7
n10 --> n7
n10 --> n6
n1 -.-> n6
n3 --> n5
n3 --> n4
n4 --> n10
n8 --> n9
n2 -.-> n6
n0 --> n3
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 n0 trigger
class n2,n6 ai
class n1 aiModel
class n3 database
class n9 api
class n8 code
classDef customIcon fill:none,stroke:none
class n7,n8 customIcon
Why This Matters: Client Reporting Gets Messy Fast
Spend reporting sounds simple until you do it under pressure. You start with a Google Sheet that’s “mostly clean,” then you realize channels are named three different ways, totals don’t match, and you’re formatting a PDF five minutes before a call. The worst part is the mental load. You’re not thinking about insights or next actions. You’re scanning rows, hunting for mistakes, and praying you didn’t forget to update one number in the final document. It’s busywork that looks important because it ends in a pretty file.
The friction compounds. Here’s where it usually breaks down.
- Copying and pasting spend totals invites small errors that are hard to spot once they’re inside a formatted report.
- When channels change (new campaign, new platform), your “template” stops matching the data and you’re back to manual fixes.
- Updates take longer than they should, so you delay sending the report and lose momentum with the client.
- Your reporting style drifts over time, which means the client sees inconsistent PDFs from week to week.
What You’ll Build: Google Sheets Data → Branded PDF Report
This workflow turns your marketing spend sheet into a shareable PDF in one run. It starts by pulling rows from a Google Sheet (the same place your team already updates daily spend). From there, n8n aggregates totals and calculates spend by channel so you don’t have to create and maintain fragile formulas across tabs. Next, an OpenAI-powered agent writes a short narrative summary based on the numbers, so your report doesn’t read like a spreadsheet export. Finally, the workflow reshapes everything into the exact fields your PDF.co HTML template expects and renders a polished PDF you can send to a client or drop into Drive.
The workflow begins with a manual run (great for “send it now” moments), then it moves through summarization and AI copy, and it finishes by generating a PDF via PDF.co. The end result is a consistent, on-brand document built from fresh sheet data.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you send one spend report per week for 5 clients. Manually, you might spend about 20 minutes pulling and totaling Google Sheets data plus another 25 minutes formatting a “nice looking” PDF, so roughly 45 minutes per client (close to 4 hours weekly). With this workflow, you update the sheet as usual, run the automation, then spend maybe 5 minutes sanity-checking the PDF and adding a quick note. That’s about 3 hours back most weeks, without changing your reporting cadence.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for storing your spend rows
- PDF.co to render your HTML template into a PDF
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Beginner. You’ll connect accounts, paste a template ID, and tweak a few fields.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
You trigger the report when you need it. The workflow uses a manual start, which is ideal for client requests that land mid-day or right before a meeting.
Google Sheets data gets pulled into n8n. The workflow reads your spend rows from the selected spreadsheet and worksheet, so the report always reflects the latest updates your team made.
Your spend is summarized and turned into a narrative. n8n aggregates totals and spend-by-channel, then an AI agent (powered by an OpenAI chat model) writes a short summary that’s easier to understand than raw tables.
A PDF is generated from your template. The workflow packages totals, line items, and summary text into the right shape and sends it to PDF.co to render a finished PDF report.
You can easily modify the sheet filters to generate per-client or per-campaign PDFs based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
This workflow starts on demand and pulls marketing spend data when you manually run it.
- Add the Manual Execution Start node as your trigger.
- Connect Manual Execution Start to Fetch Marketing Sheet.
- Keep the Flowpast Branding sticky note as a reference block (optional, no configuration needed).
Step 2: Connect Google Sheets
Pull the marketing spend dataset from your Google Sheet to feed the spend calculations.
- Add the Fetch Marketing Sheet node and set Document to
[YOUR_ID]. - Set Sheet Name to
[YOUR_ID](cached name:Data). - Credential Required: Connect your
googleSheetsOAuth2Apicredentials. - Note the parallel flow: Fetch Marketing Sheet outputs to both Compute Total Spend and Aggregate Channel Spend in parallel.
Step 3: Set Up Spend Aggregations
Summarize spend totals and channel breakdowns before generating the report.
- In Compute Total Spend, set Fields To Summarize to sum
Spend ($). - In Aggregate Channel Spend, set Fields To Split By to
Channeland summarizeSpend ($)with aggregationsum. - Connect Aggregate Channel Spend to Collapse to Single Row with Aggregate set to
aggregateAllItemData. - Note the parallel flow: Collapse to Single Row outputs to both Merge All Results and Generate Summary Text in parallel.
- Connect Compute Total Spend to Merge All Results.
Step 4: Set Up AI Summary Generation
Generate a concise narrative summary of the aggregated spend data using the AI agent.
- In Generate Summary Text, set Text to
={{ $json.data }}. - Keep Prompt Type set to
defineand confirm Has Output Parser is enabled. - Use Structured Output Reader with JSON Schema Example set to
{ "summary": "summary" }. - Connect OpenAI Chat Engine as the language model to Generate Summary Text.
- Credential Required: Connect your
openAiApicredentials to OpenAI Chat Engine. - AI tool note: Structured Output Reader is a sub-node; add credentials to the parent OpenAI Chat Engine, not the parser.
Step 5: Configure PDF Payload and Rendering
Combine results and format the final dataset for PDF generation.
- In Merge All Results, set Mode to
combine, Combine By tocombineByPosition, and Number Inputs to3. - In Prepare PDF Payload, keep the provided JavaScript Code as-is to format totals, channels, and summary.
- In Render PDF Report, set Operation to
URL/HTML to PDF, Convert Type tohtmlTemplateToPDF, and Template ID to[YOUR_ID]. - Set Template Data to
={{ JSON.stringify($json) }}. - Credential Required: Connect your
pdfcoApicredentials to Render PDF Report.
totalSpendFmt, channels, and summary to match the output of Prepare PDF Payload.Step 6: Test & Activate Your Workflow
Run a manual test to confirm the data flow, summary generation, and PDF rendering.
- Click Execute Workflow to run Manual Execution Start and trigger the full chain.
- Verify that Compute Total Spend outputs a sum for
Spend ($)and Aggregate Channel Spend outputs per-channel totals. - Confirm Generate Summary Text returns a JSON object containing
summaryand that Merge All Results combines three inputs. - Check Render PDF Report for a successful PDF response from PDF.co.
- When satisfied, switch the workflow to Active for production use.
Troubleshooting Tips
- Google Sheets credentials can expire or need specific permissions. If things break, check n8n → Credentials → Google Sheets and re-authenticate the account that owns the spreadsheet first.
- PDF.co requests can fail if the template ID is wrong or the API key is missing access. Open your PDF.co dashboard, confirm the HTML-to-PDF template exists, then copy the Template ID into the Render PDF Report node.
- Default prompts in AI nodes are generic. Add your reporting tone (“direct, client-friendly, no hype”) inside the Generate Summary Text step or you will be editing outputs forever.
Quick Answers
About 30 minutes if your sheet and PDF.co account are ready.
No. You’ll mostly connect accounts and paste in your PDF.co template ID. There is a Code node in the workflow, but it’s already built for you.
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 (often just a few cents per report) and PDF.co usage based on how many PDFs you generate.
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, and you should. Most people start by filtering the Google Sheets pull to a single client, date range, or campaign, then adjusting the AI summary instructions in Generate Summary Text. You can also swap the PDF.co template to match different clients without touching the aggregation logic, as long as the Prepare PDF Payload step maps fields your template expects.
Usually it’s an expired OAuth session or the connected Google account doesn’t have access to that spreadsheet. Reconnect the Google Sheets credential in n8n, then confirm the Spreadsheet ID and worksheet name match exactly. Also check that your sheet still has data in the expected rows; empty pulls can look like “it’s broken” when it’s really “no rows returned.”
For most small teams, it handles weekly and daily reporting without drama. On n8n Cloud, your limit is mainly your monthly executions, and each report run is typically one execution. If you self-host, there’s no execution cap, so capacity comes down to your server and API rate limits from Google Sheets, OpenAI, and PDF.co.
Often, yes, because this workflow mixes summarization, AI text generation, and a custom PDF rendering step in one place. n8n is comfortable with multi-step logic and data shaping, so you can merge totals, channel breakdowns, and narrative text without awkward workarounds. Zapier and Make can do parts of it, but you may find yourself paying more once you add branching, formatting steps, and higher task volume. The bigger win is control: you can self-host, keep costs predictable, and customize the payload for your exact PDF template. If you’re unsure, Talk to an automation expert and we’ll point you to the simplest option for your setup.
Once this is running, reporting becomes a button click and a quick review. The workflow handles the repetitive stuff, and you get to focus on what the spend actually means.
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.