Slide Generator AI
You spend hours copying bullet points into PowerPoint, then tweaking fonts and alignments, only to realize the deck still looks generic. After reading this, you’ll have a working slide generator AI that takes a plain‑text outline and outputs a polished PowerPoint file, ready to send or present.
How do you keep the AI from hallucinating slide titles?
One of the first things you’ll notice when you hook a language model to a slide generator is that it loves to invent titles that never existed in your outline. I ran a test with a simple three‑point outline and got back a deck with seven slides, two of them titled “Future Vision” and “Synergy Blueprint”. The fix is simple: give the model a strict JSON schema and ask it to return only the fields you need.
Here’s the prompt I use, broken into two parts. First, the system message sets the role and constraints. Second, the user message supplies the outline and asks for a JSON array of slide objects.
{
"system": "You are a slide planner. Output ONLY a JSON array where each object has "title" and "bullets" (array of strings). No extra text, no explanations.",
"user": "Outline: \n- Market size growing 12% YoY\n- Competitor A lacks mobile app\n- Our solution: real‑time analytics dashboard\nReturn JSON array."
}
When the model follows the schema, you get exactly what you asked for. If it still adds extra fields, you can strip them in a tiny post‑processing step with JavaScript or Python.
What most guides get wrong
Most tutorials treat the slide generator as a magic black box: feed it a prompt, get a PPTX, and call it a day. They skip the part where you have to map the AI’s output to actual slide placeholders. In Google Slides, for example, each layout has named placeholders like “TITLE” and “BODY”. If you just shove raw text into the first placeholder, you end up with misaligned text boxes and missing images.
The real work is in the transformation layer. You take the JSON from the model, match each slide to a layout, then populate the placeholders via the API. This step is where most DIY attempts break, and it’s also where you can add branding—like inserting your logo into the footer placeholder automatically.
Concrete named example: building the pipeline with Make, GPT-4, and Google Slides API
Let’s walk through a real‑world build that costs under $30 per month and runs on a free tier of Make.com(formerly Integromat). First, you create a scenario that triggers when a new row appears in a Google Sheet. The sheet holds your outline in column A.
Next, add an HTTP module that calls the OpenAI Chat Completions endpoint. Use the system and user messages from the earlier prompt, set temperature to 0.2 for consistency, and limit max tokens to 800. The response is parsed with a JSON module; if parsing fails, the scenario routes to an error handler that logs the raw output.
After you have the slide JSON, you iterate over each object. For each slide, you call the Google Slides API to duplicate a base template, then batch‑update the placeholders. The base template should have a master slide with your brand colors and a footer placeholder named “LOGO”. The update request looks like this:
{
"requests": [
{
"insertText": {
"objectId": "TITLE_placeholder_id",
"text": "{{slide.title}}"
}
},
{
"insertText": {
"objectId": "BODY_placeholder_id",
"text": "{{slide.bullets.join('\n')}}"
}
}
]
}
Finally, you export the slide deck as a PPTX using the Drive API’s export link and email it to yourself via Gmail. The whole scenario runs in under two minutes for a ten‑slide deck.
