Apps Script PDF Conversion Across Multiple Users

In a team setting, you may need to convert documents owned by different users or save PDFs to folders in multiple people's drives. Apps Script handles this through service accounts, delegated access, and shared drives.

Using a shared drive for multi-user workflows

The simplest multi-user setup puts all source documents and output folders in a shared drive. Every team member with Contributor access can add documents, and the script, run by an admin account, processes everything in the shared drive without needing access to individual users' personal drives.

Running the script as a service account

For Workspace organizations, a service account with domain-wide delegation can impersonate any user and access their Drive. This is a more complex setup requiring an admin to configure OAuth scopes, but it enables a central script to process documents across the entire organization.

Distributing the script to team members

An alternative approach: publish the script as a library and let each team member add it to their own Apps Script project. Each person authorizes the library with their own credentials and runs it against their own files. This avoids delegated access complexity at the cost of each user needing to set up their own trigger.

Frequently Asked Questions

Can a script convert documents it does not own?

Yes, if the account running the script has at least Viewer access to the documents. Access through shared drives or direct file sharing both work.

Does each user need to authorize the script separately?

If you deploy the script as a web app that runs as you (the script owner), users do not need to authorize it. If each user runs the script themselves, each one authorizes it with their own account.

Ready to Try It?

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

Install Free Extension