Google Drive - Search files or folders action

This action retrieves a list of files or folders that match your search criteria.

Google Drive Search files or folders action Google Drive Search files or folders action

Input

Input fieldDescription
Files or foldersSelect whether to search for files or folders.
FolderNarrow down the search to within this folder. Does not include matching files and folders in subfolders. Leave blank to search through My Drive.
NameSearch for files or folders whose names partially match the given name.
Modified afterSearch for files modified after this date.
Trashed files?Set to Yes to search for files that have been trashed.
Starred files?Set to Yes to search for files that have been starred.
Owner emailSearch for files or folders belonging to this user.
Writer emailSearch for files or folders that this user has permissions to edit.
Reader emailSearch for files or folders that this user has permissions to read.
Shared with me?Search for files or folders shared with the connected user.
QueryFilter the search results by an exact query. Refer to the Google Drive documentation for the supported syntax. To filter by Name, Modified after, Trashed files?, Starred files?, Owner email, Writer email, Reader email, and/or Shared with me?, you can use the Query field with the appropriate syntax, or you can use the preceding fields in this table, but not both. Adding any entry twice will lead to query errors. For example, if you enter the Name field, do not enter a name query.
Next page tokenSpecify the nextPageToken from a previous search request to retrieve the next page of search results.
Page sizeThe maximum number of files or folders to return per page. Partial or empty result pages are possible even before the end of the files list has been reached. Acceptable values are 1 to 100, inclusive. Default is 100.

Output

Note that in Google Drive API, the terms folder and file are used interchangeably. A folder is technically a special file. As a result, whenever the field name or field description mentions file, it also applies to folder.

Output fieldDescription
Next page tokenSpecify this token in the Next page token field to retrieve the next page of search results.
Incomplete searchIndicates whether the search is incomplete.
FilesList of files or folders found from the search. Each file/folder contains the following output fields, in addition to List size and List index:
  • ID: ID of the file.
  • Name: Name of the file or folder.
  • MIME type: MIME type of this file, as stated in Google Drive's documentation.
  • Description: A short description of the file.
  • Starred: Whether the user has starred the file.
  • Trashed: Indicates whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash.
  • Explicitly trashed: Indicates whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder (for example, when you trash an entire parent folder).
ParentsThe list of the parent folders that contain the file. Each parent folder in the list contains the following output field, in addition to List size and List index:
  • ID: The ID of the parent folder containing the file.
VersionA version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
Web content linkA link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
Web view linkA link for opening the file in a relevant Google editor or viewer in a browser.
Icon linkA static, unauthenticated link to the file's icon.
Thumbnail linkA short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
Viewed by meIndicates whether the file has been viewed by this user.
Viewed by me timeThe last time the file was viewed by this user (RFC 3339 date-time).
Created timeThe time at which the file was created (RFC 3339 date-time).
Modified timeThe last time the file was modified by anyone (RFC 3339 date-time).
Modified by me timeThe last time the file was modified by this user (RFC 3339 date-time).
Sharing userThe user who shared the file with the requesting user, if applicable. Each user contains the following output fields:
  • Display name: A plain text displayable name for this user.
  • Email address: The email address of the user.
  • Permission ID: The user's ID as visible in Permission resources.
  • Photo link: A link to the user's profile photo, if available.
  • Me: Indicates whether this user is the requesting user.
OwnersThe list of owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for shared drive files. Each owner contains the following fields, in addition to List size and List index:
  • Display name: A plain text displayable name for this user.
  • Email address: The email address of the user.
  • Permission ID: The user's ID as visible in Permission resources.
  • Photo link: A link to the user's profile photo, if available.
  • Me: Indicates whether this user is the requesting user.
SharedIndicates whether the file has been shared. Not populated for shared drive files.
Owned by meIndicates whether the user owns the file. Not populated for shared drive files.
Viewers can copy contentIndicates whether users with View access can copy the file contents.
Writers can shareIndicates whether users with Edit access can share the file. Not populated for shared drive files.
Original filenameThe original filename of the file if available, or else the original value of the name field. This is only available for files with binary content in Google Drive.
Full file extensionThe full file extension extracted from the name field. May contain multiple concatenated extensions (for example, tar.gz). This is only available for files with binary content in Google Drive. It is automatically updated when the name field changes, but it is not cleared if the new name doesn't contain a valid extension.
File extension The final component of the full file extension (for example, gz). This is only available for files with binary content in Google Drive.
MD5 checksumThe MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
SizeThe size of the file's content in bytes. This is only applicable to files with binary content in Google Drive.
Quota bytes usedThe number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with Keep Forever enabled.
Head revision IDThe ID of the file's most current version. This is currently only available for files with binary content in Google Drive.

Last updated: