List files in Google Drive.

Parameters:
See dedicated page for more information.
See dedicated page for more information.
Query Google Drive (your “My Drive” or a Shared Drive) and return a tidy table of files with names, paths, sizes, MIME types, timestamps, and IDs you can reuse in downstream actions (download, move, delete, etc.).
Each run outputs rows like:
FilePath but guaranteed to end with an extension if one can be inferred..docx) or empty if none.-1; folders show null).image/jpeg, application/pdf, application/vnd.google-apps.folder, application/vnd.google-apps.document, …Drive to list
Choose my drive or a specific Shared Drive (if your connector exposes them).
Path to the folder to list
Use / for the root of the selected drive or a subfolder like /Reports/2025.
If the folder doesn’t exist, behavior is controlled by If the folder to list is not found.
Recursive mode
Off = only the specified folder. On = walk all subfolders.
If the folder to list is not found
abort (default) or continue with a warning.
Client id / Client secret
From your Google Cloud OAuth 2.0 Client (Web application).
Refresh token
The long-lived token you’ll mint once (see setup below).
Debug information level
Optional: extra parameters for cURL
Advanced (e.g., -sS --fail-with-body -H "Accept: application/json" --max-time 30).
Number of retries on connection error
Retries transient network errors.
If you saw “Error 400: redirect_uri_mismatch” earlier, this section fixes it.
Create an OAuth client
https://developers.google.com/oauthplaygroundredirect_uri_mismatch.)Enable the Drive API
Mint a Refresh Token (using OAuth 2.0 Playground)
Open OAuth 2.0 Playground → gear icon → Use your own OAuth credentials → paste your Client ID/Secret.
Set Access type = Offline, Force prompt = Consent Screen (so you get a refresh token).
In Step 1, add scopes (for listing metadata you can use the minimal one):
https://www.googleapis.com/auth/drive.metadata.readonly
(See full scope matrix below for uploads/edits/deletes.)
Click Authorize APIs, choose your Google account, accept the consent.
In Step 2, click Exchange authorization code for tokens → copy the refresh_token value.
Paste into the action
| What you want to do | Recommended scope |
|---|---|
| List metadata (names, ids, mimeType, size, timestamps) | https://www.googleapis.com/auth/drive.metadata.readonly |
| List metadata + download file content you can access | https://www.googleapis.com/auth/drive.readonly |
| Upload new files / update files you created with this app (no full-drive takeover) | https://www.googleapis.com/auth/drive.file |
| Full access to all Drive files you can see (create, update, move, delete, share) | https://www.googleapis.com/auth/drive |
| App Data folder only | https://www.googleapis.com/auth/drive.appdata |
For GDriveListFiles specifically,
drive.metadata.readonlyis enough. If you plan to download file content later in the same project, considerdrive.readonly.
application/vnd.google-apps.document..docx).
400 redirect_uri_mismatch
Add https://developers.google.com/oauthplayground to the OAuth client’s Authorized redirect URIs (exact match), then re-authorize in the Playground.
Empty table but “pipeline successful”
/ first.drive.metadata.readonly or drive.readonly.Some rows missing
If you’ve just created files in the same run, a preview may warn: “some records may be partial”. Re-run or ensure the listing happens after upstream writes finish.
Shared Drive not visible
Ensure the service account / user has access and that your action supports selecting that drive.
