Skip to main content

Google-Drive full reference

This is the full reference documentation for the Google-Drive agent connector.

Supported entities and actions

The Google-Drive connector supports the following entities and actions.

EntityActions
FilesList, Get, Download
Files ExportDownload
DrivesList, Get
PermissionsList, Get
CommentsList, Get
RepliesList, Get
RevisionsList, Get
ChangesList
Changes Start Page TokenGet
AboutGet

Files

Files List

Lists the user's files. Returns a paginated list of files.

Python SDK

await google_drive.files.list()

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "files",
"action": "list"
}'

Parameters

Parameter NameTypeRequiredDescription
pageSizeintegerNoMaximum number of files to return per page (1-1000)
pageTokenstringNoToken for continuing a previous list request
qstringNoQuery string for searching files
orderBystringNoSort order (e.g., 'modifiedTime desc', 'name')
fieldsstringNoFields to include in the response
spacesstringNoComma-separated list of spaces to query (drive, appDataFolder)
corporastringNoBodies of items to search (user, drive, allDrives)
driveIdstringNoID of the shared drive to search
includeItemsFromAllDrivesbooleanNoWhether to include items from all drives
supportsAllDrivesbooleanNoWhether the requesting application supports both My Drives and shared drives
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
namestring | null
mimeTypestring | null
descriptionstring | null
starredboolean | null
trashedboolean | null
explicitlyTrashedboolean | null
parentsarray | null
propertiesobject | null
appPropertiesobject | null
spacesarray | null
versionstring | null
webContentLinkstring | null
webViewLinkstring | null
iconLinkstring | null
hasThumbnailboolean | null
thumbnailLinkstring | null
thumbnailVersionstring | null
viewedByMeboolean | null
viewedByMeTimestring | null
createdTimestring | null
modifiedTimestring | null
modifiedByMeTimestring | null
modifiedByMeboolean | null
sharedWithMeTimestring | null
sharingUserobject | any
ownersarray | null
owners[].kindstring | null
owners[].displayNamestring | null
owners[].photoLinkstring | null
owners[].meboolean | null
owners[].permissionIdstring | null
owners[].emailAddressstring | null
driveIdstring | null
lastModifyingUserobject | any
sharedboolean | null
ownedByMeboolean | null
capabilitiesobject | null
viewersCanCopyContentboolean | null
copyRequiresWriterPermissionboolean | null
writersCanShareboolean | null
permissionIdsarray | null
folderColorRgbstring | null
originalFilenamestring | null
fullFileExtensionstring | null
fileExtensionstring | null
md5Checksumstring | null
sha1Checksumstring | null
sha256Checksumstring | null
sizestring | null
quotaBytesUsedstring | null
headRevisionIdstring | null
isAppAuthorizedboolean | null
exportLinksobject | null
shortcutDetailsobject | null
contentRestrictionsarray | null
resourceKeystring | null
linkShareMetadataobject | null
labelInfoobject | null
trashedTimestring | null
trashingUserobject | any
imageMediaMetadataobject | null
videoMediaMetadataobject | null

Meta

Field NameTypeDescription
nextPageTokenstring | null
incompleteSearchboolean | null

Files Get

Gets a file's metadata by ID

Python SDK

