Google Workspace: List files in a folder or matching a query

List files in a folder or matching a query.

Help Centre › Functions & Formulas

List files in a folder or matching a query.

Add it to a process

In the process designer, open the Add step tab. Find List files in a folder or matching a query under Google Workspace › Drive, or type its name in the search box, and drag it onto the canvas.

Fields

FieldRequiredWhat it does
QueryNoGoogle Drive search query to filter files
Folder idNoGoogle Drive ID of the folder to list files from
VariableNoName of the variable where the result will be stored

See all Google Workspace steps.

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

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.