Gmail DOCX Generator with OpenAI, Sheets & Drive | n8n Workflow
Gmail DOCX Generator with OpenAI, Sheets & Drive | n8n Workflow
Regular price
£25.99
Regular price
£25.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Gmail DOCX Generator with OpenAI, Sheets & Drive | n8n Workflow
Regular price
£25.99
Regular price
£25.99
Sale price
Unit price
/
per
Turn Gmail requests into ready-to-send DOCX files—automatically
This n8n workflow listens for new emails in Gmail, matches the request to the correct DOCX template stored in Google Drive (using OpenAI + a Google Sheets template catalog), generates a filled DOCX via a Pandoc HTTP conversion service, uploads it back to Google Drive, and replies in the same email thread with the attachment and a Drive link.
What this workflow does
- Triggers on new Gmail messages and extracts the sender, subject, and body text.
- Validates authorization by checking allowed sender domains and a required keyword.
- Loads a template catalog from Google Sheets (Title, Aliases, FileId, FileName) and formats it into a searchable list for AI matching.
- Uses OpenAI to select the best matching template and extracts recipient details and other fields. If no template fits, it replies with an “unable to match” message.
- Downloads the DOCX template from Google Drive and uses OpenAI to reproduce it as filled GitHub-flavored Markdown.
- Converts Markdown to DOCX by sending the Markdown to a Pandoc conversion HTTP endpoint.
- Uploads the generated DOCX to Google Drive and replies via Gmail in the original thread with the document attached and a Drive link.
Use cases
- Generating personalized contracts, letters, or proposals when a client emails a structured request.
- Producing standard onboarding or HR documents based on a keyword + sender authorization.
- SaaS ops teams automating document fulfillment without manually selecting templates.
Technical details
- n8n integrations: Gmail trigger + Gmail reply actions, Google Sheets, Google Drive, OpenAI, and a Pandoc HTTP conversion endpoint.
- Workflow logic nodes: if, set, code, no op, plus sticky note for documentation.
- Setup requirements: Gmail OAuth2 (trigger + replies), Google Sheets/Drive OAuth2 and a template catalog sheet, OpenAI credentials for the two OpenAI steps, and a configured Pandoc HTTP endpoint.
