Skip to main content

Google Drive Bubble

Google Drive integration for file management

Quick Start

import { GoogleDriveBubble } from '@bubblelab/bubble-core';
import { CredentialType } from '@bubblelab/shared-schemas';
const result = await new GoogleDriveBubble({
operation: 'upload_file',
credentials: {
[CredentialType.GOOGLE_DRIVE_CRED]: process.env.GOOGLE_DRIVE_CRED as string,
},
}).action();

Operation Details

upload_file

operation 'upload_file' required
Upload a file to Google Drive
name string required
Name for the uploaded file
content string required
File content as base64 encoded string or plain text
mimeType string
MIME type of the file (auto-detected if not provided)
parent_folder_id string
ID of the parent folder (uploads to root if not provided)
convert_to_google_docs boolean
Convert uploaded file to Google Docs format if possible
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

download_file

operation 'download_file' required
Download a file from Google Drive
file_id string required
Google Drive file ID to download
export_format string
Export format for Google Workspace files (e.g., "application/pdf", "text/plain")
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

list_files

operation 'list_files' required
List files and folders in Google Drive
folder_id string
ID of folder to list files from (lists from root if not provided)
query string
Search query to filter files (e.g., "name contains 'report'"
max_results number
Maximum number of files to return
include_folders boolean
Include folders in the results
order_by string
Order results by field (e.g., "name", "modifiedTime desc")
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

create_folder

operation 'create_folder' required
Create a new folder in Google Drive
name string required
Name of the folder to create
parent_folder_id string
ID of the parent folder (creates in root if not provided)
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

delete_file

operation 'delete_file' required
Delete a file or folder from Google Drive
file_id string required
Google Drive file or folder ID to delete
permanent boolean
Permanently delete (true) or move to trash (false)
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_file_info

operation 'get_file_info' required
Get detailed information about a file or folder
file_id string required
Google Drive file or folder ID to get info for
include_permissions boolean
Include file permissions in the response
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

share_file

operation 'share_file' required
Share a file or folder with specific users or make it public
file_id string required
Google Drive file or folder ID to share
email_address string
Email address to share with (for specific user sharing)
role 'reader' | 'writer' | 'commenter' | 'owner'
Permission role to grant
type 'user' | 'group' | 'domain' | 'anyone'
Type of permission to create
send_notification boolean
Send notification email to the user
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

move_file

operation 'move_file' required
Move a file or folder to a different location in Google Drive
file_id string required
Google Drive file or folder ID to move
new_parent_folder_id string
ID of the new parent folder (moves to root if not provided)
remove_parent_folder_id string
ID of the parent folder to remove (removes from all parents if not provided)
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)