Script to find all files within a Google Drive Folder or Shared Drive and outputs file name, date modified, date created, file URL and parent folder URL into a Google Sheet for auditing or review purposes.
- Create new project
- Enable Drive and Sheets APIs in "APIs and services"
- Go to "Credentials" and create a new Service Account
- Enter service account and create new key, download JSON key file
- Clone Repository
pip3 install -r requirements.txt
- Add the service account as viewer to Google Drive Folder/Shared Drive. Note: Drive ID is used when running the script.
- Add the service account as editor to Google Sheet for audit output. Note: Sheet ID is used when running the script.
- Run the tool
$ python3 main.py -h
$ python3 main.py <credentials.json> <drive_id> <sheet_id>
- Information will be logged into the specified Google Sheet.