Skip to main content

Create fillable document templates from PDF or DOCX with GPT-4o and Google Drive

Workflow preview

Workflow preview
100%
Create fillable document templates from PDF or DOCX with GPT-4o and Google Drive preview
Open on n8n.io

1. Workflow Overview

Template Creator How it works This workflow accepts any uploaded document (PDF or DOCX) via webhook and automatically converts it into a reusable fill in the blank template. Step 1 β€” Identify: GP...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.switch, n8n-nodes-word2text.word2text, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by AI Solutions.

Original n8n.io source

1.1 Workflow description

Title
Create fillable document templates from PDF or DOCX with GPT-4o and Google Drive
Workflow name
Create fillable document templates from PDF or DOCX with GPT-4o and Google Drive

πŸ“„Template Creator

How it works

This workflow accepts any uploaded document (PDF or DOCX) via webhook and automatically converts it into a reusable fill-in-the-blank template.

Step 1 β€” Identify: GPT-4o first reads the document and determines the document type (e.g., Employment Contract, Invoice, NDA, Lease Agreement, Project Proposal) and the specific variable fields that type of document typically contains.

Step 2 β€” Templatize: A second AI pass uses the identified document type and field list to replace all variable content with clearly labeled [BRACKET] placeholders while preserving all static boilerplate and structure verbatim.

Step 3 β€” Deliver: The cleaned template is rendered to PDF via Gotenberg, uploaded to Google Drive, made publicly accessible, and a JSON response with file URLs is returned to the caller.

Setup

  1. Configure the Webhook path if needed (default: general-template-creator)
  2. Set your OpenAI credential on both LLM nodes
  3. Set your Google Drive credential and confirm the target folder ID in the Upload node
  4. Confirm the Gotenberg URL matches your self-hosted instance
  5. Install the community node n8n-nodes-word2text (see ⚠️ warning sticky)

Customization

  • Swap GPT-4o for GPT-4.1 or GPT-4.1-mini on the Identify node to reduce cost on the lighter classification task
  • Add a Switch node after identification to route different document types to type-specific prompts
  • Modify the Drive folder ID to sort templates into subfolders by document type

Document accepts input from a form such as the one found here: Sample Form

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky β€” Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky β€” Community Node Warning

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky β€” Intake

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky β€” Text Extraction

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky β€” Identify

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky β€” Parse Classification

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky β€” Generate Template

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky β€” Build and Deliver

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Webhook β€” Receive Document

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2.1

Block 10 - Switch β€” Route by File Type

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 11 - Extract β€” Word to Text

Type / Role
n8n-nodes-word2text.word2text - word2text
Config choices
Version 1

Block 12 - Extract β€” PDF to Text

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1.1

Block 13 - AI β€” Identify Document Type

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 14 - LLM β€” GPT-4o (Identify)

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 15 - Code β€” Parse Classification

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - AI β€” Generate Template

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 17 - LLM β€” GPT-4o (Generate)

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 18 - Code β€” Clean and Format Output

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Gotenberg β€” HTML to PDF

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 20 - GDrive β€” Upload PDF

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 21 - GDrive β€” Set Public Link

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 22 - Webhook β€” Send Response

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.5

3. Summary Table

Workflow Create fillable document templates from PDF or DOCX with GPT-4o and Google Drive
Complexity advanced
Nodes 22
Categories Document Extraction, AI Summarization
Author AI Solutions
Published 12 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14992/14992.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Create fillable document templates from PDF or DOCX with GPT-4o and Google Drive do?

Template Creator How it works This workflow accepts any uploaded document (PDF or DOCX) via webhook and automatically converts it into a reusable fill in the blank template. Step 1 β€” Identify: GP...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.