DocMaster Documentation
DocMaster Documentation
A complete, step-by-step guide to install, configure, and generate your first invoice with DocMaster.
- Install the add-on and initialize your Sheets workspace
- Connect templates with markers in Google Docs
- Generate invoices with reliable background tasks

What DocMaster does
DocMaster is a Google Workspace add-on that turns Google Sheets into a structured database and Google Docs into dynamic, data-driven documents.
- Google Sheets = database. Google Docs = presentation layer.
- DocMaster bridges them with reliable field mapping and marker replacement.
- Structured tabs (orders, items, customers, tasks) enforce consistent data flows.
- Templates stay clean while data updates are automated and traceable.
- Bulk generation uses task-based processing to respect Apps Script quotas.

Step 1 — Install the add-on
Install DocMaster once, then open it from the Extensions menu in Google Sheets.
- 1
Open the add-on listing
Go to the Google Workspace Marketplace and open the DocMaster listing: https://workspace.google.com/marketplace/app/docmaster/ADDON_ID

- 2
Install DocMaster
Click Install and approve the requested permissions.
note:If your organization restricts add-ons, contact your Workspace admin. - 3
Open the sidebar
In Google Sheets, open Extensions → DocMaster → Open to launch the sidebar.

Step 2 — Initialize your workspace
Create the required tabs, then confirm your default configuration settings.
- 1
Initialize DocMaster tabs
In the sidebar, choose Initialize Workspace to create the required tabs.

- 2
Review the created tabs
Confirm Items, Customers, Orders, Order Items, Invoices, and task tabs now exist.

- 3
Set company defaults
Open Settings to configure invoice prefix, currency, tax behavior, and default template folder.
warning:Settings are stored in user properties and affect invoice rendering.
Home screen basics
When you first open DocMaster, the sidebar starts in a safe, read-only state until your sheet is initialized.
- 1
Fresh install state
If the sheet is new, the drawer is disabled and only the Initialize Workspace action is available.
note:Initialization creates Items, Orders, Customers, and Order Items tabs with headers. - 2
Initialize the current sheet
Select Initialize Workspace from the empty state to create the required tabs.

- 3
Header refresh button
Use the refresh action to pull the latest data from Sheets after manual edits or imports.
tip:Refreshing is required after direct sheet edits unless you reopen the add-on. - 4
Open the drawer
The drawer is your navigation panel to switch between Items, Orders, Customers, and Tasks.

Sheets flow — Items, Customers, Orders
Create inventory items, add customers, create orders, then attach line items for invoicing.
- 1
Create inventory items
In the Items tab, add each product or service with a stable item ID (for example, ITM-1001). You can enter rows manually or use the UI—using the UI is recommended to keep IDs consistent.

- 2
Add customers
In the Customers tab, create customer records with unique IDs. You can enter rows manually, or let customers be created automatically during order creation.

- 3
Create orders
In the Orders tab, add a row per invoice and reference a valid customer ID. You can enter rows manually, but the UI is recommended because it applies tax calculations and data mappings automatically.

- 4
Add order items
In the Order Items tab, add one row per line item and reference the Order ID and Item ID. You can enter rows manually or use the UI—using the UI is recommended.
tip:Use formulas like =Quantity * UnitPrice to keep line totals consistent.
Inventory system — Items
Items can be added in the UI or directly in Sheets. Keep IDs stable to preserve history.
| ID | Name | Unit Price | Tax % | Price After Tax | Stock Quantity | Auto Decrease | Created At | Updated At |
|---|---|---|---|---|---|---|---|---|
| ITM-1001 | Retainer (Monthly) | 1200 | 10 | 1320 | 50 | Yes | 2026-01-10 | 2026-01-18 |
- Auto Decrease reduces stock after order creation (e.g., 50 - 10 = 40).
- Editing items in Sheets requires a refresh in the add-on UI.
Create an order
Orders behave like a cart system. Use the UI flow to ensure the add-on calculates totals correctly.
- 1
Select currency
Choose the currency symbol from the dropdown. The default comes from your configuration settings, and the preset currency is applied automatically. Note: currency conversion is not supported yet; it is a display symbol only.

- 2
Add items to the cart
Select items from the dropdown, set quantities, and click Add to cart. The app calculates item prices and taxes as items are added.

- 3
Apply extras and discounts
Add shipping, packing, or restoration charges. Apply a flat discount if needed.

- 4
Select customer details
Pick a customer email from the existing list to avoid duplicates.
warning:Creating orders directly in Sheets can break totals. Use the UI when possible.
Orders tab fields
These fields are calculated or written during order creation and invoice generation.
| ID | Order Number | Status | Customer ID | Notes | Currency Code | Currency Symbol | Subtotal | Tax Total | Discount Amount | Grand Total | Items Count | Invoice URL | Invoice Folder URL | Created By | Created At | Updated At |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ORD-2026-001 | INV-2026-001 | Ready | CUST-0001 | Monthly retainer | USD | $ | 1200 | 120 | 0 | 1320 | 2 | https://docs.google.com/... | https://drive.google.com/... | user@company.com | 2026-01-18 | 2026-01-18 |
- Invoice URL and Folder URL populate after generation.
- Status updates to Done when the invoice is created.
Docs flow — Templates and previews
Create a Google Docs template, insert markers, then preview invoices before bulk runs.
- 1
Create a template
In Google Docs, build an invoice template and add your branding and layout.

- 2
Insert markers
Add markers like {{customer.name}} and {{invoice.total}} in the right places. Always cross-check markers—most errors happen due to incorrect marker names or formatting.

