Create long-form documents from simple titles with GPT-5 and Google Docs
Ready for 3.0What this workflow does
This AI workflow has 13 nodes and runs when someone submits an n8n form (“Generate Long Content”). Along the way it connects Google Docs and OpenAI Chat Model.
How it runs
Trigger: When someone submits an n8n form (“Generate Long Content”).
- CreateDocument (Google Docs): uses Google Docs
- Form (n8n Form): shows the next form page
- ContentPlanner (AI Agent): runs an AI agent, with model: gpt-5-mini; output parser: Structured Output Parser
- GetSections (Edit Fields (Set)): sets 2 fields: sections, documentId
- Split Out: splits a list into separate items
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- ContentWriter (AI Agent): runs an AI agent, with model: gpt-; memory: Simple Memory
- UpdateDocument (Google Docs): update
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Split Out
n8n-nodes-base.splitOut - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Edit Fields (Set)
n8n-nodes-base.set - Google Docs
n8n-nodes-base.googleDocs - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - n8n Form Trigger
n8n-nodes-base.formTrigger - n8n Form
n8n-nodes-base.form
From the author
How It Works 1. Generate the document structure based on the provided title or short description. 2. Use prompt chaining to create detailed content for each section while maintaining consistent context. 3. Append the final content to a Google Document for…