Templates / Create AI-written Word docs from Google Sheets with Groq and Pandoc

Create AI-written Word docs from Google Sheets with Groq and Pandoc

Ready for 3.0

by WeblineIndia ✓ · 22 views · created 2026-08-26 · Content Creation, Multimodal AI

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (9)

Groq Chat ModelGoogle SheetsAI AgentGoogle Drive

What it does

Quick overview This workflow pulls article topics and reference links from Google Sheets, uses a Groq-powered LangChain agent to generate long-form Markdown articles, converts them to Word documents with Pandoc on the local machine, and uploads the final .docx files to Google Drive. How it works 1. Manually starts the workflow. 2. Reads rows from a Google Sheets spreadsheet to get the topic, reference links, and an article ID for naming. 3. Processes the sheet rows one at a time and sends each topic plus links to a LangChain agent backed by the Groq Chat Model to generate a 1500+ word Markdown article. 4. Saves the generated Markdown as a local .md file using the article ID as the filename. 5. Converts the saved Markdown file into a .docx using a Pandoc command executed on the same machine. 6. Loads the converted .docx from local storage and uploads it to Google Drive. Setup 1. Add credentials for Google Sheets, Google Drive, and the Groq API used by the LangChain agent. 2. Update the Google Sheets document and sheet selection, and ensure your sheet contains the expected fields (for example, TOPICS, AHREFLINKS, and an ART-001 value used for filenames). 3. Run n8n on a machine that can write to the configured local folder (D:\n8n-files\), or change the path and Pandoc command to match your OS and directories. 4. Install Pandoc on the n8n host and ensure it is available on the system PATH so the conversion command can run. 5. Choose the destination Google Drive folder (and optionally the Drive) in the upload step. Additional info How To Customize Nodes AI System Prompt: Open the AI Article Generator (LangChain Agent) node to tweak the AI's instructions. You can change the tone, adjust the target word count, or modify the strict styling directives to better fit your brand voice. Pandoc Styling: If you have a specific corporate template for Word documents, you can customize the Prepare Pandoc Conversion Command node to include a reference document. Update the command to look something like this: =pandoc /tmp/{{ $json.filename }}.md --reference-doc=/tmp/custom-template.docx -o /tmp/{{ $json.filename }}.docx. Batch Size: The Batch Processor node is set up to loop through items one by one. If you have complex workflows, leaving it at a batch size of 1 is recommended to avoid rate limits and timeout issues with the AI model. Add‑ons You can easily extend this workflow to make it even more powerful: Team Notifications: Add a Slack or Discord node at the end of the loop to send a message to your team with a direct link to the newly generated Google Doc. Direct CMS Publishing: Instead of (or in addition to) saving a Word document, add a WordPress or Webflow node to push the Markdown content directly to your website as a draft. Plagiarism & AI Checking: Integrate an API like Copyscape or Originality.ai right after the text is generated to score the content before it gets converted to a Word document. Use Case Examples While built for articles, this workflow structure is highly adaptable. There can be many more use cases of this workflow, including: 1. Bulk Blog Post Generation: Feed a sheet of 50 long-tail keywords and let the workflow run overnight, waking up to a folder full of formatted articles ready for review. 2. Standard Operating Procedure (SOP) Drafting: Provide bullet points of a process in the Google Sheet and have the AI expand them into step-by-step instructional Word documents. 3. Product Description Catalogs: Generate highly detailed, formatted product specifications and user guides by feeding product names and core features into the sheet. 4. SEO Content Silos: Automatically draft a pillar page and supporting cluster articles, injecting internal links perfectly using the spreadsheet data. 5. Newsletter Archives: Convert plain text email drafts into beautifully formatted Word documents for your internal company archives. Troubleshooting Guide | Issue | Possible Cause | Solution | | :--- | :--- | :--- | | "Execute Command" n

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.