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 Configure the Webhook path if needed (default: general-template-creator) Set your OpenAI credential on both LLM nodes Set your Google Drive credential and confirm the target folder ID in the Upload node Confirm the Gotenberg URL matches your self-hosted instance 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
Related Templates
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
Add product ideas to Notion via a Slack command
Use Case In most companies, employees have a lot of great ideas. That was the same for us at n8n. We wanted to make it a...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments