Skip to main content

Google Drive

This Integration is part of the Google Drive Pack.#

Google Drive allows users to store files on their servers, synchronize files across devices, and share files. This integration helps you to create a new drive, query past activity, and view change logs performed by the users. This integration was integrated and tested with version 1.31.0 of GoogleDrive

Configure Google Drive on Cortex XSOAR#

  1. Navigate to Settings > Integrations > Servers & Services.

  2. Search for Google Drive.

  3. Click Add instance to create and configure a new integration instance.

    ParameterDescriptionRequired
    User's Service Account JSONFalse
    User IDThe primary email address of the user to fetch the incident(s).False
    User IDFalse
    User's Service Account JSONFalse
    Action Detail Case IncludeAction types to include for fetching the incident.False
    Drive Item Search FielditemName - Fetch activities for this drive item. The format is "items/ITEM_ID". folderName - Fetch activities for this drive folder and all children and descendants. The format is "items/ITEM_ID".False
    Drive Item Search ValueitemName or folderName for fetching the incident.False
    Fetch incidentsFalse
    Incident typeFalse
    Max IncidentsThe maximum number of incidents to fetch each time.False
    First Fetch Time IntervalThe time range to consider for the initial data fetch in the format <number> <unit> e.g., 1 hour, 2 hours, 6 hours, 12 hours, 24 hours, 48 hours.False
    Trust any certificate (not secure)False
    Use system proxy settingsFalse
  4. Click Test to validate the URLs, token, and connection.

Commands#

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

google-drive-create#


Deprecated. Use the google-drive-drive-create command instead.

google-drive-drive-create#


Creates a new Team Drive. The name argument specifies the name of the Team Drive. The specified user will be the first organizer. This shared drive/team drive feature is available only with G Suite Enterprise, Enterprise for Education, G Suite Essentials, Business, Education, and Nonprofits edition.

Base Command#

google-drive-drive-create

Input#

Argument NameDescriptionRequired
user_idThe user's primary email address.Optional
nameThe name of this shared drive.Required
hiddenWhether the shared drive is hidden from the default view. Possible values: "True" and "False". Possible values are: True, False.Optional

Context Output#

PathTypeDescription
GoogleDrive.Drive.kindStringIdentifies what kind of resource this is.
GoogleDrive.Drive.idStringThe ID of the shared drive which is also the ID of the top level folder of the shared drive.
GoogleDrive.Drive.nameStringThe name of the shared drive.
GoogleDrive.Drive.hiddenBooleanWhether the shared drive is hidden from the default view.

google-drive-changes-list#


Lists the changes for a user or shared drive.

Base Command#

google-drive-changes-list

Input#

Argument NameDescriptionRequired
page_tokenThe token for continuing a previous list request on the next page.Required
user_idThe user's primary email address.Optional
drive_idThe shared drive from which changes are returned. Can be retrieved using the google-drive-drives-list command.Optional
include_corpus_removalsWhether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional
include_items_from_all_drivesWhether both My Drive and shared drive items should be included in the results. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional
include_permissions_for_viewSpecifies which additional view's permissions to include in the response. Only 'published' is supported.Optional
include_removedWhether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. Possible values: "true" and "false". Possible values are: true, false. Default is true.Optional
page_sizeThe maximum number of changes to return per page. Acceptable values are 1 to 1000, inclusive. Default is 100.Optional
restrict_to_my_driveWhether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional
spacesA comma-separated list of spaces to query within the user corpus. Possible values are 'drive', 'appDataFolder', and 'photos'.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional
fieldsThe paths of the fields you want to include in the response. Possible values are: "basic" (the response will include a default set of fields specific to this method) and "advance" (you can use the value * to return all the fields). Possible values are: basic, advance. Default is basic.Optional

Context Output#

