List Files
google_drive.list_files
ActionFiles & storageconnection required
Calls Drive files.list (trashed excluded, Shared Drives included) and pages until max_results is met.
List files in Google Drive, optionally filtered by a query, folder or drive.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Google Drive
- Secret shape
- {"client_id", "client_secret", "refresh_token"}
- Config it needs
- token_uri
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
query Drive q expression (e.g. name contains 'x'). | string | No | — | — | — |
folder_id Restrict to a folder's children. | string | No | — | — | — |
drive_id Restrict to one Shared Drive (its id, from the Drive URL). | string | No | — | — | — |
max_results How many files to return in total, 1-1000; the node pages to reach it. Ask for more and the rest arrives as next_page_token. | number | No | 50 | ≥ 1 | — |
order_by e.g. 'modifiedTime desc'. | string | No | — | — | — |
page_token Resume from a previous run's next_page_token. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"max_results": 50
}Output
One shape.
files
| Field | Type | Example |
|---|---|---|
files Matching files. | array | — |
files[].id The Drive file id. | string | — |
files[].name File name as shown in Drive. | string | — |
files[].mime_type Drive mime type; folders are application/vnd.google-apps.folder. | string | — |
files[].size Bytes, when known (Google-native docs report none). | number | — |
files[].modified_time RFC 3339 timestamp of the last content change. | string | — |
files[].web_view_link Open-in-Drive URL. | string | — |
files[].created_time RFC 3339 timestamp of creation. | string | — |
files[].trashed True when the file is in the bin — files.get returns it either way. | boolean | — |
files[].parents Ids of the folders holding this file. | array | — |
files[].icon_link Small icon URL for the file type. | string | — |
files[].web_content_link Direct download URL (binary files only). | string | — |
files[].description The file's description, when it has one. | string | — |
files[].shared True when the file is shared beyond its owner. | boolean | — |
files[].starred True when the user starred the file. | boolean | — |
files[].drive_id Shared Drive id, present only for shared-drive items. | string | — |
files[].md5_checksum MD5 of the content; use it to tell a changed file from a touched one. | string | — |
files[].file_extension Extension of the uploaded content, when any. | string | — |
files[].owners Owners as {display_name, email_address}. | array | — |
files[].last_modifying_user Who last changed it, as {display_name, email_address}. | object | — |
files[].shortcut_details For a shortcut: {target_id, target_mime_type}. | object | — |
count How many files this step returned. | number | — |
truncated True when the budget ran out with more files behind it. | boolean | — |
next_page_token Resume token for the next run; empty once the listing is complete. | string | — |
{
"count": 0,
"files": [
{
"created_time": "",
"description": "",
"drive_id": "",
"file_extension": "",
"icon_link": "",
"id": "",
"last_modifying_user": {},
"md5_checksum": "",
"mime_type": "",
"modified_time": "",
"name": "",
"owners": [],
"parents": [],
"shared": false,
"shortcut_details": {},
"size": 0,
"starred": false,
"trashed": false,
"web_content_link": "",
"web_view_link": ""
}
],
"next_page_token": "",
"truncated": false
}Related Google Drive nodes
See List Files run in a workflow.
In a technical demo we add the Google Drive connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.