Skip to content

Connect EMQX Agents to Google Drive

The Google Drive connector lets EMQX Agents manage files, folders, permissions, comments, replies, and shared drives. Use it to store agent output, organize files, manage collaboration, and retrieve documents for a workflow.

Common Use Cases

  • Upload a generated report and share it with a team.
  • Search a Drive folder for the latest device specification.
  • Add a comment to a file after completing an analysis.
  • Move processed files to an archive folder.

Example chat prompt:

text
Use the operations-drive connector to find the latest weekly device report, add a comment summarizing the unresolved issues, and do not change file permissions.

Prerequisites

Before adding the connector, prepare:

  • A Google account with access to Google Drive.
  • Permission to authorize Composio to view, create, edit, and delete Google Drive files.
  • Access to the files, folders, and shared drives required by the workflow.

Add a Google Drive Connector

  1. In the left navigation menu, click Connectors.
  2. On the Available tab, locate Google Drive and click Add.
  3. Enter a descriptive connector name.
  4. Click Confirm. The Google authorization flow opens in a dialog.
  5. Select the Google account to connect, or click Use another account.
  6. If Google asks you to sign in to Composio again, review the information and click Continue.
  7. Review the access requested by Composio. The authorization includes permission to:
    • View, create, edit, and delete all Google Drive files available to the authorized account.
    • View your primary Google Account email address and associate you with your personal information on Google.
  8. Click Continue to grant access.
  9. Wait for Composio to display the successful connection message and return you to EMQX Agents.
  10. On the Added tab, verify that the connector status is Authorized.

Google may show permissions that were granted previously. Review the requested access before continuing. For a managed Google Workspace account, organization policies may prevent you from authorizing third-party applications.

Supported Tools

Files and Folders

ToolAccessDescription
GOOGLEDRIVE_COPY_FILE_ADVANCEDWriteCopies a file with options such as name and parent folder.
GOOGLEDRIVE_CREATE_FILEWriteCreates a file or folder from file metadata.
GOOGLEDRIVE_CREATE_FILE_FROM_TEXTWriteCreates a Drive file from text content.
GOOGLEDRIVE_CREATE_FOLDERWriteCreates a folder.
GOOGLEDRIVE_GOOGLE_DRIVE_DELETE_FOLDER_OR_FILE_ACTIONDestructivePermanently deletes a file or folder.
GOOGLEDRIVE_MOVE_FILEWriteMoves a file between folders.
GOOGLEDRIVE_RESUMABLE_UPLOADWriteUploads a large file by using a resumable upload.
GOOGLEDRIVE_TRASH_FILEDestructiveMoves a file to trash.
GOOGLEDRIVE_UNTRASH_FILEWriteRestores a file from trash.
GOOGLEDRIVE_UPDATE_FILE_PUTWriteUpdates file metadata such as name, description, or parent folder.
GOOGLEDRIVE_UPLOAD_FILEWriteUploads a file to Google Drive.
GOOGLEDRIVE_UPLOAD_UPDATE_FILEWriteUploads new content to update a Drive file.
ToolAccessDescription
GOOGLEDRIVE_DOWNLOAD_FILEReadDownloads a file by file ID.
GOOGLEDRIVE_DOWNLOAD_FILE_OPERATIONReadDownloads a file through a Drive download operation.
GOOGLEDRIVE_EXPORT_GOOGLE_WORKSPACE_FILEReadExports a Google Workspace file in a selected format.
GOOGLEDRIVE_FIND_FILEReadSearches for files and folders by name, content, or other criteria.
GOOGLEDRIVE_FIND_FOLDERReadSearches for folders by name, modification time, or other criteria.
GOOGLEDRIVE_GET_ABOUTReadGets current user, storage quota, and supported import and export format information.
GOOGLEDRIVE_GET_FILE_METADATAReadGets file metadata.
GOOGLEDRIVE_LIST_CHILDREN_V2ReadLists child files and folders in a folder.

Permissions

ToolAccessDescription
GOOGLEDRIVE_CREATE_PERMISSIONWriteCreates a permission for a file or shared drive.
GOOGLEDRIVE_DELETE_PERMISSIONDestructiveDeletes a permission from a file or shared drive.
GOOGLEDRIVE_GET_PERMISSION_ID_FOR_EMAILReadGets a Drive permission ID for an email address.
GOOGLEDRIVE_LIST_ACCESS_PROPOSALSReadLists access proposals for a file.
GOOGLEDRIVE_LIST_PERMISSIONSReadLists permissions for a file or shared drive.

Comments and Replies

ToolAccessDescription
GOOGLEDRIVE_CREATE_COMMENTWriteCreates a comment on a file.
GOOGLEDRIVE_CREATE_REPLYWriteReplies to a file comment.
GOOGLEDRIVE_DELETE_COMMENTDestructiveDeletes a comment.
GOOGLEDRIVE_DELETE_REPLYDestructiveDeletes a comment reply.
GOOGLEDRIVE_GET_COMMENTReadGets a file comment.
GOOGLEDRIVE_GET_REPLYReadGets a comment reply.
GOOGLEDRIVE_LIST_COMMENTSReadLists comments on a file.
GOOGLEDRIVE_LIST_REPLIESReadLists replies to a comment.
GOOGLEDRIVE_UPDATE_COMMENTWriteUpdates a comment.
GOOGLEDRIVE_UPDATE_REPLYWriteUpdates a comment reply.

Shared Drives

ToolAccessDescription
GOOGLEDRIVE_CREATE_DRIVEWriteCreates a shared drive.
GOOGLEDRIVE_DELETE_DRIVEDestructiveDeletes a shared drive.
GOOGLEDRIVE_GET_DRIVEReadGets shared drive details.
GOOGLEDRIVE_LIST_SHARED_DRIVESReadLists shared drives available to the authorized user.
GOOGLEDRIVE_UPDATE_DRIVEWriteUpdates a shared drive name, appearance, or restrictions.

Important Notice

The permanent delete tool cannot be reversed through the Google Drive trash. Permission changes can expose or remove access to files. Review the file, folder, shared drive, and principal before these operations.

Use the Connector in a Chat

  1. In the chat input area, click the connector icon.
  2. Select the authorized Google Drive connector.
  3. In the prompt, identify the external resource and operation that the agent should use.
  4. Review the generated agent definition and confirm that it contains only the required tools.

Permissions and Data Access

The connector uses the authorized Google account. File ownership, sharing settings, shared drive membership, and Google Workspace policies determine accessible resources and operations.

Do not include external service credentials or access tokens in the chat prompt or agent instructions.

Limitations

  • Google Drive API quotas and storage limits apply.
  • Export formats depend on the Google Workspace file type.
  • Shared drive operations can require organizer or administrator privileges.
  • Large uploads can require resumable upload operations.

Troubleshooting

SymptomResolution
The connector remains Unauthorized.Retry authorization, select the intended Google account, and click Continue to grant the requested access. For a managed Google Workspace account, verify that your administrator allows Composio.
A tool returns a permission error.Verify that the authorized account can access the target file, folder, or shared drive and that the required Google permissions are still granted. Reauthorize the connector if necessary.
A required tool is unavailable.Verify that the tool is supported and approved for this connector, then select the connector again in the chat.
Requests are rejected intermittently.Check the external service status, API quota, rate limits, and account plan.