Generate a PDF from a Google Docs template and email it or send via PandaDoc using Make.com; exact modules, field mappings, and idempotent logging included.
Introduction
If you need to generate a PDF from a Google Docs template and email it automatically, this guide shows the exact Make.com modules and mappings to use. The manual process of copying templates, replacing text, exporting, and emailing creates errors and no audit trail.
You will build a Make.com scenario that creates a document from a Google Docs template, replaces placeholders, exports a PDF, optionally sends it to PandaDoc for signature, and emails the PDF using Gmail. By the end you will have a production-ready flow with idempotency and logging.
What You'll Need
- Make.com account with connections for Google Docs, Google Drive, PandaDoc, Gmail, and Google Sheets (paid Make.com plan recommended for production)
- A Google Docs template in Google Drive using clear placeholders like {{CLIENT_NAME}} and {{DOC_DATE}}
- PandaDoc account if you require e-signatures (PandaDoc API access requires a paid plan)
- Gmail account authorised in Make.com to send messages
- (Optional) Google Sheets spreadsheet to log sent documents and prevent duplicates
- Service account or least-privilege credentials recommended for Google APIs
How It Works (The Logic)
Trigger (webhook, Google Sheets new row, or form submission) → normalize input data → Google Docs copy template → replace placeholders → export as PDF → optional PandaDoc create/send → Gmail send with PDF attachment → log to Google Sheets.
This keeps the template immutable, creates a traceable file per submission, and avoids duplicate sends by checking a log.
Step-by-Step Setup
- Choose and configure the trigger
- Common triggers: Webhook: New Form Submission, Google Sheets: New Row. Name the module: "TRIGGER: New submission".
- Capture submission_id, client_name, client_email, doc_date, amount, and job_ref.
Gotcha: validate client_email early and fail the scenario if the address is malformed.
- Normalize inputs
- Add Tools: Formatter or Tools: Set multiple variables, name it "DATA: Normalize inputs".
- Actions to perform: trim whitespace, format doc_date to ISO using formatDate(), format amount to two decimals.
- Build a single payload object for downstream mapping.
- Copy the Google Docs template
- Module: Google Docs: Copy document from template.
- Step name: "DOCS: Copy template to new doc".
- New document name should include submission_id, for example: "Proposal - {{job_ref}} - {{submission_id}}".
Reason: keeping the template unchanged and using a copy provides a stable document ID for replacement and export.
- Replace placeholders in the new document
- Module: Google Docs: Replace text in document (called Replace all text in some connectors).
- Step name: "DOCS: Replace placeholders".
- Map tokens exactly, e.g.:
- {{CLIENT_NAME}} → payload.client_name
- {{DOC_DATE}} → payload.doc_date
- {{AMOUNT}} → payload.amount
- {{JOB_REF}} → payload.job_ref
Tip: test with one placeholder first to confirm the module behaves as expected.
- Export the document as a PDF
- Module: Google Drive: Export a file or Google Docs: Export file (PDF).
- Step name: "PDF: Export as PDF".
- Input: document ID from the copy step, format PDF. Output is a file object/binary for attachments.
Gotcha: confirm the connector returns a file object compatible with the Gmail module. If it returns a binary buffer, pass it directly into the Gmail attachment field with a filename like "{{job_ref}}.pdf".
- Optional: Create and send a PandaDoc document for signature
If signatures are required, add these modules:
- PandaDoc: Create document from PDF, step name "PANDADOC: Create doc from PDF". Map recipient email, recipient role, and attach the PDF.
- PandaDoc: Send document for signature, step name "PANDADOC: Send for signature".
- Capture the PandaDoc document ID for logging.
Gotcha: PandaDoc API expects recipients as a structured array with role and email fields. Map exactly as the connector requires. Register PandaDoc webhooks if you need signed-status callbacks.
- Send the PDF via Gmail
- Module: Gmail: Send an email, step name "EMAIL: Gmail send with PDF".
- To: payload.client_email. Subject should include submission_id for idempotency, for example: "Proposal {{job_ref}} (ref {{submission_id}})".
- Body: short friendly message and the dynamic fields. Attach the PDF from the PDF export module. If you used PandaDoc and prefer sending the signing link, include the PandaDoc public link instead of attaching the PDF.
Gotcha: Gmail has daily sending limits and attachment size limits. For higher volume use a transactional email provider.
- Log the transaction and enforce idempotency
- Before heavy steps, add Google Sheets: Search rows to check if submission_id already exists in your log sheet.
- If not found, proceed. After sending, add Google Sheets: Add row, step name "LOG: Append sent record", logging submission_id, timestamp, doc_id, pdf_filename, panda_doc_id, and email_sent = true.
Performance tip: for bulk scenarios, pull the log sheet into an array once and perform in-scenario lookups to avoid many small API calls.
- Add error handling
- Add a Router branch for errors, step name "ERROR: Notify ops".
- On error send a brief Gmail to the ops address and append an error row to the log sheet. Configure scenario retries with exponential backoff for transient Google API errors.
- Test end-to-end
- Run with a real test submission. Confirm placeholders are replaced, the PDF downloads, PandaDoc shows the document when used, and the email contains the correct attachment or link. Verify the log row appears and contains IDs.
Real-World Business Scenario
A recruitment firm used this flow to generate candidate offer letters. Candidate data is written to a Google Sheet. Make.com copies the offer letter template, fills candidate details, exports the PDF, sends it via PandaDoc for signature, and emails the signed copy to the candidate. The automation reduced manual preparation time from 20 minutes to under 2 minutes per offer and created an auditable log in Google Sheets.
We implemented a similar pattern for a services client who needed both immediate delivery and a signed copy. The PandaDoc branch handled signatures while the Gmail branch was a fallback when PandaDoc API calls timed out.
Common Variations
- Skip PandaDoc and attach the PDF directly in Gmail when signatures are not required.
- Upload the PDF to a secured Google Drive folder and email a time-limited link instead of attaching large files.
- Replace Gmail with a transactional provider such as SendGrid or Postmark when deliverability and volume require it.
Additional resources you can combine with this flow include form-to-CRM capture and booking-driven document generation. For lead capture before document generation see our Typeform to HubSpot guide: How to Connect Typeform to HubSpot and Auto-Create New Leads Using Make.com. If you trigger document generation from calendar events, our Calendly to ClickUp guide is relevant: How to Create ClickUp Tasks from Calendly Bookings Using Make.com and Slack. For reporting and logging examples see our Airtable digest pattern: How to Send a Daily Airtable Status Digest to Gmail Using Make.com.
Next steps for help
You now have a clear Make.com architecture for generating PDFs from Google Docs templates, optionally routing through PandaDoc, and emailing via Gmail with logging and idempotency built in. If you want implementation support for templates, webhook reliability, or PandaDoc webhook wiring, Olmec Dynamics builds these automations for real businesses. See what we do at https://olmecdynamics.com.