Save Converted PDFs to a Drive Folder Using Apps Script
Using Apps Script to save converted PDFs to a Drive folder gives you full control over where each PDF lands, what it is named, and when the conversion runs. It is the standard approach for Drive-to-Drive PDF workflows that need to be reliable and repeatable.
Basic Apps Script setup
Open script.google.com and create a new project. Write a function that gets the source folder with DriveApp.getFolderById('SOURCE_FOLDER_ID'), gets the target folder with DriveApp.getFolderById('TARGET_FOLDER_ID'), iterates over files in the source folder, checks for Google Workspace MIME types, exports each to PDF, and saves the blob to the target folder.
Key Apps Script methods for this workflow
Use DriveApp.getFolderById() to reference folders by ID. Use file.getBlob() combined with the Drive REST API export URL to get the PDF bytes. Use folder.createFile(name, blob, 'application/pdf') to save the PDF. Use DriveApp.getFilesByName() to check for existing versions if you want to overwrite.
Testing before automating
Run the script manually a few times before setting a trigger to confirm it converts the right files and saves them to the right folder. Check the execution log under Executions in the Apps Script sidebar. Fix any errors before adding automation.
Frequently Asked Questions
Do I need Apps Script editor access to set this up?
Yes. Apps Script is accessed at script.google.com and requires a Google account. No special permissions beyond standard Drive access are needed for basic file operations.
Ready to Try It?
Install the free Chrome extension and start converting your Google Docs to PDF in one click.
Install Free Extension