PathTypeDescription
GoogleDrive.PageToken.DriveChange.nextPageTokenStringThe page token for the next page of changes.
GoogleDrive.PageToken.DriveChange.newStartPageTokenStringThe starting page token for future changes.
GoogleDrive.PageToken.DriveChange.driveIdStringThe ID of the shared drive associated with this change.
GoogleDrive.PageToken.DriveChange.userIdStringThe user's primary email address.
GoogleDrive.DriveChange.userIdStringThe user's primary email address.
GoogleDrive.DriveChange.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.changeTypeStringThe type of the change. Possible values are "file" and "drive".
GoogleDrive.DriveChange.timeDateThe time of this change (RFC 3339 date-time).
GoogleDrive.DriveChange.removedBooleanWhether the file or shared drive has been removed from this list of changes, for example by deletion or loss of access.
GoogleDrive.DriveChange.fileIdStringThe ID of the file which has changed.
GoogleDrive.DriveChange.driveIdStringThe ID of the shared drive associated with this change.
GoogleDrive.DriveChange.file.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.idStringThe ID of the file.
GoogleDrive.DriveChange.file.nameStringThe name of the file.
GoogleDrive.DriveChange.file.mimeTypeStringThe MIME type of the file.
GoogleDrive.DriveChange.file.descriptionStringA short description of the file.
GoogleDrive.DriveChange.file.starredBooleanWhether the user has starred the file.
GoogleDrive.DriveChange.file.trashedBooleanWhether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file.
GoogleDrive.DriveChange.file.explicitlyTrashedBooleanWhether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
GoogleDrive.DriveChange.file.trashingUser.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.trashingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.trashingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.trashingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.trashingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.trashingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.trashedTimeDateThe time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
GoogleDrive.DriveChange.file.parentsUnknownThe IDs of the parent folders which contain the file.
GoogleDrive.DriveChange.file.propertiesUnknownA collection of arbitrary key-value pairs which are visible to all apps.
GoogleDrive.DriveChange.file.appPropertiesUnknownA collection of arbitrary key-value pairs which are private to the requesting app.
GoogleDrive.DriveChange.file.spacesUnknownThe list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.
GoogleDrive.DriveChange.file.versionNumberA monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
GoogleDrive.DriveChange.file.webContentLinkStringA link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
GoogleDrive.DriveChange.file.webViewLinkStringA link for opening the file in a relevant Google editor or viewer in a browser.
GoogleDrive.DriveChange.file.iconLinkStringA static, unauthenticated link to the file's icon.
GoogleDrive.DriveChange.file.hasThumbnailBooleanWhether this file has a thumbnail.
GoogleDrive.DriveChange.file.thumbnailLinkStringA short-lived link to the file's thumbnail, if available.
GoogleDrive.DriveChange.file.thumbnailVersionNumberThe thumbnail version for use in thumbnail cache invalidation.
GoogleDrive.DriveChange.file.viewedByMeBooleanWhether the file has been viewed by this user.
GoogleDrive.DriveChange.file.viewedByMeTimeDateThe last time the file was viewed by the user (RFC 3339 date-time).
GoogleDrive.DriveChange.file.createdTimeDateThe time at which the file was created (RFC 3339 date-time).
GoogleDrive.DriveChange.file.modifiedTimeDateThe last time the file was modified by anyone (RFC 3339 date-time).
GoogleDrive.DriveChange.file.modifiedByMeTimeDateThe last time the file was modified by the user (RFC 3339 date-time).
GoogleDrive.DriveChange.file.modifiedByMeBooleanWhether the file has been modified by the user.
GoogleDrive.DriveChange.file.sharedWithMeTimeDateThe time at which the file was shared with the user, if applicable (RFC 3339 date-time).
GoogleDrive.DriveChange.file.sharingUser.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.sharingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.sharingUser.photoLinkDateA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.sharingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.sharingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.sharingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.owners.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.owners.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.owners.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.owners.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.owners.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.owners.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.driveIdStringID of the shared drive the file resides in. Only populated for items in shared drives.
GoogleDrive.DriveChange.file.lastModifyingUser.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.lastModifyingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.lastModifyingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.lastModifyingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.lastModifyingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.lastModifyingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.sharedBooleanWhether the file has been shared. Not populated for items in shared drives.
GoogleDrive.DriveChange.file.ownedByMeBooleanWhether the user owns the file. Not populated for items in shared drives.
GoogleDrive.DriveChange.file.capabilities.canAddChildrenBooleanWhether the current user can add children to this folder. This is always false when the item is not a folder.
GoogleDrive.DriveChange.file.capabilities.canAddFolderFromAnotherDriveBooleanWhether the current user can add a folder from another drive (different shared drive or My Drive) to this folder.
GoogleDrive.DriveChange.file.capabilities.canAddMyDriveParentBooleanWhether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
GoogleDrive.DriveChange.file.capabilities.canChangeCopyRequiresWriterPermissionBooleanWhether the current user can change the 'copy requires writer permission' restriction of this file.
GoogleDrive.DriveChange.file.capabilities.canCommentBooleanWhether the current user can comment on this file.
GoogleDrive.DriveChange.file.capabilities.canCopyBooleanWhether the current user can copy this file.
GoogleDrive.DriveChange.file.capabilities.canDeleteBooleanWhether the current user can delete this file.
GoogleDrive.DriveChange.file.capabilities.canDeleteChildrenBooleanWhether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
GoogleDrive.DriveChange.file.capabilities.canDownloadBooleanWhether the current user can download this file.
GoogleDrive.DriveChange.file.capabilities.canEditBooleanWhether the current user can edit this file.
GoogleDrive.DriveChange.file.capabilities.canListChildrenBooleanWhether the current user can list the children of this folder. This is always false when the item is not a folder.
GoogleDrive.DriveChange.file.capabilities.canModifyContentBooleanWhether the current user can modify the content of this file.
GoogleDrive.DriveChange.file.capabilities.canModifyContentRestrictionBooleanWhether the current user can modify restrictions on content of this file.
GoogleDrive.DriveChange.file.capabilities.canMoveChildrenOutOfDriveBooleanWhether the current user can move children of this folder outside of the shared drive.
GoogleDrive.DriveChange.file.capabilities.canMoveChildrenWithinDriveBooleanWhether the current user can move children of this folder within this drive.
GoogleDrive.DriveChange.file.capabilities.canMoveItemOutOfDriveBooleanWhether the current user can move this item outside of this drive by changing its parent.
GoogleDrive.DriveChange.file.capabilities.canMoveItemWithinDriveBooleanWhether the current user can move this item within this drive.
GoogleDrive.DriveChange.file.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of this file.
GoogleDrive.DriveChange.file.capabilities.canReadDriveBooleanWhether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
GoogleDrive.DriveChange.file.capabilities.canRemoveChildrenBooleanWhether the current user can remove children from this folder.
GoogleDrive.DriveChange.file.capabilities.canRemoveMyDriveParentBooleanWhether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
GoogleDrive.DriveChange.file.capabilities.canRenameBooleanWhether the current user can rename this file.
GoogleDrive.DriveChange.file.capabilities.canShareBooleanWhether the current user can modify the sharing settings for this file.
GoogleDrive.DriveChange.file.capabilities.canTrashBooleanWhether the current user can move this file to trash.
GoogleDrive.DriveChange.file.capabilities.canTrashChildrenBooleanWhether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives.
GoogleDrive.DriveChange.file.capabilities.canUntrashBooleanWhether the current user can restore this file from trash.
GoogleDrive.DriveChange.file.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download this file, should be disabled for readers and commenters.
GoogleDrive.DriveChange.file.writersCanShareBooleanWhether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.
GoogleDrive.DriveChange.file.permissions.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.permissions.idStringThe ID of this permission.
GoogleDrive.DriveChange.file.permissions.typeStringThe type of the grantee.
GoogleDrive.DriveChange.file.permissions.emailAddressStringThe email address of the user or group to which this permission refers.
GoogleDrive.DriveChange.file.permissions.domainStringThe domain to which this permission refers.
GoogleDrive.DriveChange.file.permissions.roleStringThe role granted by this permission.
GoogleDrive.DriveChange.file.permissions.viewStringIndicates the view for this permission.
GoogleDrive.DriveChange.file.permissions.allowFileDiscoveryBooleanWhether the permission allows the file to be discovered through search.
GoogleDrive.DriveChange.file.permissions.displayNameStringThe "pretty" name of the value of the permission.
GoogleDrive.DriveChange.file.permissions.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.permissions.expirationTimeDateThe time at which this permission will expire (RFC 3339 date-time).
GoogleDrive.DriveChange.file.permissions.permissionDetails.permissionTypeStringThe permission type for this user.
GoogleDrive.DriveChange.file.permissions.permissionDetails.roleStringThe primary role for this user.
GoogleDrive.DriveChange.file.permissions.permissionDetails.inheritedFromStringThe ID of the item from which this permission is inherited.
GoogleDrive.DriveChange.file.permissions.permissionDetails.inheritedBooleanWhether this permission is inherited.
GoogleDrive.DriveChange.file.permissions.deletedBooleanWhether the account associated with this permission has been deleted.
GoogleDrive.DriveChange.file.permissionIdsUnknownList of permission IDs for users with access to this file.
GoogleDrive.DriveChange.file.hasAugmentedPermissionsBooleanWhether there are permissions directly on this file. This field is only populated for items in shared drives.
GoogleDrive.DriveChange.file.folderColorRgbStringThe color for a folder as an RGB hex string.
GoogleDrive.DriveChange.file.originalFilenameStringThe 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.
GoogleDrive.DriveChange.file.fullFileExtensionStringThe full file extension extracted from the name field.
GoogleDrive.DriveChange.file.fileExtensionStringThe final component of fullFileExtension. This is only available for files with binary content in Google Drive.
GoogleDrive.DriveChange.file.md5ChecksumStringThe MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
GoogleDrive.DriveChange.file.sizeNumberThe size of the file's content in bytes. This is only applicable to files with binary content in Google Drive.
GoogleDrive.DriveChange.file.quotaBytesUsedNumberThe number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
GoogleDrive.DriveChange.file.headRevisionIdStringThe ID of the file's head revision. This is currently only available for files with binary content in Google Drive.
GoogleDrive.DriveChange.file.contentHints.thumbnail.imageUnknownThe thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
GoogleDrive.DriveChange.file.contentHints.thumbnail.mimeTypeStringThe MIME type of the thumbnail.
GoogleDrive.DriveChange.file.contentHints.indexableTextStringText to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
GoogleDrive.DriveChange.file.imageMediaMetadata.widthNumberThe width of the image in pixels.
GoogleDrive.DriveChange.file.imageMediaMetadata.heightNumberThe height of the image in pixels.
GoogleDrive.DriveChange.file.imageMediaMetadata.rotationNumberThe number of clockwise 90 degree rotations applied from the image's original orientation.
GoogleDrive.DriveChange.file.imageMediaMetadata.location.latitudeNumberThe latitude stored in the image.
GoogleDrive.DriveChange.file.imageMediaMetadata.location.longitudeNumberThe longitude stored in the image.
GoogleDrive.DriveChange.file.imageMediaMetadata.location.altitudeNumberThe altitude stored in the image.
GoogleDrive.DriveChange.file.imageMediaMetadata.timeStringThe date and time the photo was taken (EXIF DateTime).
GoogleDrive.DriveChange.file.imageMediaMetadata.cameraMakeStringThe make of the camera used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.cameraModelStringThe model of the camera used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.exposureTimeNumberThe length of the exposure, in seconds.
GoogleDrive.DriveChange.file.imageMediaMetadata.apertureNumberThe aperture used to create the photo (f-number).
GoogleDrive.DriveChange.file.imageMediaMetadata.flashUsedBooleanWhether a flash was used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.focalLengthNumberThe focal length used to create the photo, in millimeters.
GoogleDrive.DriveChange.file.imageMediaMetadata.isoSpeedNumberThe ISO speed used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.meteringModeStringThe metering mode used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.sensorStringThe type of sensor used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.exposureModeStringThe exposure mode used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.colorSpaceStringThe color space of the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.whiteBalanceStringThe white balance mode used to create the photo.
GoogleDrive.DriveChange.file.imageMediaMetadata.exposureBiasNumberThe exposure bias of the photo (APEX value).
GoogleDrive.DriveChange.file.imageMediaMetadata.maxApertureValueNumberThe smallest f-number of the lens at the focal length used to create the photo (APEX value).
GoogleDrive.DriveChange.file.imageMediaMetadata.subjectDistanceNumberThe distance to the subject of the photo, in meters.
GoogleDrive.DriveChange.file.imageMediaMetadata.lensStringThe lens used to create the photo.
GoogleDrive.DriveChange.file.videoMediaMetadata.widthNumberThe width of the video in pixels.
GoogleDrive.DriveChange.file.videoMediaMetadata.heightNumberThe height of the video in pixels.
GoogleDrive.DriveChange.file.videoMediaMetadata.durationMillisNumberThe duration of the video in milliseconds.
GoogleDrive.DriveChange.file.isAppAuthorizedBooleanWhether the file was created or opened by the requesting app.
GoogleDrive.DriveChange.file.exportLinksUnknownLinks for exporting Google Docs to specific formats.
GoogleDrive.DriveChange.file.shortcutDetails.targetIdStringThe ID of the file that this shortcut points to.
GoogleDrive.DriveChange.file.shortcutDetails.targetMimeTypeStringThe MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
GoogleDrive.DriveChange.file.contentRestrictions.readOnlyBooleanWhether the content of the file is read-only.
GoogleDrive.DriveChange.file.contentRestrictions.reasonStringReason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.DriveChange.file.contentRestrictions.restrictingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.DriveChange.file.contentRestrictions.restrictionTimeDateThe time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
GoogleDrive.DriveChange.file.contentRestrictions.typeStringThe type of the content restriction. Currently the only possible value is globalContentRestriction.
GoogleDrive.DriveChange.drive.kindStringIdentifies what kind of resource this is.
GoogleDrive.DriveChange.drive.idStringThe ID of this shared drive which is also the ID of the top level folder of this shared drive.
GoogleDrive.DriveChange.drive.nameStringThe name of this shared drive.
GoogleDrive.DriveChange.drive.themeIdStringThe ID of the theme from which the background image and color will be set.
GoogleDrive.DriveChange.drive.colorRgbStringThe color of this shared drive as an RGB hex string. It can only be set on a drive.drives.update request that does not set themeId.
GoogleDrive.DriveChange.drive.backgroundImageFile.idStringThe ID of an image file in Google Drive to use for the background image.
GoogleDrive.DriveChange.drive.backgroundImageFile.xCoordinateNumberThe X coordinate of the upper left corner of the cropping area in the background image.
GoogleDrive.DriveChange.drive.backgroundImageFile.yCoordinateNumberThe Y coordinate of the upper left corner of the cropping area in the background image.
GoogleDrive.DriveChange.drive.backgroundImageFile.widthNumberThe width of the cropped image in the closed range of 0 to 1.
GoogleDrive.DriveChange.drive.backgroundImageLinkStringA short-lived link to this shared drive's background image.
GoogleDrive.DriveChange.drive.capabilities.canAddChildrenBooleanWhether the current user can add children to folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canChangeCopyRequiresWriterPermissionRestrictionBooleanWhether the current user can change the 'copy requires writer permission' restriction of this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canChangeDomainUsersOnlyRestrictionBooleanWhether the current user can change the 'domain users only' restriction of this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canChangeDriveBackgroundBooleanWhether the current user can change the background of this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canChangeDriveMembersOnlyRestrictionBooleanWhether the current user can change the 'drive members only' restriction of this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canCommentBooleanWhether the current user can comment on files in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canCopyBooleanWhether the current user can copy files in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canDeleteChildrenBooleanWhether the current user can delete children from folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canDeleteDriveBooleanWhether the current user can delete this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canDownloadBooleanWhether the current user can download files in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canEditBooleanWhether the current user can edit files in this shared drive
GoogleDrive.DriveChange.drive.capabilities.canListChildrenBooleanWhether the current user can list the children of folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canManageMembersBooleanWhether the current user can add members to this shared drive or remove them or change their role.
GoogleDrive.DriveChange.drive.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of files in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canRenameBooleanWhether the current user can rename files or folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canRenameDriveBooleanWhether the current user can rename this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canShareBooleanWhether the current user can share files or folders in this shared drive.
GoogleDrive.DriveChange.drive.capabilities.canTrashChildrenBooleanWhether the current user can trash children from folders in this shared drive.
GoogleDrive.DriveChange.drive.createdTimeDateThe time at which the shared drive was created (RFC 3339 date-time).
GoogleDrive.DriveChange.drive.hiddenBooleanWhether the shared drive is hidden from the default view.
GoogleDrive.DriveChange.drive.restrictions.adminManagedRestrictionsBooleanWhether administrative privileges on this shared drive are required to modify restrictions.
GoogleDrive.DriveChange.drive.restrictions.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters.
GoogleDrive.DriveChange.drive.restrictions.domainUsersOnlyBooleanWhether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs.
GoogleDrive.DriveChange.drive.restrictions.driveMembersOnlyBooleanWhether access to items inside this shared drive is restricted to its members.

google-drive-activity-list#


Query past activity in Google Drive.

Base Command#

google-drive-activity-list

Input#

Argument NameDescriptionRequired
user_idThe user's primary email address.Optional
folder_nameReturn activities for this drive folder and all children and descendants. The format is "items/ITEM_ID".Optional
item_nameReturn activities for this drive item. The format is "items/ITEM_ID".Optional
filterThe filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional "AND", where each expression is of the form "field operator value".

Supported fields:
time - Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format.
Examples:
time > 1452409200000 AND time <= 1492812924310
time >= "2016-01-10T01:02:03-05:00"

detail.action_detail_case - Uses the "has" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses.
Examples:
detail.action_detail_case: RENAME
detail.action_detail_case:(CREATE EDIT)
-detail.action_detail_case:MOVE".
Optional
time_rangeThe time range to consider for getting drive activity. Use the format "<number> <time unit>".
Example: 12 hours, 7 days, 3 months, 1 year. This argument will override if the filter argument is given.
Optional
action_detail_case_includeA singular value or a list of allowed action types enclosed in parentheses. The filters are based on given actions. For example:
RENAME
(CREATE EDIT)
This argument will override if the filter argument is given.
Optional
action_detail_case_removeA singular value or a list of allowed action types enclosed in parentheses. The filters are based on given actions. For example:
RENAME
(CREATE EDIT)
This argument will override if the filter argument is given.
Optional
page_tokenThe token identifying which page of results to return. Set this to the nextPageToken value returned from a previous query to obtain the following page of results. If not set, the first page of results will be returned.Optional

Context Output#

PathTypeDescription
GoogleDrive.PageToken.DriveActivity.nextPageTokenStringToken to retrieve the next page of results, or empty if there are no more results in the list.
GoogleDrive.DriveActivity.primaryActionDetail.create.newBooleanIf true, the object was newly created.
GoogleDrive.DriveActivity.primaryActionDetail.create.uploadBooleanIf true, the object originated externally and was uploaded to Drive.
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.primaryActionDetail.create.copy.originalObject.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.primaryActionDetail.editBooleanIf true, the object was edited.
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.driveItem.driveFolder.typeStringThe type of a Drive folder.
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.primaryActionDetail.move.addedParents.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.primaryActionDetail.move.removedParents.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.primaryActionDetail.rename.oldTitleStringThe previous title of the drive object.
GoogleDrive.DriveActivity.primaryActionDetail.rename.newTitleStringThe new title of the drive object.
GoogleDrive.DriveActivity.primaryActionDetail.delete.typeStringThe type of delete action taken.
GoogleDrive.DriveActivity.primaryActionDetail.restore.typeStringThe type of restore action taken.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.roleStringIndicates the Google Drive permissions role.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.allowDiscoveryBooleanIf true, the item can be discovered (e.g., in the user's "Shared with me" collection) without needing a link to the item.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.group.emailStringThe email address of the group.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.group.titleStringThe title of the group.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.addedPermissions.anyoneBooleanIf true, represents any user (including a logged out user).
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.roleStringIndicates the Google Drive permissions role.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.allowDiscoveryBooleanIf true, the item can be discovered (e.g., in the user's "Shared with me" collection) without needing a link to the item.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.group.emailStringThe email address of the group.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.group.titleStringThe title of the group.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.primaryActionDetail.permissionChange.removedPermissions.anyoneBooleanIf true, represents any user (including a logged out user).
GoogleDrive.DriveActivity.primaryActionDetail.comment.mentionedUsers.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.primaryActionDetail.comment.mentionedUsers.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.primaryActionDetail.comment.mentionedUsers.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.primaryActionDetail.comment.mentionedUsers.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.primaryActionDetail.comment.post.subtypeStringThe sub-type of post event.
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.subtypeStringThe sub-type of assignment event.
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.assignedUser.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.assignedUser.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.assignedUser.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.primaryActionDetail.comment.assignment.assignedUser.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.primaryActionDetail.comment.suggestion.subtypeStringThe sub-type of suggestion event.
GoogleDrive.DriveActivity.primaryActionDetail.dlpChange.typeStringThe type of Data Leak Prevention (DLP) change.
GoogleDrive.DriveActivity.primaryActionDetail.reference.typeStringThe reference type corresponding to this event.
GoogleDrive.DriveActivity.primaryActionDetail.settingsChange.restrictionChanges.featureStringThe feature which had a change in restriction policy.
GoogleDrive.DriveActivity.primaryActionDetail.settingsChange.restrictionChanges.newRestrictionStringThe restriction in place after the change.
GoogleDrive.DriveActivity.actors.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actors.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actors.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actors.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actors.anonymousBooleanIf true, the user is an anonymous user.
GoogleDrive.DriveActivity.actors.impersonation.impersonatedUser.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actors.impersonation.impersonatedUser.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actors.impersonation.impersonatedUser.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actors.impersonation.impersonatedUser.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actors.system.typeStringThe type of the system event that may triggered activity.
GoogleDrive.DriveActivity.actors.administratorBooleanIf true, the user is an administrator.
GoogleDrive.DriveActivity.actions.detail.create.newBooleanIf true, the object was newly created.
GoogleDrive.DriveActivity.actions.detail.create.uploadBooleanIf true, the object originated externally and was uploaded to Drive.
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.detail.create.copy.originalObject.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.detail.editBooleanIf true, the object was edited.
GoogleDrive.DriveActivity.actions.detail.move.addedParents.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.detail.move.addedParents.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.detail.move.addedParents.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.detail.move.addedParents.driveItem.driveFolder.typeStringThe type of a Drive folder.
GoogleDrive.DriveActivity.actions.detail.move.addedParents.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.detail.move.addedParents.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.detail.move.removedParents.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.detail.move.removedParents.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.detail.move.removedParents.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.detail.move.removedParents.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.detail.move.removedParents.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.detail.move.removedParents.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.detail.rename.oldTitleStringThe previous title of the drive object.
GoogleDrive.DriveActivity.actions.detail.rename.newTitleStringThe new title of the drive object.
GoogleDrive.DriveActivity.actions.detail.delete.typeStringThe type of delete action taken.
GoogleDrive.DriveActivity.actions.detail.restore.typeStringThe type of restore action taken.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.roleStringIndicates the Google Drive permissions role.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.allowDiscoveryBooleanIf true, the item can be discovered (e.g., in the user's "Shared with me" collection) without needing a link to the item.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.group.emailStringThe email address of the group.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.group.titleStringThe title of the group.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.detail.permissionChange.addedPermissions.anyoneBooleanIf true, represents any user (including a logged out user).
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.roleStringIndicates the Google Drive permissions role.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.allowDiscoveryBooleanIf true, the item can be discovered (e.g., in the user's "Shared with me" collection) without needing a link to the item.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.group.emailStringThe email address of the group.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.group.titleStringThe title of the group.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.detail.permissionChange.removedPermissions.anyoneBooleanIf true, represents any user (including a logged out user).
GoogleDrive.DriveActivity.actions.detail.comment.mentionedUsers.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.detail.comment.mentionedUsers.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.detail.comment.mentionedUsers.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.detail.comment.mentionedUsers.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.detail.comment.post.subtypeStringThe sub-type of post event.
GoogleDrive.DriveActivity.actions.detail.comment.assignment.subtypeStringThe sub-type of assignment event.
GoogleDrive.DriveActivity.actions.detail.comment.assignment.assignedUser.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.detail.comment.assignment.assignedUser.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.detail.comment.assignment.assignedUser.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.detail.comment.assignment.assignedUser.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.detail.comment.suggestion.subtypeStringThe sub-type of suggestion event.
GoogleDrive.DriveActivity.actions.detail.dlpChange.typeStringThe type of Data Leak Prevention (DLP) change.
GoogleDrive.DriveActivity.actions.detail.reference.typeStringThe reference type corresponding to this event.
GoogleDrive.DriveActivity.actions.detail.settingsChange.restrictionChanges.featureStringThe feature which had a change in restriction policy.
GoogleDrive.DriveActivity.actions.detail.settingsChange.restrictionChanges.newRestrictionStringThe restriction in place after the change.
GoogleDrive.DriveActivity.actions.actor.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.actor.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.actor.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.actor.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.actor.anonymousBooleanIf true, the user is an anonymous user.
GoogleDrive.DriveActivity.actions.actor.impersonation.impersonatedUser.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.actor.impersonation.impersonatedUser.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.actor.impersonation.impersonatedUser.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.actor.impersonation.impersonatedUser.unknownUserStringIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.actor.system.typeStringThe type of the system event that may triggered activity.
GoogleDrive.DriveActivity.actions.actor.administratorBooleanIf true, the user is an administrator.
GoogleDrive.DriveActivity.actions.target.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.target.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.target.driveItem.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.actions.target.driveItem.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.target.driveItem.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.target.driveItem.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.target.driveItem.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.target.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.target.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.target.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.target.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.target.drive.root.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.target.drive.root.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.target.drive.root.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.actions.target.drive.root.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.target.drive.root.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.target.drive.root.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.target.drive.root.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.target.drive.root.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.target.drive.root.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.target.fileComment.legacyCommentIdStringThe comment in the discussion thread.
GoogleDrive.DriveActivity.actions.target.fileComment.legacyDiscussionIdStringThe discussion thread to which the comment was added.
GoogleDrive.DriveActivity.actions.target.fileComment.linkToDiscussionStringThe link to the discussion thread containing this comment, for example, "https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.actions.target.fileComment.parent.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.actions.target.fileComment.parent.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.actions.timestampStringThe activity occurred at this specific time.
GoogleDrive.DriveActivity.actions.timeRange.startTimeStringThe start of the time range.
GoogleDrive.DriveActivity.actions.timeRange.endTimeStringThe end of the time range.
GoogleDrive.DriveActivity.targets.driveItem.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.targets.driveItem.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.targets.driveItem.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.targets.driveItem.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.targets.driveItem.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.targets.driveItem.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.targets.driveItem.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.targets.driveItem.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.targets.driveItem.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.targets.driveItem.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.targets.driveItem.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.targets.driveItem.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.targets.driveItem.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.targets.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.targets.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.targets.drive.root.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.targets.drive.root.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.targets.drive.root.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.targets.drive.root.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.targets.drive.root.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.targets.drive.root.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.targets.drive.root.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.targets.drive.root.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.targets.drive.root.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.targets.drive.root.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.targets.drive.root.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.targets.drive.root.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.targets.drive.root.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.targets.fileComment.legacyCommentIdStringThe comment in the discussion thread.
GoogleDrive.DriveActivity.targets.fileComment.legacyDiscussionIdStringThe discussion thread to which the comment was added.
GoogleDrive.DriveActivity.targets.fileComment.linkToDiscussionStringThe link to the discussion thread containing this comment, for example, "https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID".
GoogleDrive.DriveActivity.targets.fileComment.parent.nameStringThe target Drive item. The format is "items/ITEM_ID".
GoogleDrive.DriveActivity.targets.fileComment.parent.titleStringThe title of the Drive item.
GoogleDrive.DriveActivity.targets.fileComment.parent.mimeTypeStringThe MIME type of the Drive item.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.domain.nameStringThe name of the domain, e.g., "google.com".
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.domain.legacyIdStringAn opaque string used to identify this domain.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.user.knownUser.personNameStringThe identifier for this user that can be used with the People API to get more information. The format is "people/ACCOUNT_ID".
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.user.knownUser.isCurrentUserBooleanTrue if this is the user making the request.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.user.deletedUserBooleanIf true, a user whose account has since been deleted.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.user.unknownUserBooleanIf true, a user about whom nothing is currently known.
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.drive.nameStringThe resource name of the shared drive. The format is "COLLECTION_ID/DRIVE_ID".
GoogleDrive.DriveActivity.targets.fileComment.parent.owner.drive.titleStringThe title of the shared drive.
GoogleDrive.DriveActivity.targets.fileComment.parent.driveFileBooleanIf true, the Drive item is a file.
GoogleDrive.DriveActivity.targets.fileComment.parent.driveFolder.typeStringThe type of Drive folder.
GoogleDrive.DriveActivity.timestampStringThe activity occurred at this specific time.
GoogleDrive.DriveActivity.timeRange.startTimeStringThe start of the time range.
GoogleDrive.DriveActivity.timeRange.endTimeStringThe end of the time range.

google-drive-drives-list#


Lists the user's shared drives.

Base Command#

google-drive-drives-list

Input#

Argument NameDescriptionRequired
page_sizeMaximum number of shared drives to return. Acceptable values are 1 to 100, inclusive. Default is 100.Optional
page_tokenPage token for shared drives.Optional
queryQuery string for searching shared drives.Optional
use_domain_admin_accessIssue the request as a domain administrator. If set to true, all shared drives of the domain in which the requester is an administrator are returned. Possible values are: true, false. Default is false.Optional
user_idThe user's primary email address.Optional

Context Output#

PathTypeDescription
GoogleDrive.Drive.Drive.idStringThe ID of this shared drive which is also the ID of the top level folder of this shared drive.
GoogleDrive.Drive.Drive.nameStringThe name of this shared drive.
GoogleDrive.Drive.Drive.colorRgbStringThe color of this shared drive as an RGB hex string.
GoogleDrive.Drive.Drive.capabilities.canAddChildrenBooleanWhether the current user can add children to folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canChangeCopyRequiresWriterPermissionRestrictionBooleanWhether the current user can change the 'copy requires writer permission' restriction of this shared drive.
GoogleDrive.Drive.Drive.capabilities.canChangeDomainUsersOnlyRestrictionBooleanWhether the current user can change the 'domain users only' restriction of this shared drive.
GoogleDrive.Drive.Drive.capabilities.canChangeDriveBackgroundBooleanWhether the current user can change the background of this shared drive.
GoogleDrive.Drive.Drive.capabilities.canChangeDriveMembersOnlyRestrictionBooleanWhether the current user can change the 'drive members only' restriction of this shared drive.
GoogleDrive.Drive.Drive.capabilities.canCommentBooleanWhether the current user can comment on files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canCopyBooleanWhether the current user can copy files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canDeleteChildrenBooleanWhether the current user can delete children from folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canDeleteDriveBooleanWhether the current user can delete this shared drive.
GoogleDrive.Drive.Drive.capabilities.canDownloadBooleanWhether the current user can download files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canEditBooleanWhether the current user can edit files in this shared drive
GoogleDrive.Drive.Drive.capabilities.canListChildrenBooleanWhether the current user can list the children of folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canManageMembersBooleanWhether the current user can add members to this shared drive or remove them or change their role.
GoogleDrive.Drive.Drive.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canRenameBooleanWhether the current user can rename files or folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canRenameDriveBooleanWhether the current user can rename this shared drive.
GoogleDrive.Drive.Drive.capabilities.canShareBooleanWhether the current user can share files or folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canTrashChildrenBooleanWhether the current user can trash children from folders in this shared drive.
GoogleDrive.Drive.Drive.createdTimeDateThe time at which the shared drive was created (RFC 3339 date-time).
GoogleDrive.Drive.Drive.hiddenBooleanWhether the shared drive is hidden from the default view.
GoogleDrive.Drive.Drive.restrictions.adminManagedRestrictionsBooleanWhether administrative privileges on this shared drive are required to modify restrictions.
GoogleDrive.Drive.Drive.restrictions.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive.
GoogleDrive.Drive.Drive.restrictions.domainUsersOnlyBooleanWhether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. This restriction may be overridden by other sharing policies controlled outside of this shared drive.
GoogleDrive.Drive.Drive.restrictions.driveMembersOnlyBooleanWhether access to items inside this shared drive is restricted to its members.

google-drive-drive-get#


Gets a user shared drives.

Base Command#

google-drive-drive-get

Input#

Argument NameDescriptionRequired
use_domain_admin_accessIssue the request as a domain administrator. If set to true, all shared drives of the domain in which the requester is an administrator are returned. Possible values are: true, false. Default is false.Optional
user_idThe user's primary email address.Optional
drive_idID of the shared drive. Can be retrieved using the google-drive-drives-list command.Optional
fieldsThe fields you want included in the response. Default is kind, id, name, themeId, capabilities, createdTime, hidden, restrictions.Optional

Context Output#

PathTypeDescription
GoogleDrive.Drive.Drive.idStringThe ID of this shared drive which is also the ID of the top level folder of this shared drive.
GoogleDrive.Drive.Drive.nameStringThe name of this shared drive.
GoogleDrive.Drive.Drive.colorRgbStringThe color of this shared drive as an RGB hex string.
GoogleDrive.Drive.Drive.capabilities.canAddChildrenBooleanWhether the current user can add children to folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canChangeCopyRequiresWriterPermissionRestrictionBooleanWhether the current user can change the 'copy requires writer permission' restriction of this shared drive.
GoogleDrive.Drive.Drive.capabilities.canChangeDomainUsersOnlyRestrictionBooleanWhether the current user can change the 'domain users only' restriction of this shared drive.
GoogleDrive.Drive.Drive.capabilities.canChangeDriveBackgroundBooleanWhether the current user can change the background of this shared drive.
GoogleDrive.Drive.Drive.capabilities.canChangeDriveMembersOnlyRestrictionBooleanWhether the current user can change the 'drive members only' restriction of this shared drive.
GoogleDrive.Drive.Drive.capabilities.canCommentBooleanWhether the current user can comment on files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canCopyBooleanWhether the current user can copy files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canDeleteChildrenBooleanWhether the current user can delete children from folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canDeleteDriveBooleanWhether the current user can delete this shared drive.
GoogleDrive.Drive.Drive.capabilities.canDownloadBooleanWhether the current user can download files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canEditBooleanWhether the current user can edit files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canListChildrenBooleanWhether the current user can list the children of folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canManageMembersBooleanWhether the current user can add members to this shared drive or remove them or change their role.
GoogleDrive.Drive.Drive.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of files in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canRenameBooleanWhether the current user can rename files or folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canRenameDriveBooleanWhether the current user can rename this shared drive.
GoogleDrive.Drive.Drive.capabilities.canShareBooleanWhether the current user can share files or folders in this shared drive.
GoogleDrive.Drive.Drive.capabilities.canTrashChildrenBooleanWhether the current user can trash children from folders in this shared drive.
GoogleDrive.Drive.Drive.createdTimeDateThe time at which the shared drive was created (RFC 3339 date-time).
GoogleDrive.Drive.Drive.hiddenBooleanWhether the shared drive is hidden from the default view.
GoogleDrive.Drive.Drive.restrictions.adminManagedRestrictionsBooleanWhether administrative privileges on this shared drive are required to modify restrictions.
GoogleDrive.Drive.Drive.restrictions.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive.
GoogleDrive.Drive.Drive.restrictions.domainUsersOnlyBooleanWhether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. This restriction may be overridden by other sharing policies controlled outside of this shared drive.
GoogleDrive.Drive.Drive.restrictions.driveMembersOnlyBooleanWhether access to items inside this shared drive is restricted to its members.

google-drive-drive-delete#


Deletes a shared drive.

Base Command#

google-drive-drive-delete

Input#

Argument NameDescriptionRequired
use_domain_admin_accessIf set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. Possible values are: true, false. Default is false.Optional
allow_item_deletionWhether any items inside the shared drive should also be deleted. This option is only supported when use_domain_admin_access argument is set to true. Possible values are: true, false. Default is false.Optional
user_idThe user's primary email address.Optional
drive_idID of the shared drive. Can be retrieved using the google-drive-drives-list command.Required

Context Output#

There is no context output for this command.

google-drive-files-list#


Lists the user's shared drives.

Base Command#

google-drive-files-list

Input#

Argument NameDescriptionRequired
page_sizeMaximum number of shared drives to return. Acceptable values are 1 to 100, inclusive. Default is 100.Optional
page_tokenPage token for shared drives.Optional
queryQuery string for searching shared drives.Optional
include_items_from_all_drivesWhether both My Drive and shared drive items should be included in the results. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional
user_idThe user's primary email address.Optional
fieldsThe fields you want included in the response. Default is kind, id, name, mimeType, description, starred, trashed, explicitlyTrashed, trashingUser, trashedTime, parents, properties, appProperties, spaces, version, webContentLink, webViewLink, iconLink, hasThumbnail, thumbnailLink, thumbnailVersion, viewedByMe, viewedByMeTime, createdTime, modifiedTime, modifiedByMeTime, modifiedByMe, sharedWithMeTime, sharingUser, owners, teamDriveId, driveId, lastModifyingUser, shared, ownedByMe, capabilities, viewersCanCopyContent, copyRequiresWriterPermission, writersCanShare, permissions, permissionIds, hasAugmentedPermissions, folderColorRgb, originalFilename, fullFileExtension, fileExtension, md5Checksum, size, quotaBytesUsed, headRevisionId, contentHints, isAppAuthorized, exportLinks, shortcutDetails, contentRestrictions, resourceKey, linkShareMetadata.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values are: True, False. Default is False.Optional
corporaFiles or documents to which the query applies. Prefer 'User' or 'Drive' to 'All Drives' for efficiency. By default, corpora is set to 'User'. However, this can change depending on the filter set through the 'query' argument. Possible values are: User, Domain, Drive, All Drivers. Default is User.Optional
drive_idID of the shared drive to search. Can be retrieved using the google-drive-drives-list command. When a drive ID is specified the value of the corpora argument is automatically set to 'Drive' regardless of its selected value.Optional

Context Output#

PathTypeDescription
GoogleDrive.File.File.idStringThe ID of the file.
GoogleDrive.File.File.mimeTypeStringThe MIME type of the file.
GoogleDrive.File.File.nameStringThe name of the file. This is not necessarily unique within a folder.
GoogleDrive.File.File.resourceKeyStringA key needed to access the item via a shared link.

google-drive-file-get#


Get a single file.

Base Command#

google-drive-file-get

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
user_idThe user's primary email address.Optional
include_items_from_all_drivesWhether both My Drive and shared drive items should be included in the results. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional
fieldsThe fields you want included in the response. Default is kind, id, name, mimeType, description, starred, trashed, explicitlyTrashed, trashingUser, trashedTime, parents, properties, appProperties, spaces, version, webContentLink, webViewLink, iconLink, hasThumbnail, thumbnailLink, thumbnailVersion, viewedByMe, viewedByMeTime, createdTime, modifiedTime, modifiedByMeTime, modifiedByMe, sharedWithMeTime, sharingUser, owners, teamDriveId, driveId, lastModifyingUser, shared, ownedByMe, capabilities, viewersCanCopyContent, copyRequiresWriterPermission, writersCanShare, permissions, permissionIds, hasAugmentedPermissions, folderColorRgb, originalFilename, fullFileExtension, fileExtension, md5Checksum, size, quotaBytesUsed, headRevisionId, contentHints, isAppAuthorized, exportLinks, shortcutDetails, contentRestrictions, resourceKey, linkShareMetadata.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values are: True, False. Default is False.Optional

Context Output#

PathTypeDescription
GoogleDrive.File.File.capabilities.canAddChildrenBooleanWhether the current user can add children to this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canAddMyDriveParentBooleanWhether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
GoogleDrive.File.File.capabilities.canChangeCopyRequiresWriterPermissionBooleanWhether the current user can change the 'copy requires writer permission' restriction of this file.
GoogleDrive.File.File.capabilities.canChangeSecurityUpdateEnabledBooleanWhether the current user can change the 'security update enabled' field on link shared metadata.
GoogleDrive.File.File.capabilities.canCommentBooleanWhether the current user can comment on this file.
GoogleDrive.File.File.capabilities.canCopyBooleanWhether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
GoogleDrive.File.File.capabilities.canDeleteBooleanWhether the current user can delete this file.
GoogleDrive.File.File.capabilities.canDownloadBooleanWhether the current user can download this file.
GoogleDrive.File.File.capabilities.canEditBooleanWhether the current user can edit this file.
GoogleDrive.File.File.capabilities.canListChildrenBooleanWhether the current user can list the children of this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canModifyContentBooleanWhether the current user can modify the content of this file.
GoogleDrive.File.File.capabilities.canMoveChildrenWithinDriveBooleanWhether the current user can move children of this folder within this drive. This is false when the item is not a folder.
GoogleDrive.File.File.capabilities.canMoveItemOutOfDriveBooleanWhether the current user can move this item outside of this drive by changing its parent.
GoogleDrive.File.File.capabilities.canMoveItemWithinDriveBooleanWhether the current user can move this item within this drive.
GoogleDrive.File.File.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
GoogleDrive.File.File.capabilities.canRemoveChildrenBooleanWhether the current user can remove children from this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canRemoveMyDriveParentBooleanWhether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
GoogleDrive.File.File.capabilities.canRenameBooleanWhether the current user can rename this file.
GoogleDrive.File.File.capabilities.canShareBooleanWhether the current user can modify the sharing settings for this file.
GoogleDrive.File.File.capabilities.canTrashBooleanWhether the current user can move this file to trash.
GoogleDrive.File.File.capabilities.canUntrashBooleanWhether the current user can restore this file from trash.
GoogleDrive.File.File.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download this file, should be disabled for readers and commenters.
GoogleDrive.File.File.createdTimeDateThe time at which the file was created (RFC 3339 date-time).
GoogleDrive.File.File.explicitlyTrashedBooleanWhether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
GoogleDrive.File.File.exportLinksStringLinks for exporting Docs Editors files to specific formats.
GoogleDrive.File.File.hasThumbnailBooleanWhether 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.
GoogleDrive.File.File.iconLinkStringA static, unauthenticated link to the file's icon.
GoogleDrive.File.File.idStringThe ID of the file.
GoogleDrive.File.File.isAppAuthorizedBooleanWhether the file was created or opened by the requesting app.
GoogleDrive.File.File.lastModifyingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.lastModifyingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.File.File.lastModifyingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.File.File.lastModifyingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.File.File.lastModifyingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.File.File.linkShareMetadata.securityUpdateEligibleBooleanWhether the file is eligible for a security update.
GoogleDrive.File.File.linkShareMetadata.securityUpdateEnabledBooleanWhether the security update is enabled for this file.
GoogleDrive.File.File.mimeTypeStringThe MIME type of the file.
GoogleDrive.File.File.modifiedByMeBooleanWhether the file has been modified by this user.
GoogleDrive.File.File.modifiedByMeTimeDateThe last time the file was modified by the user (RFC 3339 date-time).
GoogleDrive.File.File.modifiedTimeDateThe last time the file was modified by anyone (RFC 3339 date-time).
GoogleDrive.File.File.nameStringThe name of the file. This is not 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.
GoogleDrive.File.File.ownedByMeBooleanWhether the user owns the file. Not populated for items in shared drives.
GoogleDrive.File.File.owners.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.owners.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.File.File.owners.meBooleanWhether this user is the requesting user.
GoogleDrive.File.File.owners.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.File.File.owners.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.File.File.parentsStringThe IDs of the parent folders which contain the file.
GoogleDrive.File.File.permissionIdsStringList of permission IDs for users with access to this file.
GoogleDrive.File.File.permissions.deletedBooleanWhether the permission was deleted.
GoogleDrive.File.File.permissions.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.permissions.emailAddressStringThe email address of the user.
GoogleDrive.File.File.permissions.idStringThe ID of this permission.
GoogleDrive.File.File.permissions.roleStringThe role granted by this permission.
GoogleDrive.File.File.permissions.typeStringThe type of the grantee.
GoogleDrive.File.File.permissions.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.File.File.quotaBytesUsedStringThe number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
GoogleDrive.File.File.sharedBooleanWhether the file has been shared. Not populated for items in shared drives.
GoogleDrive.File.File.spacesStringThe list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder', and 'photos'.
GoogleDrive.File.File.starredBooleanWhether the user has starred the file.
GoogleDrive.File.File.thumbnailLinkStringA short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours.
GoogleDrive.File.File.thumbnailVersionStringThe thumbnail version for use in thumbnail cache invalidation.
GoogleDrive.File.File.trashedBooleanWhether the file has been trashed, either explicitly or from a trashed parent folder.
GoogleDrive.File.File.versionStringA monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
GoogleDrive.File.File.viewedByMeBooleanWhether the file has been viewed by this user.
GoogleDrive.File.File.viewedByMeTimeDateThe last time the file was viewed by the user (RFC 3339 date-time).
GoogleDrive.File.File.webViewLinkStringA link for opening the file in a relevant Google editor or viewer in a browser.
GoogleDrive.File.File.writersCanShareBooleanWhether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.

google-drive-file-upload#


Creates a new file.

Base Command#

google-drive-file-upload

Input#

Argument NameDescriptionRequired
file_nameThe name of the file to upload.Optional
entry_idThe file's Entry ID.Optional
parentThe ID of the parent folder which contains the file. If not specified as part of a create request, the file will be placed directly in the user's My Drive folder.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values: "true" and "false". Default is "false".Optional

Context Output#

PathTypeDescription
GoogleDrive.File.File.idStringThe ID of the file.
GoogleDrive.File.File.nameStringThe name of the file. This is not 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.
GoogleDrive.File.File.mimeTypeStringThe MIME type of the file.
GoogleDrive.File.File.starredBooleanWhether the user has starred the file.
GoogleDrive.File.File.trashedBooleanWhether the file has been trashed, either explicitly or from a trashed parent folder.
GoogleDrive.File.File.explicitlyTrashedBooleanWhether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
GoogleDrive.File.File.parentsStringThe IDs of the parent folders which contain the file.
GoogleDrive.File.File.spacesStringThe list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder', and 'photos'.
GoogleDrive.File.File.versionStringA monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
GoogleDrive.File.File.webContentLinkStringA link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
GoogleDrive.File.File.webViewLinkStringA link for opening the file in a relevant Google editor or viewer in a browser.
GoogleDrive.File.File.iconLinkStringA static, unauthenticated link to the file's icon.
GoogleDrive.File.File.hasThumbnailBooleanWhether 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.
GoogleDrive.File.File.thumbnailVersionStringThe thumbnail version for use in thumbnail cache invalidation.
GoogleDrive.File.File.viewedByMeBooleanWhether the file has been viewed by this user.
GoogleDrive.File.File.viewedByMeTimeDateThe last time the file was viewed by the user (RFC 3339 date-time).
GoogleDrive.File.File.createdTimeDateThe time at which the file was created (RFC 3339 date-time).
GoogleDrive.File.File.modifiedTimeDateThe last time the file was modified by anyone (RFC 3339 date-time).
GoogleDrive.File.File.thumbnailLinkStringA short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours.
GoogleDrive.File.File.exportLinksStringLinks for exporting Docs Editors files to specific formats.
GoogleDrive.File.File.quotaBytesUsedStringThe number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
GoogleDrive.File.File.sharedBooleanWhether the file has been shared. Not populated for items in shared drives.
GoogleDrive.File.File.writersCanShareBooleanWhether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.
GoogleDrive.File.File.modifiedByMeBooleanWhether the file has been modified by this user.
GoogleDrive.File.File.modifiedByMeTimeDateThe last time the file was modified by the user (RFC 3339 date-time).
GoogleDrive.File.File.ownedByMeBooleanWhether the user owns the file. Not populated for items in shared drives.
GoogleDrive.File.File.isAppAuthorizedBooleanWhether the file was created or opened by the requesting app.
GoogleDrive.File.File.capabilities.canAddChildrenBooleanWhether the current user can add children to this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canAddMyDriveParentBooleanWhether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
GoogleDrive.File.File.capabilities.canChangeCopyRequiresWriterPermissionBooleanWhether the current user can change the 'copy requires writer permission' restriction of this file.
GoogleDrive.File.File.capabilities.canChangeSecurityUpdateEnabledBooleanWhether the current user can change the 'security update enabled' field on link shared metadata.
GoogleDrive.File.File.capabilities.canCommentBooleanWhether the current user can comment on this file.
GoogleDrive.File.File.capabilities.canCopyBooleanWhether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
GoogleDrive.File.File.capabilities.canDeleteBooleanWhether the current user can delete this file.
GoogleDrive.File.File.capabilities.canDownloadBooleanWhether the current user can download this file.
GoogleDrive.File.File.capabilities.canEditBooleanWhether the current user can edit this file.
GoogleDrive.File.File.capabilities.canListChildrenBooleanWhether the current user can list the children of this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canModifyContentBooleanWhether the current user can modify the content of this file.
GoogleDrive.File.File.capabilities.canMoveChildrenWithinDriveBooleanWhether the current user can move children of this folder within this drive. This is false when the item is not a folder.
GoogleDrive.File.File.capabilities.canMoveItemOutOfDriveBooleanWhether the current user can move this item outside of this drive by changing its parent.
GoogleDrive.File.File.capabilities.canMoveItemWithinDriveBooleanWhether the current user can move this item within this drive.
GoogleDrive.File.File.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
GoogleDrive.File.File.capabilities.canRemoveChildrenBooleanWhether the current user can remove children from this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canRemoveMyDriveParentBooleanWhether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
GoogleDrive.File.File.capabilities.canRenameBooleanWhether the current user can rename this file.
GoogleDrive.File.File.capabilities.canShareBooleanWhether the current user can modify the sharing settings for this file.
GoogleDrive.File.File.capabilities.canTrashBooleanWhether the current user can move this file to trash.
GoogleDrive.File.File.capabilities.canUntrashBooleanWhether the current user can restore this file from trash.
GoogleDrive.File.File.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download this file, should be disabled for readers and commenters.
GoogleDrive.File.File.lastModifyingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.lastModifyingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.File.File.lastModifyingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.File.File.lastModifyingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.File.File.lastModifyingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.File.File.linkShareMetadata.securityUpdateEligibleBooleanWhether the file is eligible for security update.
GoogleDrive.File.File.linkShareMetadata.securityUpdateEnabledBooleanWhether the security update is enabled for this file.
GoogleDrive.File.File.owners.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.owners.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.File.File.owners.meBooleanWhether this user is the requesting user.
GoogleDrive.File.File.owners.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.File.File.owners.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.File.File.permissionIdsStringList of permission IDs for users with access to this file.
GoogleDrive.File.File.permissions.deletedBooleanWhether the permission was deleted.
GoogleDrive.File.File.permissions.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.permissions.emailAddressStringThe email address of the user.
GoogleDrive.File.File.permissions.idStringThe ID of this permission.
GoogleDrive.File.File.permissions.roleStringThe role granted by this permission.
GoogleDrive.File.File.permissions.typeStringThe type of the grantee.
GoogleDrive.File.File.permissions.photoLinkStringA link to the user's profile photo, if available.

google-drive-file-download#


Download a single file.

Base Command#

google-drive-file-download

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
file_nameName of the downloaded file. Default is untitled.Optional
user_idThe user's primary email address.Optional

Context Output#

PathTypeDescription
File.SizeNumberThe size of the file.
File.SHA1StringThe SHA1 hash of the file.
File.SHA256StringThe SHA256 hash of the file.
File.NameStringThe name of the file.
File.SSDeepStringThe SSDeep hash of the file.
File.EntryIDStringThe entry ID of the file.
File.InfoStringFile information.
File.TypeStringThe file type.
File.MD5StringThe MD5 hash of the file.
File.ExtensionStringThe file extension.

google-drive-file-replace-existing#


Updates a file's content.

Base Command#

google-drive-file-replace-existing

Input#

Argument NameDescriptionRequired
file_idID of the file to replace. Can be retrieved using the google-drive-files-list command.Optional
entry_idThe file's entry ID.Optional

Context Output#

PathTypeDescription
GoogleDrive.File.File.idStringThe ID of the file.
GoogleDrive.File.File.nameStringThe name of the file. This is not 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.
GoogleDrive.File.File.mimeTypeStringThe MIME type of the file.
GoogleDrive.File.File.starredBooleanWhether the user has starred the file.
GoogleDrive.File.File.trashedBooleanWhether the file has been trashed, either explicitly or from a trashed parent folder.
GoogleDrive.File.File.explicitlyTrashedBooleanWhether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
GoogleDrive.File.File.parentsStringThe IDs of the parent folders which contain the file.
GoogleDrive.File.File.spacesStringThe list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder', and 'photos'.
GoogleDrive.File.File.versionStringA monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
GoogleDrive.File.File.webContentLinkStringA link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
GoogleDrive.File.File.webViewLinkStringA link for opening the file in a relevant Google editor or viewer in a browser.
GoogleDrive.File.File.iconLinkStringA static, unauthenticated link to the file's icon.
GoogleDrive.File.File.hasThumbnailBooleanWhether 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.
GoogleDrive.File.File.thumbnailVersionStringThe thumbnail version for use in thumbnail cache invalidation.
GoogleDrive.File.File.viewedByMeBooleanWhether the file has been viewed by this user.
GoogleDrive.File.File.viewedByMeTimeDateThe last time the file was viewed by the user (RFC 3339 date-time).
GoogleDrive.File.File.createdTimeDateThe time at which the file was created (RFC 3339 date-time).
GoogleDrive.File.File.modifiedTimeDateThe last time the file was modified by anyone (RFC 3339 date-time).
GoogleDrive.File.File.thumbnailLinkStringA short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours.
GoogleDrive.File.File.exportLinksStringLinks for exporting Docs Editors files to specific formats.
GoogleDrive.File.File.quotaBytesUsedStringThe number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
GoogleDrive.File.File.sharedBooleanWhether the file has been shared. Not populated for items in shared drives.
GoogleDrive.File.File.writersCanShareBooleanWhether users with only writer permission can modify the file's permissions. Not populated for items in shared drives.
GoogleDrive.File.File.modifiedByMeBooleanWhether the file has been modified by this user.
GoogleDrive.File.File.modifiedByMeTimeDateThe last time the file was modified by the user (RFC 3339 date-time).
GoogleDrive.File.File.ownedByMeBooleanWhether the user owns the file. Not populated for items in shared drives.
GoogleDrive.File.File.isAppAuthorizedBooleanWhether the file was created or opened by the requesting app.
GoogleDrive.File.File.capabilities.canAddChildrenBooleanWhether the current user can add children to this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canAddMyDriveParentBooleanWhether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
GoogleDrive.File.File.capabilities.canChangeCopyRequiresWriterPermissionBooleanWhether the current user can change the 'copy requires writer permission' restriction of this file.
GoogleDrive.File.File.capabilities.canChangeSecurityUpdateEnabledBooleanWhether the current user can change the 'security update enabled' field on link shared metadata.
GoogleDrive.File.File.capabilities.canCommentBooleanWhether the current user can comment on this file.
GoogleDrive.File.File.capabilities.canCopyBooleanWhether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder.
GoogleDrive.File.File.capabilities.canDeleteBooleanWhether the current user can delete this file.
GoogleDrive.File.File.capabilities.canDownloadBooleanWhether the current user can download this file.
GoogleDrive.File.File.capabilities.canEditBooleanWhether the current user can edit this file.
GoogleDrive.File.File.capabilities.canListChildrenBooleanWhether the current user can list the children of this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canModifyContentBooleanWhether the current user can modify the content of this file.
GoogleDrive.File.File.capabilities.canMoveChildrenWithinDriveBooleanWhether the current user can move children of this folder within this drive. This is false when the item is not a folder.
GoogleDrive.File.File.capabilities.canMoveItemOutOfDriveBooleanWhether the current user can move this item outside of this drive by changing its parent.
GoogleDrive.File.File.capabilities.canMoveItemWithinDriveBooleanWhether the current user can move this item within this drive.
GoogleDrive.File.File.capabilities.canReadRevisionsBooleanWhether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
GoogleDrive.File.File.capabilities.canRemoveChildrenBooleanWhether the current user can remove children from this folder. This is always false when the item is not a folder.
GoogleDrive.File.File.capabilities.canRemoveMyDriveParentBooleanWhether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
GoogleDrive.File.File.capabilities.canRenameBooleanWhether the current user can rename this file.
GoogleDrive.File.File.capabilities.canShareBooleanWhether the current user can modify the sharing settings for this file.
GoogleDrive.File.File.capabilities.canTrashBooleanWhether the current user can move this file to trash.
GoogleDrive.File.File.capabilities.canUntrashBooleanWhether the current user can restore this file from trash.
GoogleDrive.File.File.copyRequiresWriterPermissionBooleanWhether the options to copy, print, or download this file, should be disabled for readers and commenters.
GoogleDrive.File.File.lastModifyingUser.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.lastModifyingUser.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.File.File.lastModifyingUser.meBooleanWhether this user is the requesting user.
GoogleDrive.File.File.lastModifyingUser.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.File.File.lastModifyingUser.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.File.File.linkShareMetadata.securityUpdateEligibleBooleanWhether the file is eligible for security update.
GoogleDrive.File.File.linkShareMetadata.securityUpdateEnabledBooleanWhether the security update is enabled for this file.
GoogleDrive.File.File.owners.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.owners.emailAddressStringThe email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
GoogleDrive.File.File.owners.meBooleanWhether this user is the requesting user.
GoogleDrive.File.File.owners.permissionIdStringThe user's ID as visible in Permission resources.
GoogleDrive.File.File.owners.photoLinkStringA link to the user's profile photo, if available.
GoogleDrive.File.File.permissionIdsStringList of permission IDs for users with access to this file.
GoogleDrive.File.File.permissions.deletedBooleanWhether the permission was deleted.
GoogleDrive.File.File.permissions.displayNameStringA plain text displayable name for this user.
GoogleDrive.File.File.permissions.emailAddressStringThe email address of the user.
GoogleDrive.File.File.permissions.idStringThe ID of this permission.
GoogleDrive.File.File.permissions.roleStringThe role granted by this permission.
GoogleDrive.File.File.permissions.typeStringThe type of the grantee.
GoogleDrive.File.File.permissions.photoLinkStringA link to the user's profile photo, if available.

google-drive-file-delete#


Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.

Base Command#

google-drive-file-delete

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
user_idThe user's primary email address.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional

Context Output#

PathTypeDescription
GoogleDrive.File.File.idStringID of the deleted file.

google-drive-file-permissions-list#


Lists a file's or shared drive's permissions.

Base Command#

google-drive-file-permissions-list

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
user_idThe user's primary email address.Optional
page_sizeMaximum number of shared drives to return. Acceptable values are 1 to 100, inclusive. Default is 100.Optional
page_tokenPage token for shared drives.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional
use_domain_admin_accessIssue the request as a domain administrator. If set to true, all shared drives of the domain in which the requester is an administrator are returned. Possible values are: true, false. Default is false.Optional

Context Output#

PathTypeDescription
GoogleDrive.FilePermission.FilePermission.deletedBooleanWhether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
GoogleDrive.FilePermission.FilePermission.displayNameStringThe "pretty" name of the value of the permission.
GoogleDrive.FilePermission.FilePermission.emailAddressStringThe email address of the user or group to which this permission refers.
GoogleDrive.FilePermission.FilePermission.idStringThe ID of this permission.
GoogleDrive.FilePermission.FilePermission.roleStringThe role granted by this permission.
GoogleDrive.FilePermission.FilePermission.typeStringThe type of the grantee.
GoogleDrive.FilePermission.FilePermission.photoLinkStringA link to the user's profile photo, if available.

google-drive-file-permission-create#


Creates a permission for a file or shared drive.

Base Command#

google-drive-file-permission-create

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
user_idThe user's primary email address.Optional
send_notification_emailWhether a confirmation email will be sent. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional
roleThe role granted by this permission. Possible values: "owner", "organizer", "fileOrganizer", "writer", "commenter", and "reader". Possible values are: owner, organizer, fileOrganizer, writer, commenter, reader. Default is reader.Optional
typeThe type of the grantee. When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. No extra information is required for an anyone type. Possible values: "user", "group", "domain", and "anyone". Possible values are: user, group, domain, anyone. Default is anyone.Optional
domainThe domain to which this permission refers.Optional
email_addressThe email address of the user or group to which this permission refers.Optional

Context Output#

PathTypeDescription
GoogleDrive.FilePermission.FilePermission.deletedBooleanWhether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
GoogleDrive.FilePermission.FilePermission.displayNameStringThe "pretty" name of the value of the permission.
GoogleDrive.FilePermission.FilePermission.emailAddressStringThe email address of the user or group to which this permission refers.
GoogleDrive.FilePermission.FilePermission.idStringThe ID of this permission.
GoogleDrive.FilePermission.FilePermission.roleStringThe role granted by this permission.
GoogleDrive.FilePermission.FilePermission.typeStringThe type of the grantee.
GoogleDrive.FilePermission.FilePermission.photoLinkStringA link to the user's profile photo, if available.

google-drive-file-permission-update#


Updates a permission with patch semantics.

Base Command#

google-drive-file-permission-update

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
user_idThe user's primary email address.Optional
expiration_timeThe time at which this permission will expire (RFC 3339 date-time).Optional
permission_idThe ID of the permission. Can be retrieved using the google-drive-file-permissions-list command.Optional
roleThe role granted by this permission. Possible values: "owner", "organizer", "fileOrganizer", "writer", "commenter", and "reader". Possible values are: owner, organizer, fileOrganizer, writer, commenter, reader. Default is reader.Optional

Context Output#

PathTypeDescription
GoogleDrive.FilePermission.FilePermission.deletedBooleanWhether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
GoogleDrive.FilePermission.FilePermission.displayNameStringThe "pretty" name of the value of the permission.
GoogleDrive.FilePermission.FilePermission.emailAddressStringThe email address of the user or group to which this permission refers.
GoogleDrive.FilePermission.FilePermission.idStringThe ID of this permission.
GoogleDrive.FilePermission.FilePermission.roleStringThe role granted by this permission.
GoogleDrive.FilePermission.FilePermission.typeStringThe type of the grantee.
GoogleDrive.FilePermission.FilePermission.photoLinkStringA link to the user's profile photo, if available.

google-drive-file-permission-delete#


Delete a permission.

Base Command#

google-drive-file-permission-delete

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
user_idThe user's primary email address.Optional
permission_idThe ID of the permission. Can be retrieved using the google-drive-file-permissions-list command.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional

Context Output#

There is no context output for this command.

google-drive-file-modify-label#


Modify labels to file.

Base Command#

google-drive-file-modify-label

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
user_idThe user's primary email address.Optional
label_idThe label id to set for the file.Optional
field_idthe field id of the label to set.Optional
selection_label_idthe label id to set for the field.Optional
remove_labelWhether the requesting application supports both My Drives and shared drives. Possible values: "true" and "false". Possible values are: true, false. Default is false.Optional

Context Output#

PathTypeDescription
GoogleDrive.Labels.kindStringThe type of resource. This is always drive#modifyLabelsResponse
GoogleDrive.Labels.modifiedLabels.fields.idStringThe ID of the label field selected
GoogleDrive.Labels.modifiedLabels.fields.kindStringKind of resource this is, in this case drive#labelField
GoogleDrive.Labels.modifiedLabels.fields.selectionStringSelected label.
GoogleDrive.Labels.modifiedLabels.fields.valueTypeStringThe type of data this label is representing.
GoogleDrive.Labels.modifiedLabels.idStringThe label id of the label to set
GoogleDrive.Labels.modifiedLabels.kindStringThe type of resource. This is always drive#label
GoogleDrive.Labels.modifiedLabels.revisionIdString

google-drive-get-labels#


Google Drive get labels.

Base Command#

google-drive-get-labels

Input#

Argument NameDescriptionRequired
user_idThe user's primary email address.Optional

Context Output#

PathTypeDescription
GoogleDrive.Labels.labels.appliedCapabilities.canApplyBooleanIs able to apply this label to files.
GoogleDrive.Labels.labels.appliedCapabilities.canReadBooleanIs able to read this label.
GoogleDrive.Labels.labels.appliedCapabilities.canRemoveBooleanIs able to remove this label from files.
GoogleDrive.Labels.labels.appliedLabelPolicy.copyModeStringCopy label to all descendants.
GoogleDrive.Labels.labels.createTimeDateTime at which this label was created.
GoogleDrive.Labels.labels.creator.personStringThe creator of this label.
GoogleDrive.Labels.labels.customerStringThe customer that owns this label.
GoogleDrive.Labels.labels.displayHints.priorityStringPriority of the label.
GoogleDrive.Labels.labels.displayHints.shownInApplyBooleanWhether this label is shown in the "Apply a label" dropdown.
GoogleDrive.Labels.labels.fields.appliedCapabilities.canReadBooleanIs the field readable.
GoogleDrive.Labels.labels.fields.appliedCapabilities.canSearchBooleanIs the field searchable.
GoogleDrive.Labels.labels.fields.appliedCapabilities.canWriteBooleanIs the field writable.
GoogleDrive.Labels.labels.fields.creator.personStringThe creator of this field.
GoogleDrive.Labels.labels.fields.displayHints.requiredBooleanIs this field required to be set by the user.
GoogleDrive.Labels.labels.fields.displayHints.shownInApplyBooleanShould this field be shown when editing the label.
GoogleDrive.Labels.labels.fields.idStringThe ID of the field.
GoogleDrive.Labels.labels.fields.lifecycle.stateStringThe lifecycle state of this field.
GoogleDrive.Labels.labels.fields.properties.displayNameStringThe display name of the property.
GoogleDrive.Labels.labels.fields.properties.requiredBooleanIs this property required to be set by the user.
GoogleDrive.Labels.labels.fields.publisher.personStringThe user who published this field.
GoogleDrive.Labels.labels.fields.queryKeyStringThe query key for this field.
GoogleDrive.Labels.labels.fields.schemaCapabilitiesUnknownSchema capabilities for this field.
GoogleDrive.Labels.labels.fields.selectionOptions.choices.appliedCapabilities.canReadBoolean
GoogleDrive.Labels.labels.fields.selectionOptions.choices.appliedCapabilities.canSearchBoolean
GoogleDrive.Labels.labels.fields.selectionOptions.choices.appliedCapabilities.canSelectBoolean
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.backgroundColor.blueNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.backgroundColor.greenNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.backgroundColor.redNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.foregroundColor.blueNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.foregroundColor.greenNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.foregroundColor.redNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.soloColor.blueNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.soloColor.greenNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgeColors.soloColor.redNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.badgePriorityString
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.backgroundColor.blueNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.backgroundColor.greenNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.backgroundColor.redNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.foregroundColor.blueNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.foregroundColor.greenNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.foregroundColor.redNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.soloColor.blueNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.soloColor.greenNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.darkBadgeColors.soloColor.redNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.displayHints.shownInApplyBoolean
GoogleDrive.Labels.labels.fields.selectionOptions.choices.idString
GoogleDrive.Labels.labels.fields.selectionOptions.choices.lifecycle.stateString
GoogleDrive.Labels.labels.fields.selectionOptions.choices.properties.badgeConfig.color.blueNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.properties.badgeConfig.color.greenNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.properties.badgeConfig.color.redNumber
GoogleDrive.Labels.labels.fields.selectionOptions.choices.properties.displayNameString
GoogleDrive.Labels.labels.fields.selectionOptions.choices.schemaCapabilitiesUnknown
GoogleDrive.Labels.labels.fields.updater.personString
GoogleDrive.Labels.labels.idString
GoogleDrive.Labels.labels.labelTypeString
GoogleDrive.Labels.labels.lifecycle.stateString
GoogleDrive.Labels.labels.nameString
GoogleDrive.Labels.labels.properties.titleString
GoogleDrive.Labels.labels.publishTimeDate
GoogleDrive.Labels.labels.publisher.personString
GoogleDrive.Labels.labels.revisionCreateTimeDate
GoogleDrive.Labels.labels.revisionCreator.personString
GoogleDrive.Labels.labels.revisionIdString
GoogleDrive.Labels.labels.schemaCapabilitiesUnknown
GoogleDrive.Labels.labels.fields.userOptionsUnknown

google-drive-get-file-labels#


Modify labels to file.

Base Command#

google-drive-get-file-labels

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Optional
user_idThe user's primary email address.Optional

Context Output#

PathTypeDescription
GoogleDrive.File.File.idStringThe ID of the file.
GoogleDrive.Labels.kindStringThe type of resource. This is always drive#labelList
GoogleDrive.Labels.labels.fields.idStringThe ID of the label field selected
GoogleDrive.Labels.labels.fields.kindStringThe kind of this field. This is always drive#labelField
GoogleDrive.Labels.labels.fields.selectionStringThe label field selected.
GoogleDrive.Labels.labels.fields.valueTypeStringThe type of data this label is representing.
GoogleDrive.Labels.labels.idStringThe label id of the label to set
GoogleDrive.Labels.labels.kindStringThe type of resource. This is always drive#label
GoogleDrive.Labels.labels.revisionIdStringThe revision id of the label

google-drive-file-copy#


Make a copy of a Google Drive file.

Base Command#

google-drive-file-copy

Input#

Argument NameDescriptionRequired
file_idThe ID of the file to copy.Required
copy_titleThe name of the copied file.Optional
user_idThe user's primary email address.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values are: true, false. Default is false.Optional

Context Output#

PathTypeDescription
GoogleDrive.File.File.kindStringThe content type of the file.
GoogleDrive.File.File.idStringThe ID of the copied file.
GoogleDrive.File.File.nameStringThe name of the copied file.
GoogleDrive.File.File.mimeTypeStringThe MIME type of the copied file.

Command example#

!google-drive-file-copy file_id="1O8Gx7DslVpbd-HN7lp4MIN1DDakpw-bHVHCwir2wUlo" copy_title="New Copy"

Context Example#

{
"GoogleDrive": {
"File": {
"File": {
"id": "1JBZfuJcRpnpv5wS5-RBxT5OGjfKMP1cCmqOBHCe7GPw",
"kind": "drive#file",
"mimeType": "application/vnd.google-apps.spreadsheet",
"name": "New Copy"
}
}
}
}

Human Readable Output#

File copied successfully.#

IdKindMimetypeName
1JBZfuJcRpnpv5wS5-RBxT5OGjfKMP1cCmqOBHCe7GPwdrive#fileapplication/vnd.google-apps.spreadsheetNew Copy

google-drive-file-get-parents#


Get parents of a Google Drive file.

Base Command#

google-drive-file-get-parents

Input#

Argument NameDescriptionRequired
file_idID of the requested file. Can be retrieved using the google-drive-files-list command.Required
user_idThe user's primary email address.Required
include_items_from_all_drivesWhether both My Drive and shared drive items should be included in the results. Possible values are: true, false. Default is false.Optional
supports_all_drivesWhether the requesting application supports both My Drives and shared drives. Possible values are: True, False. Default is False.Optional

Context Output#

PathTypeDescription
GoogleDrive.File.ParentsStringThe IDs of the parent folders which contain the file.