Google Drive
Performs Google Drive operations - manage files, folders, permissions, and shared drives.
Want to expose Google Drive actions as MCP tools for AI assistants? Use the Google Drive MCP Tool Pack to deploy all 22 tools in one step - no manual configuration needed.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Service Account JSON | secret | - | Google service account credentials JSON (required) |
| Delegate To | string | - | Email to impersonate via Domain-Wide Delegation |
| Action | select | - | The Google Drive operation to perform (required) |
| File ID | string | - | File or folder ID for file-specific operations |
| File Name | string | - | File or folder name |
| Folder ID | string | - | Parent folder ID (defaults to root) |
| Destination Folder ID | string | - | Target folder for move operations |
| MIME Type | string | - | MIME type for export, upload, or create operations |
| Content | string | - | Text content for file creation |
| File URL | string | - | URL to download file content from |
| Description | string | - | File description |
| string | - | Email address for permission operations | |
| Role | select | reader | Permission role: reader, writer, commenter, owner |
| Permission Type | select | user | Permission type: user, group, domain, anyone |
| Permission ID | string | - | Permission ID for removal |
| Query | string | - | Search query using Drive query syntax |
| Max Results | integer | 100 | Maximum results to return |
| Starred | boolean | false | Whether the file is starred |
| Folder Color | string | - | Folder color as hex |
| Custom Properties | string | - | JSON object of custom properties |
| Shared Drive Name | string | - | Name for new shared drive |
| Target File ID | string | - | Target file for shortcut creation |
| Send Notification | boolean | true | Send email when sharing |
Authentication
This processor supports two authentication methods: OAuth Connection (recommended for personal accounts) and Service Account (for server-to-server automation).
Option A: OAuth Connection (recommended)
OAuth lets you authorize Qaynaq to act as your Google account. Files are owned by you, using your quota. You authorize once and it works indefinitely.
Follow the Google OAuth Setup guide to create a connection. Make sure to enable the Google Drive API and add the auth/drive scope. Then select your connection from the OAuth Connection dropdown in the processor configuration.
Option B: Service Account
Service accounts are best for Google Workspace organizations with Domain-Wide Delegation.
Service accounts have their own 15GB storage quota. Files created by a service account count against its quota, even when placed in shared folders. For personal Google accounts, use OAuth instead.
Step 1: Create a Service Account
- Go to the Google Cloud Console
- Create a project or select an existing one
- Navigate to IAM & Admin > Service Accounts
- Click Create Service Account, give it a name, and click Done
- Click the service account, go to the Keys tab
- Click Add Key > Create new key > JSON
- Download the JSON key file
Step 2: Enable the Google Drive API
- In Google Cloud Console, go to APIs & Services > Library
- Search for Google Drive API and click Enable
Step 3: Store the Credentials
- Open the downloaded JSON key file and copy its entire contents
- In Qaynaq, go to Settings > Secrets
- Create a new secret (e.g. key:
GOOGLE_DRIVE_SA) and paste the JSON as the value - In the Google Drive processor, select
GOOGLE_DRIVE_SAfrom the Service Account JSON dropdown
Step 4: Share Files with the Service Account
A service account cannot access any files by default. You must explicitly share files or folders with the service account's email address:
- Open the JSON key file and find the
client_emailfield (e.g.my-service@my-project.iam.gserviceaccount.com) - Open a Google Drive folder or file and click Share
- Paste the service account email and grant Editor access
- Click Send (you can uncheck "Notify people" since it's a service account)
Domain-Wide Delegation (Google Workspace only)
As an alternative to sharing individual files, Google Workspace administrators can grant the service account access to all users' files via Domain-Wide Delegation:
- In Google Cloud Console, go to the service account details
- Enable Domain-Wide Delegation and note the Client ID
- In Google Workspace Admin Console, go to Security > API Controls > Domain-wide Delegation
- Add the Client ID with the scope
https://www.googleapis.com/auth/drive - Set the Delegate To field to the email of the user whose files you want to access
Actions
File Management
Copy File
Create a copy of the specified file.
Get File
Retrieve file or folder metadata by its ID.
Find File
Search for a specific file by name.
Find or Create File
Find a file by name, or create a new one if not found.
List Files
Retrieve a list of files based on query parameters.
Rename
Update the name of a file or folder.
Update Metadata
Update file or folder metadata including name, description, starred status, and custom properties.
Move File
Move a file from one folder to another.
Delete File (Trash)
Move a file to the trash.
Delete File (Permanent)
Permanently delete a file. This action cannot be undone.
Create Shortcut
Create a shortcut to a file.
Content Operations
Create File From Text
Create a new file from plain text content.
Upload File
Upload a file to Google Drive from a URL or content.
Export File
Export Google Workspace files (Docs, Sheets, Slides) to different formats like PDF, Word, Excel.
Replace File
Upload new content to replace an existing file.
Folder Operations
Create Folder
Create a new, empty folder.
Find Folder
Search for a specific folder by name.
Find or Create Folder
Find a folder by name, or create a new one if not found.
Create Shared Drive
Create a new shared drive (Team Drive).
Permissions & Sharing
Add File Sharing
Add a sharing permission to a file. Provides a sharing URL.
Remove File Permission
Remove specific user access to a file.
Get Permissions
List all users who have access to a file.
Dynamic Fields
All action parameter fields support Bento interpolation functions, allowing dynamic values from message content using ${!this.field_name} syntax. This enables processing batches of file operations or reacting to upstream data. For example, setting File ID to ${!this.file_id} will read the file ID from the incoming message.
Static fields (not interpolated): Service Account JSON, Delegate To, Action.
Output Format
All actions return a structured JSON object:
- File actions return a
fileobject containing file metadata (id, name, mime_type, web_view_link, etc.) - Folder actions return a
folderobject with folder metadata - List actions (list_files, find_file, find_folder) return an array and a
countfield - Permission actions return permission details or a permissions list
- find_or_create actions include a
createdboolean field - Delete actions return
{deleted: true, file_id: "..."}
Use a Mapping processor after Google Drive to extract specific fields from the response, such as the file ID or the sharing URL.