Introduction

Creating captivating children’s stories paired with vibrant illustrations has traditionally required significant time, artistic skill, and resources. However, advances in artificial intelligence are transforming this creative process, making it accessible to anyone with an idea. By leveraging AI-powered tools, authors and creators can now effortlessly generate both engaging narratives and matching illustrations in minutes.

In this article, we explore a custom-built workflow using n8n automation combined with replicate.com’s ideogram-ai/ideogram-v2a-turbo model. This system allows users to input a simple one-liner prompt—such as “2 tomatoes become friends in garden”—and automatically produces a short children’s story along with a colorful illustration that brings the tale to life. This seamless integration of AI storytelling and image generation opens new possibilities for educators, parents, and aspiring authors to create personalized children’s books quickly and creatively.

What are we going to build

Feel free to create an account in n8n and launch your instance, or self-host your n8n in your infrastructure

Step 1 - Input Form

Let's start by adding our trigger node, which is on form submission, with the following settings

When the workflow starts, users should see a form like the following

Step 2 - Generate Story

Next, add a new node using OpenAI message a model and use GPT-4.1-Nano as the model with the following prompts

System Prompt

User Prompt

Step 3 - Save the Story in Google Docs

Add a new node to create a folder in your Google Drive

The folder title will be the story title generated by the OpenAI model.

Now, let's add a new document to the Folder to write an AI-generated story.

Now let's loop (batch of 1) over each paragraph of the generated story and write it to the doc

Step 4 - Generate the Prompt for Image

From the Create Folder node, add a new branch to generate an Image generation prompt using the OpenAI model, providing the story and asking the model to write a prompt to generate a children's illustration for that story. Add a new OpenAI message to a model node using GPT-4.1-NANO model

System Prompt

User Prompt

Step 5 - Generate the Image with Replicate

Now let's make an HTTP call to the replicate.com endpoint and generate an image using ideogram-ai/ideogram-v2a-turbo The model feeding prompt was generated in the previous step. Here are the details of the HTTP node

  • Method: POST
  • URL: https://api.replicate.com/v1/models/ideogram-ai/ideogram-v2a-turbo/predictions
  • Add a header for Authorization Bearer [your-replicate-api-key]
  • Add a header for Content-Type application/json
  • Add a header for Prefer wait

Check the Send Body flag and add the following as JSON to it

After this node, add another HTTP node to get the Binary file of the generated image, so we can use it to save in the Google Drive

Step 6 - Save the Image to Google Drive

Using the downloaded binary file to upload it to the Google Drive

Conclusion

By combining the power of AI-driven storytelling and illustration generation within an automated n8n workflow, creating personalized children’s books has become remarkably simple and efficient. This approach eliminates traditional barriers such as artistic skill and lengthy production times, enabling anyone—from educators and parents to aspiring authors—to bring their imaginative ideas to life with just a few clicks. Leveraging replicate.com’s ideogram-ai model ensures that each story is accompanied by vibrant, engaging illustrations that perfectly complement the narrative.

This seamless integration of AI tools not only accelerates the creative process but also opens new avenues for creativity and customization in children’s literature. As AI technology continues to advance, workflows like this will empower more people to craft unique stories that inspire and delight young readers everywhere. Whether you’re looking to create a one-off story or build a library of illustrated tales, this AI-powered workflow offers a scalable, accessible, and fun solution for modern storytelling.

Related Blogs

Looking to learn more about n8n and AI-Powered Children’s Illustrations? These related blog articles explore complementary topics, techniques, and strategies that can help you master AI-Powered Children’s Illustrations & Story Generator with n8n and Replicate API.

How to Build an AI Agent for Automated Financial Market Summaries Using n8n

Learn how to create a powerful AI agent that autonomously analyzes financial news and market data to deliver real-time, actionable market summaries. This step-by-step guide walks you through leveraging n8n’s low-code automation platform combined with AI models like GPT to build a smart financial assistant that senses, plans, acts, and learns — helping investors and traders make informed decisions faster.

Build an AI Agent for Airbnb Hosting with n8n

Learn how to create a powerful AI agent for Airbnb hosts using Telegram and n8n. Automate guest messaging, manage bookings, and streamline operations with AI-driven workflows—no coding required. Boost efficiency and guest satisfaction today!

How to Automate Reddit Data Extraction with n8n for Quality Content Ideas

Learn how to automate Reddit data extraction with n8n to pull and score high-quality posts for content ideas. This step-by-step guide shows you how to set up workflows that filter and sanitize Reddit posts using a custom scoring system, helping you generate valuable, targeted content inspiration effortlessly.