Deprovision public access from new Google Drive files

Document/FileSales Enablement

What it does

When a new file or folder appears in a Google Drive folder hierarchy, this automation lists its permissions. It removes any permission where the type equals anyone so public access is never left behind.

Who it's for

Security teams who need to prevent accidental public sharing on Google Drive without manual review.

Apps used

How teams use this

Prevent accidental public file sharing

New files uploaded to a monitored folder are checked for public permissions and those permissions are removed automatically. The team avoids data exposure without changing how people upload files.

Log removed permissions for compliance

Extend this automation to record each removed permission to a spreadsheet so the team has a record of what was shared and when it was fixed. Add a step that writes the file name and permission details to a sheet.

Protect sensitive project folders

Point this automation at a folder where confidential projects live so any file added there is immediately checked and cleaned of public access. Only the folder path changes from the default setup.

How it works

  1. Detect a new file or folder. Monitor a Google Drive folder hierarchy for new files or folders so this automation runs as soon as something is added to the monitored location.
  2. List the file permissions. Retrieve all permissions on the new file in Google Drive so the automation can check whether anyone has access to it.
  3. Check each permission for public access. Loop through each permission and identify those where the type equals anyone, which means the file is shared publicly with unrestricted access.
  4. Remove public permissions. Delete each permission from Google Drive that allows anyone to access the file so only intended people retain access to it.