await google_drive.files.get(
file_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "files",
"action": "get",
"params": {
"fileId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file
fieldsstringNoFields to include in the response
supportsAllDrivesbooleanNoWhether the requesting application supports both My Drives and shared drives
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
namestring | null
mimeTypestring | null
descriptionstring | null
starredboolean | null
trashedboolean | null
explicitlyTrashedboolean | null
parentsarray | null
propertiesobject | null
appPropertiesobject | null
spacesarray | null
versionstring | null
webContentLinkstring | null
webViewLinkstring | null
iconLinkstring | null
hasThumbnailboolean | null
thumbnailLinkstring | null
thumbnailVersionstring | null
viewedByMeboolean | null
viewedByMeTimestring | null
createdTimestring | null
modifiedTimestring | null
modifiedByMeTimestring | null
modifiedByMeboolean | null
sharedWithMeTimestring | null
sharingUserobject | any
ownersarray | null
owners[].kindstring | null
owners[].displayNamestring | null
owners[].photoLinkstring | null
owners[].meboolean | null
owners[].permissionIdstring | null
owners[].emailAddressstring | null
driveIdstring | null
lastModifyingUserobject | any
sharedboolean | null
ownedByMeboolean | null
capabilitiesobject | null
viewersCanCopyContentboolean | null
copyRequiresWriterPermissionboolean | null
writersCanShareboolean | null
permissionIdsarray | null
folderColorRgbstring | null
originalFilenamestring | null
fullFileExtensionstring | null
fileExtensionstring | null
md5Checksumstring | null
sha1Checksumstring | null
sha256Checksumstring | null
sizestring | null
quotaBytesUsedstring | null
headRevisionIdstring | null
isAppAuthorizedboolean | null
exportLinksobject | null
shortcutDetailsobject | null
contentRestrictionsarray | null
resourceKeystring | null
linkShareMetadataobject | null
labelInfoobject | null
trashedTimestring | null
trashingUserobject | any
imageMediaMetadataobject | null
videoMediaMetadataobject | null

Files Download

Downloads the binary content of a file. This works for non-Google Workspace files (PDFs, images, zip files, etc.). For Google Docs, Sheets, Slides, or Drawings, use the export action instead.

Python SDK

async for chunk in google_drive.files.download(    file_id="<str>",    alt="<str>"):# Process each chunk (e.g., write to file)
file.write(chunk)

Note: Download operations return an async iterator of bytes chunks for memory-efficient streaming. Use async for to process chunks as they arrive.

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "files",
"action": "download",
"params": {
"fileId": "<str>",
"alt": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file to download
alt"media"YesMust be set to 'media' to download file content
acknowledgeAbusebooleanNoWhether the user is acknowledging the risk of downloading known malware or other abusive files
supportsAllDrivesbooleanNoWhether the requesting application supports both My Drives and shared drives
range_headerstringNoOptional Range header for partial downloads (e.g., 'bytes=0-99')

Files Export

Files Export Download

Exports a Google Workspace file (Docs, Sheets, Slides, Drawings) to a specified format. Common export formats:

  • application/pdf (all types)
  • text/plain (Docs)
  • text/csv (Sheets)
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document (Docs to .docx)
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (Sheets to .xlsx)
  • application/vnd.openxmlformats-officedocument.presentationml.presentation (Slides to .pptx) Note: Export has a 10MB limit. For larger files, use the Drive UI.

Python SDK

async for chunk in google_drive.files_export.download(    file_id="<str>",    mime_type="<str>"):# Process each chunk (e.g., write to file)
file.write(chunk)

Note: Download operations return an async iterator of bytes chunks for memory-efficient streaming. Use async for to process chunks as they arrive.

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "files_export",
"action": "download",
"params": {
"fileId": "<str>",
"mimeType": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the Google Workspace file to export
mimeTypestringYesThe MIME type of the format to export to. Common values:
  • application/pdf
  • text/plain
  • text/csv
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/vnd.openxmlformats-officedocument.presentationml.presentation | | range_header | string | No | Optional Range header for partial downloads (e.g., 'bytes=0-99') |

Drives

Drives List

Lists the user's shared drives

Python SDK

await google_drive.drives.list()

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "drives",
"action": "list"
}'

Parameters

Parameter NameTypeRequiredDescription
pageSizeintegerNoMaximum number of shared drives to return (1-100)
pageTokenstringNoToken for continuing a previous list request
qstringNoQuery string for searching shared drives
useDomainAdminAccessbooleanNoIssue the request as a domain administrator
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
namestring | null
colorRgbstring | null
backgroundImageLinkstring | null
backgroundImageFileobject | null
capabilitiesobject | null
themeIdstring | null
createdTimestring | null
hiddenboolean | null
restrictionsobject | null
orgUnitIdstring | null

Meta

Field NameTypeDescription
nextPageTokenstring | null

Drives Get

Gets a shared drive's metadata by ID

Python SDK

await google_drive.drives.get(
drive_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "drives",
"action": "get",
"params": {
"driveId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
driveIdstringYesThe ID of the shared drive
useDomainAdminAccessbooleanNoIssue the request as a domain administrator
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
namestring | null
colorRgbstring | null
backgroundImageLinkstring | null
backgroundImageFileobject | null
capabilitiesobject | null
themeIdstring | null
createdTimestring | null
hiddenboolean | null
restrictionsobject | null
orgUnitIdstring | null

Permissions

Permissions List

Lists a file's or shared drive's permissions

Python SDK

await google_drive.permissions.list(
file_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "permissions",
"action": "list",
"params": {
"fileId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file or shared drive
pageSizeintegerNoMaximum number of permissions to return (1-100)
pageTokenstringNoToken for continuing a previous list request
supportsAllDrivesbooleanNoWhether the requesting application supports both My Drives and shared drives
useDomainAdminAccessbooleanNoIssue the request as a domain administrator
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
typestring | null
emailAddressstring | null
domainstring | null
rolestring | null
viewstring | null
allowFileDiscoveryboolean | null
displayNamestring | null
photoLinkstring | null
expirationTimestring | null
teamDrivePermissionDetailsarray | null
permissionDetailsarray | null
deletedboolean | null
pendingOwnerboolean | null

Meta

Field NameTypeDescription
nextPageTokenstring | null

Permissions Get

Gets a permission by ID

Python SDK

await google_drive.permissions.get(
file_id="<str>",
permission_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "permissions",
"action": "get",
"params": {
"fileId": "<str>",
"permissionId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file
permissionIdstringYesThe ID of the permission
supportsAllDrivesbooleanNoWhether the requesting application supports both My Drives and shared drives
useDomainAdminAccessbooleanNoIssue the request as a domain administrator
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
typestring | null
emailAddressstring | null
domainstring | null
rolestring | null
viewstring | null
allowFileDiscoveryboolean | null
displayNamestring | null
photoLinkstring | null
expirationTimestring | null
teamDrivePermissionDetailsarray | null
permissionDetailsarray | null
deletedboolean | null
pendingOwnerboolean | null

Comments

Comments List

Lists a file's comments

Python SDK

await google_drive.comments.list(
file_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "comments",
"action": "list",
"params": {
"fileId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file
pageSizeintegerNoMaximum number of comments to return (1-100)
pageTokenstringNoToken for continuing a previous list request
startModifiedTimestringNoMinimum value of modifiedTime to filter by (RFC 3339)
includeDeletedbooleanNoWhether to include deleted comments
fieldsstringNoFields to include in the response (required for comments)
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
createdTimestring | null
modifiedTimestring | null
authorobject | any
htmlContentstring | null
contentstring | null
deletedboolean | null
resolvedboolean | null
quotedFileContentobject | null
anchorstring | null
repliesarray | null
replies[].kindstring | null
replies[].idstring
replies[].createdTimestring | null
replies[].modifiedTimestring | null
replies[].authorobject | any
replies[].htmlContentstring | null
replies[].contentstring | null
replies[].deletedboolean | null
replies[].actionstring | null
mentionedEmailAddressesarray | null
assigneeEmailAddressstring | null

Meta

Field NameTypeDescription
nextPageTokenstring | null

Comments Get

Gets a comment by ID

Python SDK

await google_drive.comments.get(
file_id="<str>",
comment_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "comments",
"action": "get",
"params": {
"fileId": "<str>",
"commentId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file
commentIdstringYesThe ID of the comment
includeDeletedbooleanNoWhether to return deleted comments
fieldsstringNoFields to include in the response (required for comments)
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
createdTimestring | null
modifiedTimestring | null
authorobject | any
htmlContentstring | null
contentstring | null
deletedboolean | null
resolvedboolean | null
quotedFileContentobject | null
anchorstring | null
repliesarray | null
replies[].kindstring | null
replies[].idstring
replies[].createdTimestring | null
replies[].modifiedTimestring | null
replies[].authorobject | any
replies[].htmlContentstring | null
replies[].contentstring | null
replies[].deletedboolean | null
replies[].actionstring | null
mentionedEmailAddressesarray | null
assigneeEmailAddressstring | null

Replies

Replies List

Lists a comment's replies

Python SDK

await google_drive.replies.list(
file_id="<str>",
comment_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "replies",
"action": "list",
"params": {
"fileId": "<str>",
"commentId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file
commentIdstringYesThe ID of the comment
pageSizeintegerNoMaximum number of replies to return (1-100)
pageTokenstringNoToken for continuing a previous list request
includeDeletedbooleanNoWhether to include deleted replies
fieldsstringNoFields to include in the response (required for replies)
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
createdTimestring | null
modifiedTimestring | null
authorobject | any
htmlContentstring | null
contentstring | null
deletedboolean | null
actionstring | null

Meta

Field NameTypeDescription
nextPageTokenstring | null

Replies Get

Gets a reply by ID

Python SDK

await google_drive.replies.get(
file_id="<str>",
comment_id="<str>",
reply_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "replies",
"action": "get",
"params": {
"fileId": "<str>",
"commentId": "<str>",
"replyId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file
commentIdstringYesThe ID of the comment
replyIdstringYesThe ID of the reply
includeDeletedbooleanNoWhether to return deleted replies
fieldsstringNoFields to include in the response (required for replies)
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
createdTimestring | null
modifiedTimestring | null
authorobject | any
htmlContentstring | null
contentstring | null
deletedboolean | null
actionstring | null

Revisions

Revisions List

Lists a file's revisions

Python SDK

await google_drive.revisions.list(
file_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "revisions",
"action": "list",
"params": {
"fileId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file
pageSizeintegerNoMaximum number of revisions to return (1-1000)
pageTokenstringNoToken for continuing a previous list request
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
mimeTypestring | null
modifiedTimestring | null
keepForeverboolean | null
publishedboolean | null
publishedLinkstring | null
publishAutoboolean | null
publishedOutsideDomainboolean | null
lastModifyingUserobject | any
originalFilenamestring | null
md5Checksumstring | null
sizestring | null
exportLinksobject | null

Meta

Field NameTypeDescription
nextPageTokenstring | null

Revisions Get

Gets a revision's metadata by ID

Python SDK

await google_drive.revisions.get(
file_id="<str>",
revision_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "revisions",
"action": "get",
"params": {
"fileId": "<str>",
"revisionId": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
fileIdstringYesThe ID of the file
revisionIdstringYesThe ID of the revision
Response Schema

Records

Field NameTypeDescription
kindstring | null
idstring
mimeTypestring | null
modifiedTimestring | null
keepForeverboolean | null
publishedboolean | null
publishedLinkstring | null
publishAutoboolean | null
publishedOutsideDomainboolean | null
lastModifyingUserobject | any
originalFilenamestring | null
md5Checksumstring | null
sizestring | null
exportLinksobject | null

Changes

Changes List

Lists the changes for a user or shared drive

Python SDK

await google_drive.changes.list(
page_token="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "changes",
"action": "list",
"params": {
"pageToken": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
pageTokenstringYesToken for the page of changes to retrieve (from changes.getStartPageToken or previous response)
pageSizeintegerNoMaximum number of changes to return (1-1000)
driveIdstringNoThe shared drive from which changes are returned
includeItemsFromAllDrivesbooleanNoWhether to include changes from all drives
supportsAllDrivesbooleanNoWhether the requesting application supports both My Drives and shared drives
spacesstringNoComma-separated list of spaces to query
includeRemovedbooleanNoWhether to include changes indicating that items have been removed
restrictToMyDrivebooleanNoWhether to restrict the results to changes inside the My Drive hierarchy
Response Schema

Records

Field NameTypeDescription
kindstring | null
removedboolean | null
fileobject | any
fileIdstring | null
driveIdstring | null
driveobject | any
timestring | null
typestring | null
changeTypestring | null

Meta

Field NameTypeDescription
nextPageTokenstring | null
newStartPageTokenstring | null

Changes Start Page Token

Changes Start Page Token Get

Gets the starting pageToken for listing future changes

Python SDK

await google_drive.changes_start_page_token.get()

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "changes_start_page_token",
"action": "get"
}'

Parameters

Parameter NameTypeRequiredDescription
driveIdstringNoThe ID of the shared drive for which the starting pageToken is returned
supportsAllDrivesbooleanNoWhether the requesting application supports both My Drives and shared drives

About

About Get

Gets information about the user, the user's Drive, and system capabilities

Python SDK

await google_drive.about.get()

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "about",
"action": "get"
}'

Parameters

Parameter NameTypeRequiredDescription
fieldsstringNoFields to include in the response (use * for all fields)

Authentication

The Google-Drive connector supports the following authentication methods.

OAuth 2.0 Authentication

Field NameTypeRequiredDescription
access_tokenstrNoYour Google OAuth2 Access Token (optional, will be obtained via refresh)
refresh_tokenstrYesYour Google OAuth2 Refresh Token
client_idstrYesYour Google OAuth2 Client ID
client_secretstrYesYour Google OAuth2 Client Secret

Example

Python SDK

GoogleDriveConnector(
auth_config=GoogleDriveAuthConfig(
access_token="<Your Google OAuth2 Access Token (optional, will be obtained via refresh)>",
refresh_token="<Your Google OAuth2 Refresh Token>",
client_id="<Your Google OAuth2 Client ID>",
client_secret="<Your Google OAuth2 Client Secret>"
)
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"connector_definition_id": "9f8dda77-1048-4368-815b-269bf54ee9b8",
"auth_config": {
"access_token": "<Your Google OAuth2 Access Token (optional, will be obtained via refresh)>",
"refresh_token": "<Your Google OAuth2 Refresh Token>",
"client_id": "<Your Google OAuth2 Client ID>",
"client_secret": "<Your Google OAuth2 Client Secret>"
},
"name": "My Google-Drive Connector"
}'