Data & Research

List all files in GDrive

Add to my workflows

Search for the spreadsheet by name.
If the spreadsheet does not exist:
  1. Copy an example spreadsheet to create a new one.
Otherwise, use the existing spreadsheet.
Define a nested function `_list_files_in_folder` to:
  1. List files in the specified folder.
  2. For each file, create a object with its metadata.
  3. If the file is a folder, recursively list its contents.
List all files in the specified folder and its subfolders.
For each file in the list:
  1. If the file is not a folder, Insert the file information into the spreadsheet.
Report that the files have been listed and the spreadsheet has been updated.

Add to my workflows

Discover more