Create custom PDF documents from templates with Gemini & Google Drive
Ready for 3.0What this workflow does
This AI workflow has 30 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Google Gemini Chat Model, HTTP Request, Postgres Chat Memory and Google Drive. It also calls script.google.com and googleapis.com over HTTP.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- DocAgent (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; 2 tools (DocProcess, GetMetaData); memory: Postgres Chat Memory
- User Choice Match Check (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model; output parser: Structured Output Parser
- If: checks a condition and branches into true / false
- User Choice Match Correct (Edit Fields (Set)): sets 1 field: output.user_choice_id
- User Choice Matching Error (Edit Fields (Set)): sets 1 field: pdf_id
- GetMetaData (HTTP Request): calls script.google.com
- Edit Fields (Edit Fields (Set)): sets or maps fields
- Format Control (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model
- Formatting Correction (Code): runs custom JavaScript code
- CopyTemplate (Google Drive): copy
…plus 11 more steps. See the full node list below.
Services it uses
Other Google Gemini + Google Drive templates (272) · Other Google Drive + PostgreSQL templates (65) · Other Google Gemini + PostgreSQL templates (47)
HTTP calls to: script.google.com, googleapis.com
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 (15)
- Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Http Request Tool
n8n-nodes-base.httpRequestTool - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - HTTP Request
n8n-nodes-base.httpRequest - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - If
n8n-nodes-base.if - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Google Drive
n8n-nodes-base.googleDrive - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Code
n8n-nodes-base.code
From the author
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. 1 — What Does It Do / Which Problem Does It Solve? This workflow turns Google Docs-based contract & form templates into ready-to-sign PDFs in minutes—all from…