younifyd
Menu

Drive.files.list

Lists or searches files.

GET/files

Use it in a workflow

  1. Add a step and choose the Google Drive connector.
  2. Pick the Drive.files.list action (under files).
  3. Fill in the fields below, then reference the result from later steps as {{driveFilesList.response.data}}.

Request

Query parameters

altstring

Data format for the response.

One ofjson

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

userIpstring

Deprecated. Please use quotaUser instead.

corporastring

Groupings of files to which the query applies. Supported groupings are: 'user' (files created by, opened by, or shared directly with the user), 'drive' (files in the specified shared drive as indicated by the 'driveId'), 'domain' (files shared to the user's domain), and 'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). When able, use 'user' or 'drive', instead of 'allDrives', for efficiency.

corpusstring

The source of files to list. Deprecated: use 'corpora' instead.

One ofdomainuser

driveIdstring

ID of the shared drive to search.

includeItemsFromAllDrivesboolean

Whether both My Drive and shared drive items should be included in results.

includeLabelsstring

A comma-separated list of IDs of labels to include in the labelInfo part of the response.

includePermissionsForViewstring

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

includeTeamDriveItemsboolean

Deprecated use includeItemsFromAllDrives instead.

orderBystring

A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.

pageSizeinteger

The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.

pageTokenstring

The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.

qstring

A query for filtering the file results. See the "Search for Files" guide for supported syntax.

spacesstring

A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.

supportsAllDrivesboolean

Whether the requesting application supports both My Drives and shared drives.

supportsTeamDrivesboolean

Deprecated use supportsAllDrives instead.

teamDriveIdstring

Deprecated use driveId instead.

Response

Returns 200 with an object. Read it in later steps with {{driveFilesList.response.data.<field>}}.

filesarray<object>

The list of files. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.

appPropertiesobject

A collection of arbitrary key-value pairs that are private to the requesting app. Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with an OAuth 2 client ID. You cannot use an API key to retrieve private properties.

capabilitiesobject38 fields

Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user can take.

contentHintsobject2 fields

Additional information about the content of the file. These fields are never populated in responses.

contentRestrictionsarray<object>5 fields

Restrictions for accessing the content of the file. Only populated if such a restriction exists.

copyRequiresWriterPermissionboolean

Whether the options to copy, print, or download this file, should be disabled for readers and commenters.

createdTimestring (date-time)

The time at which the file was created (RFC 3339 date-time).

descriptionstring

A short description of the file.

driveIdstring

ID of the shared drive the file resides in. Only populated for items in shared drives.

explicitlyTrashedboolean

Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.

exportLinksobject

Links for exporting Docs Editors files to specific formats.

fileExtensionstring

The final component of fullFileExtension. This is only available for files with binary content in Google Drive.

folderColorRgbstring

The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. If an unsupported color is specified, the closest color in the palette will be used instead.

fullFileExtensionstring

The full file extension extracted from the name field. Can contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. This is automatically updated when the name field changes, however it's not cleared if the new name does not contain a valid extension.

hasAugmentedPermissionsboolean

Whether there are permissions directly on this file. This field is only populated for items in shared drives.

hasThumbnailboolean

Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.

headRevisionIdstring

The ID of the file's head revision. This is only available for files with binary content in Google Drive.

iconLinkstring

A static, unauthenticated link to the file's icon.

idstring

The ID of the file.

imageMediaMetadataobject21 fields

Additional metadata about image media, if available.

isAppAuthorizedboolean

Whether the requesting app created or opened the file.

kindstring

Identifies what kind of resource this is. Value: the fixed string "drive#file".

Default "drive#file"

labelInfoobject1 fields

An overview of the labels on the file.

lastModifyingUserobject6 fields

Information about a Drive user.

linkShareMetadataobject2 fields

Contains details about the link URLs that clients are using to refer to this item.

md5Checksumstring

The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.

mimeTypestring

The MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.

modifiedByMeboolean

Whether this user has modified the file.

modifiedByMeTimestring (date-time)

The last time the user modified the file (RFC 3339 date-time).

modifiedTimestring (date-time)

The last time anyone modified the file (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user.

namestring

The name of the file. This isn't necessarily unique within a folder. Note that for immutable items such as the top-level folders of shared drives, My Drive root folder, and Application Data folder the name is constant.

originalFilenamestring

The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.

ownedByMeboolean

Whether the user owns the file. Not populated for items in shared drives.

ownersarray<object>6 fields

The owner of this file. Only certain legacy files might have more than one owner. This field isn't populated for items in shared drives.

parentsarray<string>

The IDs of the parent folders that contain the file. If not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list.

permissionIdsarray<string>

List of permission IDs for users with access to this file.

permissionsarray<object>15 fields

The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.

propertiesobject

A collection of arbitrary key-value pairs that are visible to all apps. Entries with null values are cleared in update and copy requests.

quotaBytesUsedstring (int64)

The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.

resourceKeystring

A key needed to access the item via a shared link.

sha1Checksumstring

The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.

incompleteSearchboolean

Whether the search process was incomplete. If true, then some search results may be missing, since all documents were not searched. This may occur when searching multiple drives with the "allDrives" corpora, but all corpora could not be searched. When this happens, it is suggested that clients narrow their query by choosing a different corpus such as "user" or "drive".

kindstring

Identifies what kind of resource this is. Value: the fixed string "drive#fileList".

Default "drive#fileList"

nextPageTokenstring

The page token for the next page of files. This will be absent if the end of the files list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.

json
{
  "files": [
    {
      "appProperties": {},
      "capabilities": {
        "canAcceptOwnership": false,
        "canAddChildren": false,
        "canAddFolderFromAnotherDrive": false,
        "canAddMyDriveParent": false,
        "canChangeCopyRequiresWriterPermission": false,
        "canChangeSecurityUpdateEnabled": false,
        "canChangeViewersCanCopyContent": false,
        "canComment": false,
        "canCopy": false,
        "canDelete": false,
        "canDeleteChildren": false,
        "canDownload": false
      },
      "contentHints": {
        "indexableText": "string",
        "thumbnail": {
          "image": "string",
          "mimeType": "string"
        }
      },
      "contentRestrictions": [
        {
          "readOnly": false,
          "reason": "string",
          "restrictingUser": {
            "displayName": "string",
            "emailAddress": "string",
            "kind": "drive#user",
            "me": false,
            "permissionId": "string",
            "photoLink": "string"
          },
          "restrictionTime": "2025-01-01T00:00:00Z",
          "type": "string"
        }
      ],
      "copyRequiresWriterPermission": false,
      "createdTime": "2025-01-01T00:00:00Z",
      "description": "string",
      "driveId": "string",
      "explicitlyTrashed": false,
      "exportLinks": {},
      "fileExtension": "string",
      "folderColorRgb": "string"
    }
  ],
  "incompleteSearch": false,
  "kind": "drive#fileList",
  "nextPageToken": "string"
}

Need more? See the Google Drive guide for connection setup and behaviour shared by every action.

Drive.files.list — Google Drive — Documentation