Automated Invoice Generator from Google Sheets to Google Docs
This workflow automates invoice creation using Google Sheets for structured input and Google Docs for templated output β all built inside n8n.
π οΈ Step-by-Step Instructions
Step 1: Manual Trigger
Start the workflow manually for testing or development purposes.
Step 2: Google Sheets β Load Invoice Data
Pulls invoice data from a Google Sheet.
π Sheet URL: Copy This Sheet Expected Columns**: Company From Company To Terms Invoice Description Amount
> π Credentials Required:
> Connect to Google Sheets OAuth2 API in n8n.
> Be sure your sheet is shared with the connected Google account.
Step 3: Get Invoice Template β Load Google Doc
Loads a static Google Docs template containing placeholder values.
π§Ύ Template URL: Copy This Template Required Placeholders** in the document: FromCompany# ToCompany# Terms# Invoice# Description# Amount#
> π Credentials Required:
> Connect to Google Docs OAuth2 API in n8n.
Step 4: Create New Doc β Make Invoice File
Creates a new Google Doc by duplicating the invoice template.
Title Format**: Invoice: {{ $json.Invoice }}
Destination Folder ID**: 1TnDibwPPPUm3VbmETiqWDVhtaUTLJ6mn
(You can change this to your own Google Drive folder)
> π Make sure your Google Docs credential has write access to this folder.
Step 5: Merge β Combine Data
Merges the loaded document and spreadsheet row together for downstream updates.
Step 6: Insert Content into Doc (Optional)
You can insert additional content here if needed.
For example, a note, header, or footer pulled from your database or a custom field.
Step 7: Input Invoice Details β Replace Fields
Uses Google Docs API to replace all placeholders from the original template with the actual values.
Replacements:
| Placeholder | Replaced With | |----------------|------------------------------| | FromCompany# | Company From from sheet | | ToCompany# | Company To from sheet | | Terms# | Terms from sheet | | Invoice# | Invoice number | | Description# | Description of service | | Amount# | Amount of invoice |
π€ Final Output
Each row from the Google Sheet results in a completed, branded Google Doc invoice stored in your Drive.
π Need Help?
Robert Breen
Automation Consultant
π ynteractive.com
π§ robert.j.breen@gmail.com
π LinkedIn
π Required APIs
| Service | Purpose | |------------------|--------------------------| | Google Sheets API | Pull structured invoice data | | Google Docs API | Load & modify invoice documents | | n8n OAuth2 | Connect both services securely |
Let me know if you'd like a follow-up step to export invoices as PDFs or auto-email them to clients!
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Food Recipes from Gmail & Form Requests with Ollama & Llama 3.2
This n8n template demonstrates how to create an intelligent food recipe assistant that accepts requests via Gmail and we...
Automatic News Summarization & Email Digest with GPT-4, NewsAPI and Gmail
π° AI News Digest Agent: Auto News Summarizer & Email Newsletter Create an intelligent news curation system that automat...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments