How to Make Work Orders from Google Sheets (Printable PDF for Each Job, 2026)
Plenty of small service teams already keep their jobs in a spreadsheet: HVAC and plumbing outfits, property managers, facilities and maintenance teams, IT support, cleaning crews. The part that's still manual is the paper: someone copies last week's work order, retypes the customer, address and problem, and hopes the gate code from the previous job didn't slip through. This guide turns each job row into its own work order instead. You keep one Google Docs template with {{placeholders}}, list parts and materials on a second tab, tick a box, and a free Apps Script makes a Google Doc and a PDF for the technician, gives the job a work order number that never changes, adds a parts table with totals, and writes the links back to the row. Rows that are already done are skipped, so running it twice is safe.
Step 1: one row per job
Create a tab named Jobs. Each row is one work order. The script needs these headers in row 1 (any order): WO #, Customer, Generate, Doc status, Doc link, PDF link. Add whatever your work order should show, for example Site address, Contact phone, Problem, Priority, Technician, Scheduled and Estimate, plus a Job status column for your own tracking.
| WO # | Customer | Site address | Problem | Priority | Technician | Scheduled | Estimate | Job status | Generate | Doc status | Doc link | PDF link |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Harbor Dental | 40 Bay St, Unit 2 | No heat in back office | High | Tech A | 12/3/2026 | 450 | Scheduled | ☑ | ||||
| WO-1007 | Elm Street Cafe | 5 Elm St | Walk-in cooler alarm | Urgent | Tech B | 12/3/2026 | 1250.50 | Scheduled | ☑ | |||
| Lakeside Library | 1 Shore Dr | Quote: replace lobby fixtures | Low | New | ☐ |
- Generate is a checkbox column: select it and choose Insert › Checkbox. Tick it when the job is ready to send out. Unticked rows are never touched, so new requests can sit in the sheet until they're scheduled.
- Doc status, Doc link and PDF link start empty and belong to the script. A row with a PDF link counts as done and is never regenerated. Keep your own progress (New, Scheduled, In progress, Done) in Job status, a separate column, so the two never overwrite each other.
- Keep Scheduled as a real date and Estimate as a plain number. The script formats both, and you can still sort, filter and total them.
- For Priority, Technician and Job status, use Data › Data validation with a dropdown so every row spells them the same way. The formulas in Step 5 depend on that.
Step 2: work order numbers that stay put
A work order number gets written on invoices, warranty claims and text messages, so it has to stay with its job forever. Avoid =ROW()-style formulas: they change when rows are sorted or deleted. Leave WO # blank and let the script assign the next number (WO-1001, WO-1002…) as a plain value. It looks at the highest number already in the column, so typed or imported numbers like WO-1007 are respected and never reused.
Numbers are assigned when a row is generated, or earlier with Work orders › Number new rows, which numbers every row that has a Customer but no WO # without creating any files. Use that when you want to list parts for a job (next step) before you print it.
Step 3: parts and materials on their own tab (optional)
A job can need one part or twelve, and squeezing them into columns like Part 1, Part 2, Part 3 falls apart fast. Put them on a second tab named Parts instead, one row per line, with the work order number in the first column:
| WO # | Item | Qty | Unit price |
|---|---|---|---|
| WO-1007 | Door gasket | 2 | 38.50 |
| WO-1007 | Labor (hours) | 1.5 | 95 |
| WO-1007 | Shop supplies |
The script collects every line for a work order and puts them in a table on the document (Item, Qty, Unit price, Amount, plus a Total row). A blank Qty counts as 1, and a blank Unit price shows the line without an amount, which is handy for a technician's checklist of what to bring. A Qty or price that isn't a number stops just that work order with an error in Doc status, so a typo never prints a wrong total. If you don't need parts at all, skip the tab; the script works without it.
To see each job's parts total back on the Jobs tab, add a Parts total column with =SUMPRODUCT((Parts!A$2:A=A2)*IF(Parts!C$2:C="",1,Parts!C$2:C)*Parts!D$2:D), or the simpler =SUMIF(Parts!A:A,A2,Parts!E:E) if you add an Amount column (=C2*D2) to the Parts tab.
Step 4: the Google Docs template
Create a Google Doc laid out the way your technicians like it, and put a placeholder wherever a row value goes. A placeholder is the column header in double curly braces, spelled exactly like row 1: {{Customer}}, {{Site address}}, {{WO #}}. They work in the body, header and footer. Two placeholders come from the Parts tab: put {{Parts table}} on a line by itself where the table should go, and {{Parts total}} anywhere.
WORK ORDER {{WO #}} Priority: {{Priority}}
Customer: {{Customer}} Phone: {{Contact phone}}
Site: {{Site address}}
Scheduled: {{Scheduled}} Technician: {{Technician}}
Problem reported
{{Problem}}
Parts and materials
{{Parts table}}
Parts total: {{Parts total}} Estimate: {{Estimate}}
Work performed: ______________________________________________
Time in: ________ Time out: ________ Follow-up needed? Y / N
Customer signature: ____________________ Date: __________
The lines at the bottom stay blank on purpose: the PDF is printed or opened on a phone, and the technician fills them in on site. Copy the template's ID from its URL (between /d/ and /edit), and the ID of the Drive folder for finished work orders (after /folders/).
Step 5: the script
In the sheet, open Extensions › Apps Script, replace the sample code with the script below, paste your two IDs into TEMPLATE_ID and FOLDER_ID, and save. Reload the sheet: a Work orders menu appears. Choose Generate ticked rows and approve the permissions the first time.
/**
* Work orders from a Google Sheets job list and a Google Docs template.
* "Jobs" tab headers used (any order): Customer, WO #, Generate, Doc status,
* Doc link, PDF link. Every other column (Site address, Problem, Priority,
* Technician, Scheduled...) can be used in the template as {{Header}}.
* Optional "Parts" tab, one row per part or material line:
* WO #, Item, Qty, Unit price. Put {{Parts table}} on its own line in the
* template where the table should go, and {{Parts total}} anywhere.
* Only rows with Generate ticked and an empty PDF link are processed.
*/
const SHEET_NAME = 'Jobs';
const PARTS_SHEET = 'Parts'; // optional tab; skipped if it doesn't exist
const TEMPLATE_ID = 'PASTE_TEMPLATE_DOC_ID';
const FOLDER_ID = 'PASTE_DRIVE_FOLDER_ID';
const DATE_FORMAT = 'MMM d, yyyy'; // how date cells appear on the work order
const CURRENCY_COLUMNS = ['Estimate']; // numbers in these Jobs columns become $1,250.00
const CURRENCY_SYMBOL = '$';
const NUMBER_PREFIX = 'WO-'; // new work order numbers: WO-1001, WO-1002...
const FIRST_NUMBER = 1001;
const MAX_PER_RUN = 25; // stop early; run again for the rest
const MAX_RUNTIME_MS = 4.5 * 60 * 1000; // Apps Script stops runs at 6 minutes
function onOpen() {
SpreadsheetApp.getUi().createMenu('Work orders')
.addItem('Number new rows', 'numberWorkOrders')
.addItem('Generate ticked rows', 'generateWorkOrders').addToUi();
}
// Gives every row that has a Customer but no WO # the next number, as a plain value.
function numberWorkOrders() {
const j = readJobs_();
let n = 0;
for (let i = 1; i < j.rows.length; i++) {
const r = j.rows[i];
if (String(r[j.c.customer]).trim() === '' || String(r[j.c.num]).trim() !== '') continue;
j.put(i, 'num', j.next()); n++;
}
j.ss.toast(n + ' work order number(s) assigned.');
return n;
}
function generateWorkOrders() {
const started = Date.now();
const j = readJobs_();
const rows = j.rows, c = j.c, put = j.put;
const tz = Session.getScriptTimeZone();
const parts = readParts_(j.ss);
const template = DriveApp.getFileById(TEMPLATE_ID);
const folder = DriveApp.getFolderById(FOLDER_ID);
let made = 0, stopped = false;
for (let i = 1; i < rows.length; i++) {
const r = rows[i];
if (r[c.gen] !== true || r[c.pdf] !== '' || String(r[c.customer]).trim() === '') continue;
if (made >= MAX_PER_RUN || Date.now() - started > MAX_RUNTIME_MS) { stopped = true; break; }
try {
if (String(r[c.num]).trim() === '') put(i, 'num', j.next());
const num = String(r[c.num]).trim();
const lines = parts[num] || [];
const bad = lines.filter((l) => isNaN(l.qty) || isNaN(l.amount));
if (bad.length) throw new Error('Parts line "' + bad[0].item + '" has a Qty or Unit price that is not a number');
const fileName = num + ' - ' + r[c.customer];
// Reuse a Doc left by an earlier run (link in the row, or same name in the folder).
let docFile = null;
const id = String(r[c.doc]).match(/\/d\/([\w-]+)/);
if (id) docFile = DriveApp.getFileById(id[1]);
if (!docFile) docFile = findInFolder_(folder, fileName, MimeType.GOOGLE_DOCS);
if (!docFile) docFile = template.makeCopy(fileName, folder);
if (!id) put(i, 'doc', docFile.getUrl());
const values = {};
j.head.forEach((h, k) => { if (h) values[h] = formatValue_(h, r[k], tz); });
const total = lines.reduce((s, l) => s + l.amount, 0);
values['Parts total'] = lines.length ? money_(total) : '';
const doc = DocumentApp.openById(docFile.getId());
insertPartsTable_(doc.getBody(), lines, total);
for (const part of [doc.getBody(), doc.getHeader(), doc.getFooter()]) {
if (!part) continue;
for (const h of Object.keys(values)) replaceTag_(part, '{{' + h + '}}', values[h]);
}
const left = doc.getBody().getText().match(/\{\{[^{}]+\}\}/g) || [];
doc.saveAndClose();
let pdf = findInFolder_(folder, fileName + '.pdf', MimeType.PDF);
if (!pdf) pdf = folder.createFile(docFile.getAs(MimeType.PDF)).setName(fileName + '.pdf');
put(i, 'pdf', pdf.getUrl());
put(i, 'status', 'Generated ' + Utilities.formatDate(new Date(), tz, 'yyyy-MM-dd') +
(left.length ? ' (no column for ' + left.filter((t, k) => left.indexOf(t) === k).join(', ') + ')' : ''));
made++;
} catch (e) {
put(i, 'status', 'Error: ' + e.message);
if (/too many times|quota|limit exceeded/i.test(e.message)) { stopped = true; break; }
}
}
j.ss.toast(made + ' work order(s) generated.' + (stopped ? ' Run again to continue.' : ''));
return made;
}
function readJobs_() {
const ss = SpreadsheetApp.getActive();
const sh = ss.getSheetByName(SHEET_NAME);
const rows = sh.getDataRange().getValues();
const head = rows[0].map((h) => String(h).trim());
const col = (name) => head.indexOf(name);
const c = {
customer: col('Customer'), num: col('WO #'), gen: col('Generate'),
status: col('Doc status'), doc: col('Doc link'), pdf: col('PDF link'),
};
for (const k of Object.keys(c)) {
if (c[k] === -1) throw new Error('Missing column for ' + k + '. Check the headers in row 1.');
}
// Highest number already used, so new numbers never repeat.
let last = FIRST_NUMBER - 1;
for (const r of rows.slice(1)) {
const m = String(r[c.num]).match(/(\d+)\s*$/);
if (String(r[c.num]).indexOf(NUMBER_PREFIX) === 0 && m) last = Math.max(last, Number(m[1]));
}
return {
ss, rows, head, c,
put: (i, k, v) => { rows[i][c[k]] = v; sh.getRange(i + 1, c[k] + 1).setValue(v); },
next: () => NUMBER_PREFIX + (++last),
};
}
// Parts tab lines grouped by WO #. A blank Qty counts as 1; a blank Unit price shows no amount.
function readParts_(ss) {
const out = {};
const sh = ss.getSheetByName(PARTS_SHEET);
if (!sh) return out;
const rows = sh.getDataRange().getValues();
const head = rows[0].map((h) => String(h).trim());
const w = head.indexOf('WO #'), it = head.indexOf('Item');
const q = head.indexOf('Qty'), p = head.indexOf('Unit price');
if (w === -1 || it === -1) throw new Error('The Parts tab needs WO # and Item headers.');
for (const r of rows.slice(1)) {
const key = String(r[w]).trim();
if (key === '' || String(r[it]).trim() === '') continue;
const qty = q === -1 || r[q] === '' ? 1 : Number(r[q]);
const price = p === -1 || r[p] === '' ? null : Number(r[p]);
(out[key] = out[key] || []).push({ item: String(r[it]), qty, price, amount: price === null ? 0 : qty * price });
}
return out;
}
// Replaces a paragraph that is exactly {{Parts table}} with a table of this work order's lines.
function insertPartsTable_(body, lines, total) {
for (const p of body.getParagraphs()) {
if (p.getText().trim() !== '{{Parts table}}') continue;
if (!lines.length) { p.setText('No parts listed.'); continue; }
const cells = [['Item', 'Qty', 'Unit price', 'Amount']];
for (const l of lines) {
cells.push([l.item, String(Math.round(l.qty * 1000) / 1000),
l.price === null ? '' : money_(l.price), l.price === null ? '' : money_(l.amount)]);
}
cells.push(['Total', '', '', money_(total)]);
const table = body.insertTable(body.getChildIndex(p), cells);
table.getRow(0).editAsText().setBold(true);
try { p.removeFromParent(); } catch (e) { p.setText(''); } // the last paragraph can't be removed
}
}
// Literal find-and-replace, so values containing $ or \ are inserted exactly.
function replaceTag_(part, tag, value) {
const pattern = tag.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
for (let n = 0, found = part.findText(pattern); found && n < 500; n++, found = part.findText(pattern)) {
const text = found.getElement().asText();
const start = found.getStartOffset();
text.deleteText(start, found.getEndOffsetInclusive());
if (value !== '') text.insertText(start, value);
}
}
function formatValue_(header, v, tz) {
if (v instanceof Date) return Utilities.formatDate(v, tz, DATE_FORMAT);
if (typeof v === 'number' && CURRENCY_COLUMNS.indexOf(header) !== -1) return money_(v);
return v === null || v === undefined ? '' : String(v);
}
function money_(n) {
const s = Math.abs(n).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return (n < 0 ? '-' : '') + CURRENCY_SYMBOL + s;
}
function findInFolder_(folder, name, mimeType) {
const files = folder.getFilesByName(name);
while (files.hasNext()) {
const f = files.next();
if (f.getMimeType() === mimeType && !f.isTrashed()) return f;
}
return null;
}
What it does, row by row:
- Skips rows that aren't ticked, rows without a Customer, and rows that already have a PDF link.
- Numbers the row if WO # is blank, then copies the template into your folder as
WO-1001 - Harbor Dentaland writes the Doc link straight away. - Builds the parts table where
{{Parts table}}is (or writes “No parts listed.”), then fills every{{Header}}in the body, header and footer. Dates becomeDec 3, 2026(changeDATE_FORMAT) and numbers inCURRENCY_COLUMNSbecome$1,250.50. Values are inserted literally, so a$or a backslash in a cell can't break the replacement. - Saves the Doc, makes the PDF next to it, writes the PDF link and sets Doc status to
Generatedwith the date. If the template has a placeholder that matches no column (a typo like{{Gate Code}}for a Gate code header), Doc status says so, for exampleGenerated 2026-12-02 (no column for {{Gate Code}}), so you can fix it before the technician sees braces on the page.
Running it twice. Finished rows have a PDF link, so a second run does nothing to them. If a run stopped halfway through a row (a timeout, a quota error, a closed tab), the next run finds that row's Doc from the Doc link, or from a file with the same name in the folder, and finishes it with the same work order number instead of making a second copy.
Quotas and time limits. Apps Script stops a run after six minutes, and Google limits how many documents an account can create per day (see Apps Script quotas). The script stops on its own after MAX_PER_RUN work orders or about four and a half minutes, and stops immediately on a quota error, leaving the error in that row's Doc status. Run it again later and it carries on.
Step 6: a dispatch view with formulas
A few formulas on a separate Dashboard tab turn the Jobs list into a daily board. They assume Job status in column I, Scheduled in G, Technician in F and Priority in E, as in the example; adjust the letters to your sheet.
- Today's jobs, most urgent first:
=SORT(FILTER(Jobs!A2:I, Jobs!G2:G=TODAY(), Jobs!I2:I<>"Done"), ARRAYFORMULA(MATCH(FILTER(Jobs!E2:E, Jobs!G2:G=TODAY(), Jobs!I2:I<>"Done"), {"Urgent";"High";"Normal";"Low"}, 0)), TRUE). The MATCH sorts by your priority order instead of alphabetically. If nothing is scheduled today, FILTER shows#N/A; wrap it inIFERROR(…, "No jobs today"). - Open jobs per technician:
=QUERY(Jobs!A2:I, "select F, count(B) where I <> 'Done' and F is not null group by F label count(B) 'Open'", 0). - Days open (a column on the Jobs tab, with a Requested date in column N):
=IF(I2="Done", "", TODAY()-N2), and a conditional formatting rule on that column with Greater than 7 to flag anything sitting for more than a week. - Past-due scheduled jobs: conditional formatting on the row with the custom formula
=AND($G2<>"", $G2<TODAY(), $I2<>"Done").
Tips
- Test with a fake job first. Add a row for your own address, generate it, and read the PDF on your phone, the way a technician will. Check the parts table, the totals, and that no
{{is left. - Changing a work order after it's printed. Don't edit the PDF. Fix the row (or its Parts lines), delete or rename the old Doc and PDF, clear Doc link, PDF link and Doc status, and generate again. If the customer or technician already has the first version, give the new one a revision number such as
WO-1007-R1by typing it into WO #. - Getting it to the technician. The script saves files; it doesn't send anything. Share the Drive folder with your technicians (view only), or see emailing each row's PDF as an attachment to send each work order to the address in a Technician email column.
- Requests from a form. If customers or staff report problems through a Google Form, its responses tab can be the Jobs tab: add the WO #, Generate, Doc status, Doc link and PDF link columns to the right of the form's columns. New responses arrive as unticked rows, so nothing is printed until someone schedules the job.
- Privacy. Work orders often carry phone numbers, door or alarm codes and notes about people's homes. Only put on the template what the technician needs on site, share the folder with the people who need it, and remember that anyone with access to the folder can open every work order in it.
- Recurring maintenance. For jobs that come back on a schedule (filter changes, inspections, servicing by hours or mileage), see equipment and vehicle maintenance reminders; when a reminder comes due, add the job here and print its work order.
- After the job. The same row-to-document method makes the paperwork that follows: quotes and estimates, invoices and receipts; the general version is a PDF or Google Doc for each row.
{{Column}} placeholders from the row; for the parts table from a second tab and automatic numbering above, use the script, or keep the parts list and the work order number in columns of their own. It is on the Google Workspace Marketplace.See SheetWeave
Related Google Sheets guides
- How to generate a PDF or Google Doc for each row in Google Sheets
- Find and remove duplicates in Google Sheets
- Compare two columns or two sheets for duplicates
- Find case-insensitive and fuzzy duplicates in Google Sheets
- Best Autocrat alternatives for mail merge to PDF and Docs
- Make invoices or certificates from Google Sheets rows
- Create sales quotes or estimates from Google Sheets
- Generate receipts from Google Sheets rows
- Create purchase orders from Google Sheets
- Make packing slips from Google Sheets orders
- Generate a PDF certificate from a Google Form response
- Issue numbered training completion certificates with expiry dates
- Make a PDF progress report for each student
- Generate offer letters from a Google Sheets hiring tracker
- Generate contracts and agreements from a Google Docs template
- Make work orders for service jobs from Google Sheets
- Email each row’s PDF as an attachment
- Automatic email reminders from a date column
- Contract renewal and expiration alerts from Google Sheets
- Track certificate of insurance (COI) expirations in Google Sheets
- Track employee license and certification expirations
- Track equipment and vehicle maintenance with reminders
- Equipment sign-out sheet with due-back and overdue reminders
- Track warranty expiration dates with reminders
- Birthday and work anniversary reminders from Google Sheets
- Rent due and lease renewal reminders from Google Sheets
- Send invoice payment reminders from Google Sheets
- Highlight overdue tasks and send email reminders
- Follow-up reminders for leads, clients and candidates
- Membership renewal reminders for clubs and associations
- Appointment reminder emails for clients
- Probation and performance review reminders for managers
- Inventory expiration dates with email alerts
- Domain and SSL certificate renewal reminders
- Name badges and place cards from a guest list
- Vehicle registration, inspection and insurance reminders
- Event sign-in sheets and table seating lists
- Pet vaccination expiry reminders for owners
- Customer account statements with aging
- Subscription tracker with renewal and free-trial reminders
- Mailing labels: one per household, clean addresses
- Volunteer shifts: open slots, reminders and rosters
- Year-end donor giving statements, one PDF per donor
- Volunteer hours verification letters, one PDF per request
- Instrument calibration due dates with email reminders
- Pay stubs from a payroll sheet, one PDF per employee
- Gift certificates with codes, balances and a redemption log
- Bill due dates: mark paid, 30-day totals and reminders
- Grant deadlines: LOIs, reports, owners and reminders
- Passport expiry: trips, the 6-month rule and renewal reminders
- Class rosters: one PDF per class, A–Z, with seat counts
- Insurance renewals: premium changes and reminders
- Onboarding checklists: tasks from start dates, owner reminders
- Raffle tickets: numbered stubs, seller books, sales tracker
- SheetWeave vs Autocrat
- SheetWeave vs Document Studio
- SheetWeave vs RowDocs
Instructions refer to Google Sheets, Google Docs and Apps Script as they worked on November 14, 2026. Not affiliated with Google or any other vendor named here. Google Sheets, Google Docs and Google Drive are trademarks of Google LLC. Features change, so verify in your own account. Questions or corrections: hello@loomwise.app.