Multi-Agent AI Book Generation Pipeline with DALL-E and Cloud Storage - n8n Workflow

Automate complete book creation using a multi-agent n8n workflow. Generate detailed briefs, draft content with GPT, create covers with DALL-E, and archive professional PDFs to Google Drive.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content creators and authors seeking powerful n8n templates for rapid, structured book drafting.
Users exploring advanced multi-agent architecture and orchestration within an n8n workflow.
Businesses aiming to automate the creation of eBooks, guides, or course materials.
Developers needing a reference n8n workflow that integrates OpenAI, AWS S3, and Google Drive operations via various n8n node types.

Overview

This sophisticated n8n workflow is designed to automate the complex process of creating a finished book from a simple text prompt. It demonstrates a cutting-edge implementation of multi-agent systems within n8n, ensuring highly structured and repeatable results. The core of this n8n workflow utilizes specialized AI agents—a planner, a designer, and a writer—to handle everything from outlining and content generation (using GPT-4.1-mini) to cover image generation (using DALL-E). By integrating cloud services like AWS S3 for cover hosting and Google Drive for document formatting and final PDF archiving, this n8n template provides a robust, end-to-end publishing pipeline. This powerful n8n workflow eliminates manual steps and delivers a final, polished PDF ready for distribution.

How it Works

The n8n workflow operates in a phased manner, ensuring planning precedes execution:


  1. Initiation (n8n Trigger): The n8n workflow begins with the When chat message received n8n trigger, which captures the user's initial request for the book topic.

  2. Planning Phase: The Book Brief Agent n8n node processes the input and, using structured parsing, generates comprehensive briefs (book metadata, cover design, and writing instructions).

  3. Orchestration Phase: The central Book Writer Agent n8n node orchestrates two specialized sub-agents: the Designer Agent generates a specific DALL-E prompt for the cover, and the Content Writer Agent drafts the full manuscript in Markdown format.

  4. Cover Generation & Hosting: The generated cover prompt is fed to the Generate cover image n8n node (DALL-E). The resulting image is uploaded via the Upload to AWS S3 n8n node, creating a publicly accessible URL.

  5. Document Assembly: The Configure metadata n8n node sets important variables, and the Build book html Markdown n8n node converts the raw markdown content into formatted HTML, embedding the S3-hosted cover image URL.

  6. Google Drive Processing: A custom Upload to Google Drive n8n node (using the HTTP Request node) creates a new Google Document from the HTML content. The subsequent Convert document to PDF Google Drive n8n node automatically converts this temporary document into a PDF file.

  7. Archiving: The final step of the n8n workflow uses the Archive to Drive Folder Google Drive n8n node to securely save the professional PDF book in the designated archive location.

Installation Guide

To deploy this advanced n8n workflow, follow these steps:


  1. Import: Copy the provided n8n workflow JSON and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. OpenAI Credentials: Set up an OpenAI API Key credential for the four AI-related n8n node components (Agents and DALL-E).

  3. AWS S3 Credentials: Configure your AWS S3 credentials, pointing to a bucket where the cover images will be stored. Ensure the bucket policy allows public read access if you use the dynamic URL.

  4. Google Drive Credentials: Establish an OAuth2 connection for Google Drive, which is required for the document creation, conversion, and archiving n8n node steps.

  5. Customize Metadata: Open the Configure metadata n8n node and update the Drive Folder ID and S3BaseURL to match your cloud environment settings.

  6. Activate: Activate the n8n workflow and trigger it by sending a message to the associated chat endpoint.

Node Details

When chat message received (Langchain ChatTrigger): This crucial n8n trigger initiates the automation. It captures the user's text input to define the book subject.
Book Brief Agent (Langchain Agent): Uses GPT-4.1-mini to structure the project. Key configuration involves a precise system message to ensure the output is a single, clean planning JSON.
Designer Agent & Content Writer Agent (Langchain AgentTool): These specialized sub-agent n8n nodes receive detailed instructions (tool descriptions) to perform specific tasks, coordinated by the main Book Writer Agent.
Generate cover image (Langchain OpenAI n8n node): Configured to use DALL-E 2, it transforms the text prompt from the Designer Agent into a visual book cover file.
Upload to AWS S3 (AWS S3 n8n node): Responsible for file storage. The key configuration includes dynamically setting the file name based on the book title and applying publicRead ACL.
Build book html (Markdown n8n node): Converts the large string of markdown generated by the Content Writer Agent into HTML, which is required for Google Document creation.
Upload to Google Drive (HTTP Request n8n node): A technical n8n node using a multipart/related request to upload the HTML content and create a native Google Doc, specifying the parent folder using an expression referencing the Drive Folder ID set earlier in the n8n workflow.
Convert document to PDF (Google Drive n8n node): Downloads the Google Document using a conversion setting (docsToFormat: application/pdf), efficiently creating the final PDF document ready for archiving.


  • Archive to Drive Folder (Google Drive n8n node): The final file operation n8n node, saving the resulting PDF in a permanent archive location.

Related n8n Workflows

Free

Nodes: 12 Nodes
Updated: December 26 2025
View all
Created by

Empowering small and medium businesses with smart automation and practical AI, no big tech team required.

Featured*