Googledrive

Learn how to use Googledrive with Composio

Overview

Enum

GOOGLEDRIVE

Description

Google Drive is a cloud storage solution for uploading, sharing, and collaborating on files across devices, with robust search and offline access

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/userinfo.email
token
stringRequired

Actions

Tool to create a comment on a file. use when you need to add a new comment to a specific file in google drive.

Action Parameters

anchor
string
content
stringRequired
file_id
stringRequired
quotedFileContent.mimeType
string
quotedFileContent.value
string

Action Response

data
object
error
string
successful
boolean
Tool to create a new shared drive. use when you need to programmatically create a new shared drive for collaboration or storage.

Action Parameters

backgroundImageFile
object
colorRgb
string
hidden
boolean
name
stringRequired
requestId
stringRequired
themeId
string

Action Response

data
object
error
string
successful
boolean
Creates a new file or folder with metadata. use to create empty files or folders, or files with content by providing it in the request body (though this action primarily focuses on metadata creation).

Action Parameters

description
string
fields
string
mimeType
string
name
string
parents
array
starred
boolean

Action Response

data
object
error
string
successful
boolean
Creates a new folder in google drive, optionally within a parent folder specified by its id or name; if a parent name is provided but not found, the action will fail.

Action Parameters

folder_name
stringRequired
parent_id
string

Action Response

data
object
error
string
successful
boolean
Tool to create a reply to a comment in google drive. use when you need to respond to an existing comment on a file.

Action Parameters

action
string
comment_id
stringRequired
content
stringRequired
fields
string
file_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to create a shortcut to a file or folder in google drive. use when you need to link to an existing drive item from another location without duplicating it.

Action Parameters

ignoreDefaultVisibility
boolean
includeLabels
string
includePermissionsForView
string
keepRevisionForever
boolean
name
stringRequired
supportsAllDrives
boolean
target_id
stringRequired
target_mime_type
string

Action Response

data
object
error
string
successful
boolean
Deletes a comment from a file. use when you need to remove a specific comment from a google drive file.

Action Parameters

comment_id
stringRequired
file_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to permanently delete a shared drive. use when you need to remove a shared drive and its contents (if specified).

Action Parameters

allowItemDeletion
boolean
driveId
stringRequired
useDomainAdminAccess
boolean

Action Response

data
object
error
string
successful
boolean
Deletes a permission from a file by permission id. use when you need to revoke access for a specific user or group from a file.

Action Parameters

file_id
stringRequired
permission_id
stringRequired
supportsAllDrives
boolean
useDomainAdminAccess
boolean

Action Response

data
object
error
string
successful
boolean
Tool to delete a specific reply by reply id. use when you need to remove a reply from a comment on a file.

Action Parameters

comment_id
stringRequired
file_id
stringRequired
reply_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Download a file from google drive

Action Parameters

file_id
stringRequired
mime_type
string

Action Response

data
object
error
string
successful
boolean
Tool to permanently delete all of the user's trashed files. use when you want to empty the trash in google drive.

Action Parameters

driveId
string
enforceSingleParent
boolean

Action Response

data
object
error
string
successful
boolean
Modifies the set of labels applied to a file. returns a list of the labels that were added or modified. use when you need to programmatically change labels on a google drive file, such as adding, updating, or removing them.

Action Parameters

file_id
stringRequired
kind
stringDefaults to drive#modifyLabelsRequest
label_modifications
arrayRequired

Action Response

data
object
error
string
successful
boolean
Generates a set of file ids which can be provided in create or copy requests. use when you need to pre-allocate ids for new files or copies.

Action Parameters

count
integer
space
string
type
string

Action Response

data
object
error
string
successful
boolean
Tool to retrieve information about the user, the user's drive, and system capabilities. use when you need to check storage quotas, user details, or supported import/export formats.

Action Parameters

fields
string

Action Response

data
object
error
string
successful
boolean
Tool to get the starting pagetoken for listing future changes in google drive. use this when you need to track changes to files and folders.

Action Parameters

driveId
string
supportsAllDrives
boolean
supportsTeamDrives
boolean
teamDriveId
string

Action Response

data
object
error
string
successful
boolean
Tool to get a comment by id. use when you need to retrieve a specific comment from a google drive file and have both the file id and comment id.

Action Parameters

commentId
stringRequired
fileId
stringRequired
includeDeleted
boolean

Action Response

data
object
error
string
successful
boolean
Tool to get a shared drive by id. use when you need to retrieve information about a specific shared drive.

Action Parameters

drive_id
stringRequired
use_domain_admin_access
boolean

Action Response

data
object
error
string
successful
boolean
Tool to get a file's metadata by id. use when you need to retrieve the metadata for a specific file in google drive.

Action Parameters

acknowledgeAbuse
boolean
fileId
stringRequired
includeLabels
string
includePermissionsForView
string
supportsAllDrives
boolean

Action Response

data
object
error
string
successful
boolean
Gets a permission by id. use this tool to retrieve a specific permission for a file or shared drive.

Action Parameters

file_id
stringRequired
permission_id
stringRequired
supports_all_drives
boolean
use_domain_admin_access
boolean

Action Response

data
object
error
string
successful
boolean
Tool to get a specific reply to a comment on a file. use when you need to retrieve the details of a particular reply.

Action Parameters

commentId
stringRequired
fileId
stringRequired
includeDeleted
boolean
replyId
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to get a specific revision's metadata by revision id. use when you need to retrieve information about a particular version of a file.

Action Parameters

acknowledge_abuse
boolean
file_id
stringRequired
revision_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to hide a shared drive from the default view. use when you want to remove a shared drive from the user's main google drive interface without deleting it.

Action Parameters

drive_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to list the changes for a user or shared drive. use when you need to track modifications to files and folders, such as creations, deletions, or permission changes. this action requires a `pagetoken` which can be initially obtained using the `get changes start page token` action or from a previous `list changes` response.

Action Parameters

driveId
string
includeCorpusRemovals
boolean
includeItemsFromAllDrives
boolean
includeLabels
string
includePermissionsForView
string
includeRemoved
booleanDefaults to True
pageSize
integerDefaults to 100
pageToken
stringRequired
restrictToMyDrive
boolean
spaces
stringDefaults to drive
supportsAllDrives
boolean

Action Response

data
object
error
string
successful
boolean
Tool to list all comments for a file in google drive. use when you need to retrieve comments associated with a specific file.

Action Parameters

fileId
stringRequired
includeDeleted
boolean
pageSize
integerDefaults to 20
pageToken
string
startModifiedTime
string

Action Response

data
object
error
string
successful
boolean
Tool to list a user's files and folders in google drive. use this to search or browse for files and folders based on various criteria.

Action Parameters

corpora
string
driveId
string
fields
string
includeItemsFromAllDrives
boolean
includeLabels
string
includePermissionsForView
string
orderBy
string
pageSize
integerDefaults to 100
pageToken
string
q
string
spaces
string
supportsAllDrives
boolean

Action Response

data
object
error
string
successful
boolean
Tool to list the labels on a file. use when you need to retrieve all labels associated with a specific file in google drive.

Action Parameters

file_id
stringRequired
max_results
integer
page_token
string

Action Response

data
object
error
string
successful
boolean
Tool to list a file's permissions. use when you need to retrieve all permissions associated with a specific file or shared drive.

Action Parameters

fileId
stringRequired
includePermissionsForView
string
pageSize
integer
pageToken
string
supportsAllDrives
boolean
useDomainAdminAccess
boolean

Action Response

data
object
error
string
successful
boolean
Tool to list replies to a comment in google drive. use this when you need to retrieve all replies associated with a specific comment on a file.

Action Parameters

comment_id
stringRequired
file_id
stringRequired
include_deleted
boolean
page_size
integer
page_token
string

Action Response

data
object
error
string
successful
boolean
Tool to list a file's revisions. use when you need to retrieve the revision history of a specific file in google drive.

Action Parameters

fileId
stringRequired
pageSize
integer
pageToken
string

Action Response

data
object
error
string
successful
boolean
Tool to list the user's shared drives. use when you need to get a list of all shared drives accessible to the authenticated user.

Action Parameters

pageSize
integer
pageToken
string
q
string
useDomainAdminAccess
boolean

Action Response

data
object
error
string
successful
boolean
Tool to move a file from one folder to another in google drive. use when you need to reorganize files by changing their parent folder(s).

Action Parameters

add_parents
string
file_id
stringRequired
include_labels
string
include_permissions_for_view
string
keep_revision_forever
boolean
ocr_language
string
remove_parents
string
supports_all_drives
boolean
use_content_as_indexable_text
boolean

Action Response

data
object
error
string
successful
boolean
Deprecated: exports google workspace files (max 10mb) to a specified format using `mime type`, or downloads other file types; use `googledrive download file` instead.

Action Parameters

file_id
stringRequired
mime_type
string

Action Response

data
object
error
string
successful
boolean
Tool to stop watching resources through a specified channel. use this when you want to stop receiving notifications for a previously established watch.

Action Parameters

address
string
channelType
string
expiration
string
id
stringRequired
kind
stringDefaults to api#channel
params
object
payload
boolean
resourceId
stringRequired
resourceUri
string
token
string

Action Response

data
object
error
string
successful
boolean
Tool to unhide a shared drive. use when you need to restore a shared drive to the default view.

Action Parameters

driveId
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to restore a file from the trash. use when you need to recover a deleted file. this action updates the file's metadata to set the 'trashed' property to false.

Action Parameters

file_id
stringRequired
supportsAllDrives
boolean

Action Response

data
object
error
string
successful
boolean
Tool to update an existing comment on a google drive file. use when you need to change the content or status (e.g., resolve) of a comment.

Action Parameters

comment_id
stringRequired
content
string
fields
string
file_id
stringRequired
resolved
boolean

Action Response

data
object
error
string
successful
boolean
Tool to update the metadata for a shared drive. use when you need to modify properties like the name, theme, background image, or restrictions of a shared drive.

Action Parameters

backgroundImageFile
object
colorRgb
string
driveId
stringRequired
hidden
boolean
name
string
restrictions
object
themeId
string
useDomainAdminAccess
boolean

Action Response

data
object
error
string
successful
boolean
Updates file metadata. uses patch semantics (partial update) as per google drive api v3. use this tool to modify attributes of an existing file like its name, description, or parent folders. note: this action currently supports metadata updates only. file content updates require multipart/related upload and are not yet implemented.

Action Parameters

add_parents
string
description
string
file_id
stringRequired
keep_revision_forever
boolean
mime_type
string
name
string
ocr_language
string
remove_parents
string
starred
boolean
supports_all_drives
boolean
use_domain_admin_access
boolean
viewers_can_copy_content
boolean
writers_can_share
boolean

Action Response

data
object
error
string
successful
boolean
Updates metadata of a file revision (e.g., keepforever, publish). use this tool to modify the metadata of a specific revision of a file in google drive.

Action Parameters

file_id
stringRequired
keep_forever
boolean
publishAuto
boolean
published
boolean
publishedOutsideDomain
boolean
revision_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to update a permission with patch semantics. use when you need to modify an existing permission for a file or shared drive.

Action Parameters

enforceExpansiveAccess
boolean
fileId
stringRequired
permission
objectRequired
permissionId
stringRequired
removeExpiration
boolean
supportsAllDrives
boolean
transferOwnership
boolean
useDomainAdminAccess
boolean

Action Response

data
object
error
string
successful
boolean
Tool to update a reply to a comment on a google drive file. use when you need to modify the content of an existing reply.

Action Parameters

comment_id
stringRequired
content
stringRequired
fields
string
file_id
stringRequired
reply_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Uploads a file (max 5mb) to google drive, moving it to a specified folder if a valid folder id is provided, otherwise uploads to root.

Action Parameters

file_to_upload
objectRequired
folder_to_upload_to
string

Action Response

data
object
error
string
successful
boolean
Tool to subscribe to changes for a user or shared drive in google drive. use when you need to monitor a google drive for modifications and receive notifications at a specified webhook url.

Action Parameters

address
stringRequired
drive_id
string
expiration
integer
id
stringRequired
include_corpus_removals
boolean
include_items_from_all_drives
boolean
include_labels
string
include_permissions_for_view
string
include_removed
booleanDefaults to True
page_size
integerDefaults to 100
page_token
string
params
object
restrict_to_my_drive
boolean
spaces
stringDefaults to drive
supports_all_drives
boolean
token
string
type
stringRequired

Action Response

data
object
error
string
successful
boolean
Modifies sharing permissions for an existing google drive file, granting a specified role to a user, group, domain, or 'anyone'.

Action Parameters

domain
string
email_address
string
file_id
stringRequired
role
stringRequired
type
stringRequired

Action Response

data
object
error
string
successful
boolean
Duplicates an existing file in google drive, identified by its `file id`.

Action Parameters

file_id
stringRequired
new_title
string

Action Response

data
object
error
string
successful
boolean
Creates a new file in google drive from provided text content (up to 10mb), supporting various formats including automatic conversion to google workspace types.

Action Parameters

file_name
stringRequired
mime_type
stringDefaults to text/plain
parent_id
string
text_content
stringRequired

Action Response

data
object
error
string
successful
boolean
Updates an existing google drive file by overwriting its entire content with new text (max 10mb).

Action Parameters

content
stringRequired
file_id
stringRequired
mime_type
stringDefaults to text/plain

Action Response

data
object
error
string
successful
boolean
Tool to list or search for files and folders in google drive. use when you need to find specific files based on query criteria or list contents of a drive/folder.

Action Parameters

corpora
string
driveId
string
fields
stringDefaults to *
includeItemsFromAllDrives
boolean
orderBy
string
pageSize
integerDefaults to 100
pageToken
string
q
string
spaces
stringDefaults to drive
supportsAllDrives
booleanDefaults to True

Action Response

data
object
error
string
successful
boolean
Tool to find a folder in google drive by its name and optionally a parent folder. use when you need to locate a specific folder to perform further actions like creating files in it or listing its contents.

Action Parameters

full_text_contains
string
full_text_not_contains
string
modified_after
string
name_contains
string
name_exact
string
name_not_contains
string
starred
boolean

Action Response

data
object
error
string
successful
boolean
Tool to delete a file or folder in google drive. use when you need to permanently remove a specific file or folder using its id. note: this action is irreversible.

Action Parameters

fileId
stringRequired
supportsAllDrives
boolean

Action Response

data
object
error
string
successful
boolean