Auto-generating Google Slides presentations with AI in n8n
Published 18 August 2026 · 6 min read
A well-built client report in n8n — SEO, Google Ads, compliance audit — almost always ends the same way: someone copies the numbers and commentary into a text document or an email, a format that rarely inspires confidence in a busy decision-maker. A presentation, even a short one, reads and sticks better than a wall of text. This guide builds the n8n workflow that automates that last mile: duplicating a Google Slides template, having an LLM write the copy, filling the placeholders through the API, and delivering the result as a PDF.
Why slides beat a text report
Automatically generating documents from data isn't a new problem, and natural-language-processing research documented its pitfalls well before today's LLMs arrived. Sam Wiseman, Stuart Shieber and Alexander Rush, in Challenges in Data-to-Document Generation (EMNLP 2017), show that generation models can produce fluent, well-formed text without staying faithful to the source data — text that reads well can still say anything at all. The lesson still holds with today's LLMs: the model must write from figures you hand it explicitly in the prompt, never invent them or recompute them from memory.
On the layout side, Yue Hu and Xiaojun Wan already laid out, in PPSGen: Learning-Based Presentation Slides Generation for Academic Papers (IEEE TKDE), the principle behind this workflow: automating content selection and placement saves considerable preparation time, provided the layout structure stays fixed rather than letting the system improvise a design. That's exactly the approach here: a Google Slides template designed once by hand, filled in automatically afterward.
Two complementary n8n building blocks, not one
n8n's native Google Slides node handles creating and reading a presentation, but not replacing text in existing placeholders. For that, you call the Google Slides API directly through the HTTP Request node, selecting Authentication → Predefined Credential Type → Google Slides OAuth2 API: n8n then manages the OAuth2 token exactly as it would for a native node, without you handling the authorization flow yourself. Setting up that credential follows the same steps as our Google OAuth2 setup guide for n8n.
Step 1 — Build the template with placeholders
In Google Slides, build the template presentation once and for all: layout, logo, brand colors, and at every variable spot a marker text between double curly braces — {{report_title}}, {{period}}, {{summary}}, {{kpi_1_value}}, {{kpi_1_comment}}. These are the markers the workflow will look up and replace; their uniqueness across the deck prevents any accidental replacement elsewhere.
Step 2 — Duplicate the template on every run
Never edit the template itself: a Google Drive node, Copy operation, duplicates the source file into a new one (see our n8n Google Drive guide for credential setup). The new file ID returned by this operation is the one the rest of the workflow manipulates — the original template stays untouched for the next run.
Step 3 — Have an LLM write the copy
The raw data (SEO rankings, ad spend, audit non-conformities…) flows into a Basic LLM Chain paired with a Structured Output Parser (see our structured output parser guide), with a schema matching the template's placeholders exactly:
{
"report_title": "string",
"period": "string",
"summary": "string, 2 sentences max",
"kpi_1_value": "string",
"kpi_1_comment": "string, 1 sentence"
}
The system prompt must be explicit about where the numbers come from: "Only use the values provided below, never recompute or invent any figure." That's the direct countermeasure to the risk documented by Wiseman, Shieber and Rush above — the model writes the commentary, never the underlying data. This simple-chain-over-autonomous-agent architecture follows the same principle as our AI-generated audit summary report: a deterministic task, describable in one sentence, is better handled by a constrained chain than a freely roaming agent.
Step 4 — Fill the placeholders via batchUpdate
A Code node turns the structured JSON into an array of replaceAllText requests, then an HTTP Request node sends them all in a single call:
const data = $input.first().json;
const requests = Object.entries(data).map(([key, value]) => ({
replaceAllText: {
containsText: { text: `{{${key}}}`, matchCase: true },
replaceText: String(value),
},
}));
return [{ json: { requests } }];
HTTP Request node configuration:
- Method:
POST - URL:
https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate - Authentication: Predefined Credential Type → Google Slides OAuth2 API
- Body (JSON):
{ "requests": {{ $json.requests }} }
A single call replaces every placeholder in one transaction — no per-field call, no risk of inconsistency if the run is interrupted midway.
Step 5 — Go further with dynamic charts
For a chart rather than a plain figure, swap a placeholder shape for an image generated on the fly: a replaceAllShapesWithImage request in the same batchUpdate call, with a URL pointing to a service like QuickChart, whose parameters (chart type, data, colors) are built dynamically from your data in the Code node. The result isn't editable inside Slides afterward, but it's fully reproducible from one run to the next.
Step 6 — Export and deliver
A final call to the Drive API (GET /files/{fileId}/export?mimeType=application/pdf, again via HTTP Request with the same credential) downloads the finished presentation as a PDF, ready to attach to an email or drop into a Slack channel. Schedule the trigger with a Schedule Trigger — our Schedule Trigger and time zones guide covers the pitfalls to avoid on a recurring send.
Concrete use cases for this workflow
- Weekly SEO report: feed the ranking changes computed in our weekly SEO report with Search Console guide into a three-slide template (summary, winners and losers, next actions).
- Google Ads / Meta Ads reporting: the AI-written commentary from AI-powered Google Ads and Meta Ads reporting becomes the opening slide's summary, with the remaining KPIs in a table.
- Compliance audit report: the structured JSON produced by the AI-generated audit summary report workflow — summary, non-conformities, action plan — maps directly onto an audit template's placeholders, replacing an email with a presentable deck for a review meeting. That's exactly the kind of extension the AI audit summary report workflow from the Compliance & Audit Pack (€149) already supports, being built around reusable structured output.
- GA4 report: the metrics computed in our Google Analytics 4 report with n8n guide feed a monthly summary slide with no manual re-entry.
Limitations worth knowing
- Layout stays rigid:
replaceAllTextreplaces text inside an existing shape, it doesn't reflow the layout; text that's too long will visibly overflow the template. Bound field length in the Structured Output Parser schema ("2 sentences max", for instance). - One template per report format: unlike a dynamically generated HTML email, a Slides template is designed ahead of time for a fixed number of slides and placeholders. Changing the report's structure means building a new template, not just tweaking the prompt.
- The Slides API quota is real but generous: the Google Slides API's default quotas comfortably cover periodic reporting (daily, weekly); they only become worth watching for bulk generation (dozens of presentations within a few minutes).
Setup checklist
- Google Slides template built once, with unique
{{...}}placeholders across the deck. - Google Slides OAuth2 API credential configured, usable by both the native Slides node and the HTTP Request node.
- Template duplicated via Google Drive on every run, never editing the source file.
- Structured Output Parser schema matching the template's placeholders exactly, with explicit length constraints.
- A single
batchUpdatecall bundling everyreplaceAllTextrequest. - PDF export and delivery scheduled through a Schedule Trigger.
The principle that makes this workflow reliable is the same one running through every AI reporting guide on this blog: the model writes, it doesn't calculate, and the layout stays driven by a stable template rather than an agent's improvisation. Once that foundation is in place, wiring any existing report — SEO, Ads, audit — into a Slides output becomes a matter of placeholders, not a new architecture.
FAQ
Frequently asked questions
Is n8n's native Google Slides node enough on its own?
Not by itself. The native node covers creating and reading a presentation, but not replacing text inside existing placeholders: that operation goes through the presentations.batchUpdate endpoint of the Google Slides API, reached via the HTTP Request node with the predefined credential type "Google Slides OAuth2 API". The native node and HTTP Request complement each other rather than replace one another.
Can dynamically generated charts be inserted into the slides?
Yes, as an image rather than a native editable Google Slides chart: a replaceAllShapesWithImage request in the same batchUpdate call swaps a placeholder shape for an image whose URL points to an on-the-fly chart service (QuickChart, for example) fed by your own data. It's less flexible than a native chart, but fully scriptable.
How much does the AI-written text for a presentation cost?
The copy for a report (ten to twenty placeholders, a few sentences each) is a short prompt: on the order of a few cents per presentation with an economical model like gpt-4o-mini or Claude Haiku. The dominant cost is the one-time effort of building the template, not the recurring runs.
Bundle FlowKit Complet
€269