- 3
Select template in DocMaster
In the Google Sheets DocMaster sidebar, choose the template you just added markers to, then save your selection so that document is used for processing.

- 4
Preview a single invoice
Select an order and click Preview Invoice to verify output before bulk generation.

Using the Drive picker
Choose a destination folder for generated invoices and store the selection per user.
- 1
Open Drive picker
From the sidebar, select Choose Folder to open the Google Drive picker.

- 2
Select a folder
Pick a folder you own or have edit access to, then confirm selection.

- 3
Confirm saved destination
DocMaster stores the folder in your user properties for future runs.
note:You can change the folder anytime from Settings.
Markers & placeholders
Markers are tokens inside your template that DocMaster replaces with data from Sheets.
| Category | Marker | What it renders |
|---|---|---|
| Customer | {{customer.name}} | Customer name |
| Order | {{order.id}} | Order ID |
| Dates | {{order.date}} | Order date |
| Totals | {{invoice.total}} | Invoice total |
| Line items | {{items.table}} | Line item table block |
Example template snippet
Invoice #: {{invoice.number}}
Customer: {{customer.name}}
Date: {{order.date}}
{{items.table}}
Subtotal: {{invoice.subtotal}}
Tax: {{invoice.tax}}
Total: {{invoice.total}}- Markers must match canonical field names exactly.
- Avoid extra spaces or punctuation inside marker braces.
Marker namespaces
Namespaces prevent ambiguity. Use the right namespace for each entity.
| Namespace | Entity | Example fields |
|---|---|---|
| customer | Customer | name, email, phone, address |
| order | Order | orderNumber, status, subtotal, grandTotal |
| lineItem | Line item | itemId, name, quantity, unitPrice |
| config | Config | COMPANY_NAME, PHONE, ADDRESS |
- `lineItem` markers only work inside line item table rows.
- Namespace separators support both dot and underscore.
Marker modifiers
Modifiers transform values using a pipe syntax inside the marker.
| Modifier | Example | Result |
|---|---|---|
| uppercase | {{customer.name | uppercase}} | JOHN DOE |
| lowercase | {{customer.email | lowercase}} | john@example.com |
| capitalize | {{customer.name | capitalize}} | John doe |
| trim | {{customer.phone | trim}} | 555-1234 |
| truncate | {{customer.name | truncate:10}} | John Doe |
| multiply | {{order.total | multiply:0.8}} | 80.00 |
| divide | {{order.total | divide:2}} | 50.00 |
| add | {{order.subtotal | add:10}} | 110.00 |
| subtract | {{order.total | subtract:5}} | 95.00 |
| round | {{order.total | round:2}} | 100.55 |
| abs | {{order.discount | abs}} | 10.00 |
| currency | {{order.total | currency:USD}} | $100.00 |
| number | {{order.total | number:2}} | 100.50 |
| percent | {{lineItem.taxPercent | percent}} | 15% |
| date | {{order.Created At | date:DD/MM/YY}} | 20/01/26 |
| default | {{customer.phone | default:N/A}} | N/A |
- Modifiers can be chained: {{order.total | multiply:0.8 | currency:USD}}.
- Invalid modifiers are ignored safely.
Advanced marker rules
These rules keep templates safe, reliable, and predictable.
- User-facing sheet headers map to canonical fields automatically.
- Markers tolerate extra whitespace or line breaks inside braces.
- Line item rows must expand before document-level replacements.
- Missing fields return empty strings unless you add a default modifier.
- Currency formatting can be automatic or manual with the currency modifier.
Background tasks
Bulk invoice generation runs through a task queue to stay within Apps Script limits.
- 1
Track background tasks
All background tasks are logged with their status, folder URL, and any failure reason so you can track progress and fix issues gracefully.

Task status glossary
Use these statuses to triage runs and retries.
| Status | Meaning |
|---|---|
| Queued | Ready to process |
| In Progress | Currently running |
| Done | Completed successfully |
| Failed | Stopped due to error |
Custom properties & configuration
DocMaster stores user preferences and operational metadata in Apps Script properties.
| Property | Scope | Purpose |
|---|---|---|
| DM_CONFIGURATION | User | Add-on settings and defaults |
| DRIVE_PICKER_SELECTION | User | Selected template and output folder |
| SCRIPT_PROPERTIES | Script | Trigger IDs for background tasks |
- Changing settings updates the stored properties immediately.
- Admins can reset properties by re-running setup.
Proof example — your first invoice
Follow this sample data set to see how a single order turns into a finished invoice.
Before (Orders)
| Order ID | Customer ID | Order Date | Status |
|---|---|---|---|
| ORD-2026-001 | CUST-0001 | 2026-01-15 | Ready |
After (Invoices)
| Invoice ID | Order ID | Doc Link | Status |
|---|---|---|---|
| INV-2026-001 | ORD-2026-001 | https://docs.google.com/... | Sent |
- The invoice link is written back to the Invoices tab.
- You can preview before sending or downloading.
Common errors & recovery
Most issues are caused by missing IDs or mismatched markers.
- Missing marker: Update the template to use canonical marker names.
- Failed task: Fix the referenced Item ID and retry the task.
- Permission denied: Re-open Drive picker and choose an accessible folder.
Tips for power users
Operational shortcuts that keep large invoice runs clean.
- Use immutable IDs for items and customers to preserve historical integrity.
- Version your templates (Invoice Template v1, v2) for easy rollbacks.
- Filter Orders by status before bulk generation to avoid reruns.
- Keep a QA checklist tab for pre-flight validation.
