Google Sheets to Gmail, PDFs sent without mistakes
Copying names and addresses into PDFs is the kind of “small task” that quietly wrecks your week. One wrong email, one outdated address, one missed attachment, and you’re stuck apologizing, re-sending, and double-checking everything.
This is where Sheets Gmail PDFs automation pays off fast. HR managers sending offers, finance teams issuing invoices, and agency owners delivering client docs all run into the same problem: the work isn’t hard, it’s just repetitive and easy to mess up.
This workflow turns rows in Google Sheets into personalized PDFs, stores them in Google Drive, emails them via Gmail, and marks each row as done. You’ll see what it does, what you need, and how to avoid the common failures that cause “it worked yesterday” headaches.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Google Sheets to Gmail, PDFs sent without mistakes
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n2@{ icon: "mdi:database", form: "rounded", label: "Get employees", pos: "b", h: 48 }
n3@{ icon: "mdi:cog", form: "rounded", label: "Create agreement", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get agreement"]
n5@{ icon: "mdi:cog", form: "rounded", label: "Upload agreement", pos: "b", h: 48 }
n6@{ icon: "mdi:database", form: "rounded", label: "Update row", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Success?", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Merge"]
n9@{ icon: "mdi:message-outline", form: "rounded", label: "Send email with PDF", pos: "b", h: 48 }
n8 --> n6
n7 --> n4
n6 --> n1
n4 --> n5
n4 --> n9
n2 --> n1
n1 --> n3
n3 --> n7
n5 --> n8
n9 --> n8
n0 --> n2
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n7 decision
class n2,n6 database
class n4 api
classDef customIcon fill:none,stroke:none
class n4,n8 customIcon
The Problem: PDF Sending Turns Into a QA Job
You start with good intentions: a clean spreadsheet, a document template, and a quick “send these today” plan. Then reality hits. Someone’s name has a special character that breaks your template. A row is missing an email. Two people share the same last name and you attach the wrong file. Even when nothing goes wrong, you still spend your time doing the same micro-steps: generate, download, rename, upload, attach, send, log. Multiply that by 20 documents and it’s suddenly your whole morning.
It adds up fast. And the worst part is the mental load, because you have to stay “on” for every single send.
- You end up re-checking each email recipient because one mistake is costly and awkward.
- File naming gets inconsistent, so later you can’t quickly find “the one we sent last month.”
- Rows don’t get marked as completed reliably, which means duplicate sends or missed sends.
- Manual PDF creation doesn’t scale past a small batch without errors creeping in.
The Solution: Generate, Store, Email, and Log—Automatically
This n8n workflow turns Google Sheets into a simple document “queue.” You run it, and it pulls only the rows that have not been processed yet (the “DONE” column is blank). Then it goes record by record, sending the row data (first name, last name, address, email, and whatever else you include) into your CraftMyPDF template to generate a finished PDF. If PDF creation succeeds, the workflow downloads the file, uploads it into Google Drive with a clean filename like First-Name-Last-Name.pdf, and emails it via Gmail as an attachment. Finally, it updates the original row so your sheet becomes a reliable sent log.
The workflow starts when you click Execute in n8n. From there, it batches through staff records, creates the document, checks for success, and completes delivery through Drive and Gmail. When it’s done, your Google Sheet tells you exactly what was sent and what still needs attention.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you need to send 30 contracts from a Google Sheet. Manually, you might spend about 10 minutes per contract to generate the PDF, name it, upload it, attach it, send it, and then mark the row as done. That’s roughly 5 hours of careful, interruption-prone work. With this workflow, the “work” becomes adding or updating rows in the sheet and clicking Execute, which is maybe 5 minutes. The processing runs in the background while you do something else, and the sheet updates itself as each contract goes out.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to hold rows and “DONE” status.
- CraftMyPDF to generate PDFs from a template.
- Google Drive + Gmail OAuth (create in Google Cloud Console)
Skill level: Intermediate. You’ll connect Google credentials, map fields to a PDF template, and do light troubleshooting if a row has missing data.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
You run it on demand. The workflow uses a manual start trigger, so you click Execute when you’re ready to send a batch (useful when you want control).
Rows are pulled from Google Sheets. It retrieves staff/customer records and filters for rows where the “DONE” column is empty, so it focuses only on unsent documents.
Each row becomes a PDF. n8n loops through the rows in batches, sends the mapped fields to CraftMyPDF, and checks if the PDF creation succeeded before continuing.
Delivery and logging happen automatically. The PDF is downloaded, uploaded to Google Drive, emailed through Gmail as an attachment, and then the original sheet row is updated to mark completion.
You can easily modify the email copy and the Drive folder setup based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Set up the manual start so you can run the workflow on demand while testing.
- Add and open Manual Start Trigger to confirm it is the workflow entry point.
- Ensure Manual Start Trigger is connected to Retrieve Staff Records as shown in the flow.
Step 2: Connect Google Sheets
Pull staff data from a spreadsheet and prepare row updates after processing.
- Open Retrieve Staff Records and select your spreadsheet in Document using
[YOUR_ID]. - Set Sheet Name to
gid=0and keep the filter on DONE to target rows that are not processed. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Retrieve Staff Records.
- Open Update Sheet Row and keep Operation set to
update. - In Update Sheet Row, confirm DONE is set to
xand row_number uses={{ $('Iterate Record Batches').item.json.row_number }}for matching. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Update Sheet Row.
⚠️ Common Pitfall: Replace all [YOUR_ID] placeholders with your actual Google Sheets document ID and ensure the sheet name matches gid=0.
Step 3: Set Up PDF Generation and Validation
Generate PDFs with CraftMyPDF and verify successful responses before continuing.
- Open Iterate Record Batches to ensure batching is enabled; this controls row-by-row processing.
- Configure Generate Agreement PDF with Resource set to
pdfand Template ID set to[YOUR_ID]. - In Generate Agreement PDF, keep the Data mapping as provided to map fields like
{{ $json["FIRST NAME"] }},{{ $json["LAST NAME"] }}, and{{ $json.EMAIL }}. - Credential Required: Connect your craftMyPdfApi credentials in Generate Agreement PDF.
- Open Result Success Check and verify the condition checks
={{ $json.status }}equalssuccess. - Set Download Agreement File to use URL
={{ $('Generate Agreement PDF').item.json.file }}to fetch the generated PDF.
Tip: If CraftMyPDF returns a non-success status, Result Success Check will prevent the download step—verify template IDs and data fields first.
Step 4: Configure Output Actions and Parallel Processing
Store the PDF in Drive, email it to the recipient, and merge the results for updating the sheet.
- In Store Agreement File, set Name to
={{ $('Retrieve Staff Records').item.json["FIRST NAME"] }}-{{ $('Retrieve Staff Records').item.json["LAST NAME"] }}.pdf. - Choose the target Drive and folder in Store Agreement File, with Folder ID set to
[YOUR_ID]. - Credential Required: Connect your googleDriveOAuth2Api credentials in Store Agreement File.
- Configure Dispatch PDF Email with Send To
={{ $('Retrieve Staff Records').item.json.EMAIL }}, SubjectJob offer, and the provided HTML message. - Credential Required: Connect your gmailOAuth2 credentials in Dispatch PDF Email.
- Note the parallel execution: Download Agreement File outputs to both Store Agreement File and Dispatch PDF Email in parallel.
- Ensure both branches feed into Combine Process Results, which then connects to Update Sheet Row to mark the row as processed.
⚠️ Common Pitfall: Replace all [YOUR_ID] placeholders for Google Drive folder selection, or file uploads will fail.
Step 5: Test and Activate Your Workflow
Run the workflow manually to validate the entire PDF generation and delivery loop before going live.
- Click Execute Workflow from Manual Start Trigger to run a test with a small dataset.
- Confirm that Generate Agreement PDF returns a valid file URL and Download Agreement File fetches the PDF binary.
- Verify that Store Agreement File uploads the PDF to Drive and Dispatch PDF Email sends the message successfully.
- Check the sheet to confirm Update Sheet Row sets DONE to
xfor processed records. - When satisfied, toggle the workflow to Active for production use.
Common Gotchas
- Google Sheets and Gmail credentials can expire or need specific permissions. If things break, check the n8n Credentials page and your Google Cloud OAuth consent settings first.
- CraftMyPDF template IDs and field names must match your mapped placeholders. If PDFs generate blank sections, open the Generate Agreement PDF node and compare your template variables with your sheet columns.
- Google Drive uploads can silently fail if the destination folder was deleted or access changed. Confirm the folder selection in the Store Agreement File node and make sure the connected Google account still has edit access.
Frequently Asked Questions
Plan for about an hour if your template and Google credentials are ready.
No. You will map columns to fields and connect accounts.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in CraftMyPDF usage costs and standard Google Workspace costs if you’re sending at scale.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and it’s mostly template work. You keep the same flow, then swap the CraftMyPDF template ID in the Generate Agreement PDF node and remap the fields to match your invoice placeholders. Common tweaks include adding line items, changing the Drive folder path, and editing the Gmail message to match your billing tone.
Usually it’s expired OAuth consent or a changed Google password that invalidates the token. Reconnect the Google Sheets credential inside n8n, then confirm the account still has access to that spreadsheet. If it fails only on updates, check that the sheet tab name and row identifiers still match what the Update Sheet Row node expects.
Practically, it can handle batches in the hundreds as long as your Google account and CraftMyPDF plan allow it. n8n Cloud plans have monthly execution limits depending on tier, while self-hosting has no execution limit (it mainly depends on your server). Gmail also has sending limits, so if you’re emailing large batches in one run, you may need to spread them out across the day. For many small businesses, running 20–100 documents per batch is comfortable and reliable. If you expect bigger spikes, add batching delays and monitor failed rows so retries are clean.
Often, yes. n8n handles looping through rows, branching on “success,” and updating the source sheet without turning every extra step into another billable task. It’s also easier to keep a single end-to-end flow: generate PDF, store it, email it, log it. Zapier or Make can still be fine for very small volumes or simple two-step sends. If you’re unsure, Talk to an automation expert and sanity-check your use case.
Once this is running, your spreadsheet becomes the system: add rows, run the workflow, and trust the log. The repetitive work fades into the background, honestly the way it should have been all along.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.