Schedule Bulk PDF Exports to a Specific Drive Folder

When you automate PDF exports with Apps Script, you control where the output files are saved. Saving to a specific Drive folder keeps the PDFs organized and accessible to anyone who has access to that folder. This is useful for team workflows where everyone needs access to the latest PDF exports.

Specifying the destination folder in the script

Use DriveApp.getFolderById() with the destination folder's ID to get a reference to it. The folder ID is in the URL when you open the folder in Drive: the long string after '/folders/'. Pass this folder reference to the createFile() method when saving each PDF.

Creating dated subfolders automatically

For recurring exports, create a new subfolder in the destination folder each time the script runs. Use Utilities.formatDate(new Date(), Session.getScriptTimeZone(), 'yyyy-MM-dd') to get today's date as a string, then create a subfolder with that name. Each scheduled run produces its own dated subfolder.

Sharing the destination folder with the team

Set the sharing permissions on the destination folder to give your team access. New PDFs added by the script inherit the folder's sharing settings, so everyone with access sees the latest exports automatically.

Frequently Asked Questions

How do I find a Google Drive folder's ID?

Open the folder in Google Drive. The URL contains the folder ID after '/folders/'. It is a long alphanumeric string. Copy everything after that slash up to any '?view' parameter.

Can the script save to a shared drive folder?

Yes. Use DriveApp.getFolderById() with the shared drive folder ID. The script must be authorized by an account that has Contributor or Editor access to the destination folder.

Ready to Try It?

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

Install Free Extension