Google Drive List files function

The Google Drive List files function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Google Drive functionality to list files.

For a full list of available functions, please read Google Drive functions.


Description

The Google Drive List files function lists all files in a folder or matching a query. Pagination is handled automatically to return all results.


Setting it up

To use the Google Drive List files function, follow these instructions:

{{popups:rpas/add:action=google-workspace-drive-list-files}}

Once on a process map:

  1. Navigate to the process where you would like to add the Google Drive List files function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the Google Drive List files option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
Folder IDNoTextEntire DriveFolder ID to list files from
Query filterNoText-Custom Drive API query filter (e.g. "mimeType = 'application/pdf'")
VariableNoText-State variable to store the list of file dictionaries

Output variables

VariableTypeDescription
VariableListList of file objects with id, name, mimeType, and size

Errors

ErrorDescription
Folder not foundThe specified folder ID does not exist
Invalid queryThe query filter syntax is invalid

Tips

  • Use the query filter for advanced filtering, e.g. "mimeType = 'application/pdf'" for PDF files only
  • Without a folder ID, all files in the Drive are returned
  • Use with a loop to process each file in the list

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.