IntegrationsGoogle workspaceActions
List Google Drive files
List Drive file metadata the connected principal can access. Never returns file content. Optional q is passed only to Drive and is capped at 1,024 characters.
drive.files.list · Google Workspace · v1
Details
Scopes
https://www.googleapis.com/auth/drive.metadata.readonly
Input
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
page_size | integer | No | minimum 1; maximum 100 |
page_token | string | No | minLength 1; maxLength 512 |
q | string | No | maxLength 1024 |
spaces | string | No | enum drive | appDataFolder |
corpora | string | No | enum user | drive |
drive_id | string | No | minLength 1; maxLength 256 |
order_by | string | No | enum modifiedTime desc | name | name_natural |
Output
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
files | array<object> | Yes | maxItems 100 |
files[] | object | Yes | additionalProperties false |
files[].id | string | Yes | minLength 1; maxLength 256 |
files[].name | string | Yes | maxLength 512 |
files[].mime_type | string | Yes | maxLength 256 |
files[].parents | array<string> | No | maxItems 20 |
files[].parents[] | string | Yes | maxLength 256 |
files[].drive_id | string | No | maxLength 256 |
files[].web_view_url | string | No | maxLength 2048 |
files[].created_at | string | No | maxLength 64 |
files[].updated_at | string | No | maxLength 64 |
files[].trashed | boolean | No | — |
files[].revision | string | No | maxLength 64 |
files[].size_bytes | string | No | maxLength 32 |
files[].client_side_encrypted | boolean | Yes | — |
next_page_token | string | No | maxLength 512 |
Raw schema
Input
{
"type": "object",
"additionalProperties": false,
"properties": {
"page_size": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"page_token": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"q": {
"type": "string",
"maxLength": 1024
},
"spaces": {
"type": "string",
"enum": [
"drive",
"appDataFolder"
]
},
"corpora": {
"type": "string",
"enum": [
"user",
"drive"
]
},
"drive_id": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"order_by": {
"type": "string",
"enum": [
"modifiedTime desc",
"name",
"name_natural"
]
}
}
}Output
{
"type": "object",
"additionalProperties": false,
"properties": {
"files": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"name": {
"type": "string",
"maxLength": 512
},
"mime_type": {
"type": "string",
"maxLength": 256
},
"parents": {
"type": "array",
"items": {
"type": "string",
"maxLength": 256
},
"maxItems": 20
},
"drive_id": {
"type": "string",
"maxLength": 256
},
"web_view_url": {
"type": "string",
"maxLength": 2048
},
"created_at": {
"type": "string",
"maxLength": 64
},
"updated_at": {
"type": "string",
"maxLength": 64
},
"trashed": {
"type": "boolean"
},
"revision": {
"type": "string",
"maxLength": 64
},
"size_bytes": {
"type": "string",
"maxLength": 32
},
"client_side_encrypted": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"mime_type",
"client_side_encrypted"
]
},
"maxItems": 100
},
"next_page_token": {
"type": "string",
"maxLength": 512
}
},
"required": [
"files"
]
}