Auto-Generate PDFs on Document Approval

In approval workflows, the PDF version of a document is the official record. Automating its creation on approval removes the manual step and ensures the PDF is always generated at the right moment.

Using a Google Sheet as an approval tracker

A common pattern: track document status in a Google Sheet with columns for document ID, status, and approver. Write an onEdit trigger on the Sheet that fires when the status cell changes to 'Approved'. The trigger reads the document ID and calls the PDF conversion function. The PDF is the official approved version.

Using a form submission as the trigger

An approval form submitted via Google Forms can trigger PDF conversion through an onFormSubmit trigger. When the approver submits the form with the document ID and their approval, the script converts the document and saves the PDF to the official records folder.

Locking the document after conversion

After generating the approval PDF, set the source Google Doc to View-only using the Drive permissions API to prevent further edits. This makes the PDF the definitive version and prevents the document from drifting after approval.

Frequently Asked Questions

Can I automate an email with the approval PDF attached?

Yes. After the PDF is created, call MailApp.sendEmail() with the PDF blob attached. Send it to the document owner, the approver, and any other stakeholders.

Ready to Try It?

Install the free Chrome extension and start converting your Google Docs to PDF in one click.

Install Free Extension