Google Drive Manage files, folders, and permissions
Google Drive is Google's cloud storage and file synchronization service that allows users to store files, synchronize files across devices, and share files with others. As a core component of Google's productivity ecosystem, Google Drive offers robust storage, organization, and collaboration capabilities.
Learn how to integrate the Google Drive tool in Sim to effortlessly pull information from your Drive through your workflows. This tutorial walks you through connecting Google Drive, setting up data retrieval, and using stored documents and files to enhance automation. Perfect for syncing important data with your agents in real-time.
VIDEO
With Google Drive, you can:
Store files in the cloud : Upload and access your files from anywhere with internet access
Organize content : Create folders, use color coding, and implement naming conventions
Share and collaborate : Control access permissions and work simultaneously on files
Search efficiently : Find files quickly with Google's powerful search technology
Access across devices : Use Google Drive on desktop, mobile, and web platforms
Integrate with other services : Connect with Google Docs, Sheets, Slides, and third-party applications
In Sim, the Google Drive integration enables your agents to interact directly with your cloud storage programmatically. This allows for powerful automation scenarios such as file management, content organization, and document workflows. Your agents can upload new files to specific folders, download existing files to process their contents, and list folder contents to navigate your storage structure. This integration bridges the gap between your AI workflows and your document management system, enabling seamless file operations without manual intervention. By connecting Sim with Google Drive, you can automate file-based workflows, manage documents intelligently, and incorporate cloud storage operations into your agent's capabilities.
Integrate Google Drive into the workflow. Can create, upload, download, copy, move, delete, share files and manage permissions.
List files and folders in Google Drive with complete metadata
Parameter Type Required Description folderSelectorstring No Select the folder to list files from folderIdstring No The ID of the folder to list files from (internal use) querystring No Search term to filter files by name (e.g. "budget" finds files with "budget" in the name). Do NOT use Google Drive query syntax here - just provide a plain search term. pageSizenumber No The maximum number of files to return (default: 100) pageTokenstring No The page token to use for pagination
Parameter Type Description filesarray Array of file metadata objects from Google Drive ↳ id string Google Drive file ID ↳ kind string Resource type identifier ↳ name string File name ↳ mimeType string MIME type ↳ description string File description ↳ originalFilename string Original uploaded filename ↳ fullFileExtension string Full file extension ↳ fileExtension string File extension ↳ owners json List of file owners ↳ permissions json File permissions ↳ permissionIds json Permission IDs ↳ shared boolean Whether file is shared ↳ ownedByMe boolean Whether owned by current user ↳ writersCanShare boolean Whether writers can share ↳ viewersCanCopyContent boolean Whether viewers can copy ↳ copyRequiresWriterPermission boolean Whether copy requires writer permission ↳ sharingUser json User who shared the file ↳ starred boolean Whether file is starred ↳ trashed boolean Whether file is in trash ↳ explicitlyTrashed boolean Whether explicitly trashed ↳ appProperties json App-specific properties ↳ createdTime string File creation time ↳ modifiedTime string Last modification time ↳ modifiedByMeTime string When modified by current user ↳ viewedByMeTime string When last viewed by current user ↳ sharedWithMeTime string When shared with current user ↳ lastModifyingUser json User who last modified the file ↳ viewedByMe boolean Whether viewed by current user ↳ modifiedByMe boolean Whether modified by current user ↳ webViewLink string URL to view in browser ↳ webContentLink string Direct download URL ↳ iconLink string URL to file icon ↳ thumbnailLink string URL to thumbnail ↳ exportLinks json Export format links ↳ size string File size in bytes ↳ quotaBytesUsed string Storage quota used ↳ md5Checksum string MD5 hash ↳ sha1Checksum string SHA-1 hash ↳ sha256Checksum string SHA-256 hash ↳ parents json Parent folder IDs ↳ spaces json Spaces containing file ↳ driveId string Shared drive ID ↳ capabilities json User capabilities on file ↳ version string Version number ↳ headRevisionId string Head revision ID ↳ hasThumbnail boolean Whether has thumbnail ↳ thumbnailVersion string Thumbnail version ↳ imageMediaMetadata json Image-specific metadata ↳ videoMediaMetadata json Video-specific metadata ↳ isAppAuthorized boolean Whether created by requesting app ↳ contentRestrictions json Content restrictions ↳ linkShareMetadata json Link share metadata nextPageTokenstring Token for fetching the next page of results
Get metadata for a specific file in Google Drive by its ID
Parameter Type Required Description fileIdstring Yes The ID of the file to retrieve
Parameter Type Description filejson The file metadata ↳ id string Google Drive file ID ↳ kind string Resource type identifier ↳ name string File name ↳ mimeType string MIME type ↳ description string File description ↳ size string File size in bytes ↳ starred boolean Whether file is starred ↳ trashed boolean Whether file is in trash ↳ webViewLink string URL to view in browser ↳ webContentLink string Direct download URL ↳ iconLink string URL to file icon ↳ thumbnailLink string URL to thumbnail ↳ parents json Parent folder IDs ↳ owners json List of file owners ↳ permissions json File permissions ↳ createdTime string File creation time ↳ modifiedTime string Last modification time ↳ lastModifyingUser json User who last modified the file ↳ shared boolean Whether file is shared ↳ ownedByMe boolean Whether owned by current user ↳ capabilities json User capabilities on file ↳ md5Checksum string MD5 hash ↳ version string Version number
Create a new folder in Google Drive with complete metadata returned
Parameter Type Required Description fileNamestring Yes Name of the folder to create folderSelectorstring No Select the parent folder to create the folder in folderIdstring No ID of the parent folder (internal use)
Parameter Type Description fileobject Complete created folder metadata from Google Drive ↳ id string Google Drive folder ID ↳ kind string Resource type identifier ↳ name string Folder name ↳ mimeType string MIME type (application/vnd.google-apps.folder) ↳ description string Folder description ↳ owners json List of folder owners ↳ permissions json Folder permissions ↳ permissionIds json Permission IDs ↳ shared boolean Whether folder is shared ↳ ownedByMe boolean Whether owned by current user ↳ writersCanShare boolean Whether writers can share ↳ viewersCanCopyContent boolean Whether viewers can copy ↳ copyRequiresWriterPermission boolean Whether copy requires writer permission ↳ sharingUser json User who shared the folder ↳ starred boolean Whether folder is starred ↳ trashed boolean Whether folder is in trash ↳ explicitlyTrashed boolean Whether explicitly trashed ↳ appProperties json App-specific properties ↳ folderColorRgb string Folder color ↳ createdTime string Folder creation time ↳ modifiedTime string Last modification time ↳ modifiedByMeTime string When modified by current user ↳ viewedByMeTime string When last viewed by current user ↳ sharedWithMeTime string When shared with current user ↳ lastModifyingUser json User who last modified the folder ↳ viewedByMe boolean Whether viewed by current user ↳ modifiedByMe boolean Whether modified by current user ↳ webViewLink string URL to view in browser ↳ iconLink string URL to folder icon ↳ parents json Parent folder IDs ↳ spaces json Spaces containing folder ↳ driveId string Shared drive ID ↳ capabilities json User capabilities on folder ↳ version string Version number ↳ isAppAuthorized boolean Whether created by requesting app ↳ contentRestrictions json Content restrictions ↳ linkShareMetadata json Link share metadata
Upload a file to Google Drive with complete metadata returned
Parameter Type Required Description fileNamestring Yes The name of the file to upload filefile No Binary file to upload (UserFile object) contentstring No Text content to upload (use this OR file, not both) mimeTypestring No The MIME type of the file to upload (auto-detected from file if not provided) folderSelectorstring No Select the folder to upload the file to folderIdstring No The ID of the folder to upload the file to (internal use)
Parameter Type Description fileobject Complete uploaded file metadata from Google Drive ↳ id string Google Drive file ID ↳ kind string Resource type identifier ↳ name string File name ↳ mimeType string MIME type ↳ description string File description ↳ originalFilename string Original uploaded filename ↳ fullFileExtension string Full file extension ↳ fileExtension string File extension ↳ owners json List of file owners ↳ permissions json File permissions ↳ permissionIds json Permission IDs ↳ shared boolean Whether file is shared ↳ ownedByMe boolean Whether owned by current user ↳ writersCanShare boolean Whether writers can share ↳ viewersCanCopyContent boolean Whether viewers can copy ↳ copyRequiresWriterPermission boolean Whether copy requires writer permission ↳ sharingUser json User who shared the file ↳ starred boolean Whether file is starred ↳ trashed boolean Whether file is in trash ↳ explicitlyTrashed boolean Whether explicitly trashed ↳ appProperties json App-specific properties ↳ createdTime string File creation time ↳ modifiedTime string Last modification time ↳ modifiedByMeTime string When modified by current user ↳ viewedByMeTime string When last viewed by current user ↳ sharedWithMeTime string When shared with current user ↳ lastModifyingUser json User who last modified the file ↳ viewedByMe boolean Whether viewed by current user ↳ modifiedByMe boolean Whether modified by current user ↳ webViewLink string URL to view in browser ↳ webContentLink string Direct download URL ↳ iconLink string URL to file icon ↳ thumbnailLink string URL to thumbnail ↳ exportLinks json Export format links ↳ size string File size in bytes ↳ quotaBytesUsed string Storage quota used ↳ md5Checksum string MD5 hash ↳ sha1Checksum string SHA-1 hash ↳ sha256Checksum string SHA-256 hash ↳ parents json Parent folder IDs ↳ spaces json Spaces containing file ↳ driveId string Shared drive ID ↳ capabilities json User capabilities on file ↳ version string Version number ↳ headRevisionId string Head revision ID ↳ hasThumbnail boolean Whether has thumbnail ↳ thumbnailVersion string Thumbnail version ↳ imageMediaMetadata json Image-specific metadata ↳ videoMediaMetadata json Video-specific metadata ↳ isAppAuthorized boolean Whether created by requesting app ↳ contentRestrictions json Content restrictions ↳ linkShareMetadata json Link share metadata
Download a file from Google Drive with complete metadata (exports Google Workspace files automatically)
Parameter Type Required Description fileIdstring Yes The ID of the file to download mimeTypestring No The MIME type to export Google Workspace files to (optional) fileNamestring No Optional filename override includeRevisionsboolean No Whether to include revision history in the metadata (default: true, returns first 100 revisions)
Parameter Type Description fileobject Downloaded file data ↳ name string File name ↳ mimeType string MIME type of the file ↳ data string File content as base64-encoded string ↳ size number File size in bytes metadataobject Complete file metadata from Google Drive ↳ id string Google Drive file ID ↳ kind string Resource type identifier ↳ name string File name ↳ mimeType string MIME type ↳ description string File description ↳ originalFilename string Original uploaded filename ↳ fullFileExtension string Full file extension ↳ fileExtension string File extension ↳ owners json List of file owners ↳ permissions json File permissions ↳ permissionIds json Permission IDs ↳ shared boolean Whether file is shared ↳ ownedByMe boolean Whether owned by current user ↳ writersCanShare boolean Whether writers can share ↳ viewersCanCopyContent boolean Whether viewers can copy ↳ copyRequiresWriterPermission boolean Whether copy requires writer permission ↳ sharingUser json User who shared the file ↳ starred boolean Whether file is starred ↳ trashed boolean Whether file is in trash ↳ explicitlyTrashed boolean Whether explicitly trashed ↳ appProperties json App-specific properties ↳ createdTime string File creation time ↳ modifiedTime string Last modification time ↳ modifiedByMeTime string When modified by current user ↳ viewedByMeTime string When last viewed by current user ↳ sharedWithMeTime string When shared with current user ↳ lastModifyingUser json User who last modified the file ↳ viewedByMe boolean Whether viewed by current user ↳ modifiedByMe boolean Whether modified by current user ↳ webViewLink string URL to view in browser ↳ webContentLink string Direct download URL ↳ iconLink string URL to file icon ↳ thumbnailLink string URL to thumbnail ↳ exportLinks json Export format links ↳ size string File size in bytes ↳ quotaBytesUsed string Storage quota used ↳ md5Checksum string MD5 hash ↳ sha1Checksum string SHA-1 hash ↳ sha256Checksum string SHA-256 hash ↳ parents json Parent folder IDs ↳ spaces json Spaces containing file ↳ driveId string Shared drive ID ↳ capabilities json User capabilities on file ↳ version string Version number ↳ headRevisionId string Head revision ID ↳ hasThumbnail boolean Whether has thumbnail ↳ thumbnailVersion string Thumbnail version ↳ imageMediaMetadata json Image-specific metadata ↳ videoMediaMetadata json Video-specific metadata ↳ isAppAuthorized boolean Whether created by requesting app ↳ contentRestrictions json Content restrictions ↳ linkShareMetadata json Link share metadata ↳ revisions json File revision history (first 100 revisions only)
Create a copy of a file in Google Drive
Parameter Type Required Description fileIdstring Yes The ID of the file to copy newNamestring No Name for the copied file (defaults to "Copy of [original name]") destinationFolderIdstring No ID of the folder to place the copy in (defaults to same location as original)
Parameter Type Description filejson The copied file metadata ↳ id string Google Drive file ID of the copy ↳ kind string Resource type identifier ↳ name string File name ↳ mimeType string MIME type ↳ webViewLink string URL to view in browser ↳ parents json Parent folder IDs ↳ createdTime string File creation time ↳ modifiedTime string Last modification time ↳ owners json List of file owners ↳ size string File size in bytes
Update file metadata in Google Drive (rename, move, star, add description)
Parameter Type Required Description fileIdstring Yes The ID of the file to update namestring No New name for the file descriptionstring No New description for the file addParentsstring No Comma-separated list of parent folder IDs to add (moves file to these folders) removeParentsstring No Comma-separated list of parent folder IDs to remove starredboolean No Whether to star or unstar the file
Parameter Type Description filejson The updated file metadata ↳ id string Google Drive file ID ↳ kind string Resource type identifier ↳ name string File name ↳ mimeType string MIME type ↳ description string File description ↳ starred boolean Whether file is starred ↳ webViewLink string URL to view in browser ↳ parents json Parent folder IDs ↳ modifiedTime string Last modification time
Move a file to the trash in Google Drive (can be restored later)
Parameter Type Required Description fileIdstring Yes The ID of the file to move to trash
Parameter Type Description filejson The trashed file metadata ↳ id string Google Drive file ID ↳ kind string Resource type identifier ↳ name string File name ↳ mimeType string MIME type ↳ trashed boolean Whether file is in trash (should be true) ↳ trashedTime string When file was trashed ↳ webViewLink string URL to view in browser
Permanently delete a file from Google Drive (bypasses trash)
Parameter Type Required Description fileIdstring Yes The ID of the file to permanently delete
Parameter Type Description deletedboolean Whether the file was successfully deleted fileIdstring The ID of the deleted file
Share a file with a user, group, domain, or make it public
Parameter Type Required Description fileIdstring Yes The ID of the file to share typestring Yes Type of grantee: user, group, domain, or anyone rolestring Yes Permission role: owner (transfer ownership), organizer (shared drive only), fileOrganizer (shared drive only), writer (edit), commenter (view and comment), reader (view only) emailstring No Email address of the user or group (required for type=user or type=group) domainstring No Domain to share with (required for type=domain) transferOwnershipboolean No Required when role is owner. Transfers ownership to the specified user. moveToNewOwnersRootboolean No When transferring ownership, move the file to the new owner's My Drive root folder. sendNotificationboolean No Whether to send an email notification (default: true) emailMessagestring No Custom message to include in the notification email
Parameter Type Description permissionjson The created permission details ↳ id string Permission ID ↳ type string Grantee type (user, group, domain, anyone) ↳ role string Permission role ↳ emailAddress string Email of the grantee ↳ displayName string Display name of the grantee ↳ domain string Domain of the grantee ↳ expirationTime string Expiration time ↳ deleted boolean Whether grantee is deleted
Remove a permission from a file (revoke access)
Parameter Type Required Description fileIdstring Yes The ID of the file to modify permissions on permissionIdstring Yes The ID of the permission to remove (use list_permissions to find this)
Parameter Type Description removedboolean Whether the permission was successfully removed fileIdstring The ID of the file permissionIdstring The ID of the removed permission
List all permissions (who has access) for a file in Google Drive
Parameter Type Required Description fileIdstring Yes The ID of the file to list permissions for
Parameter Type Description permissionsarray List of permissions on the file ↳ id string Permission ID (use to remove permission) ↳ type string Grantee type (user, group, domain, anyone) ↳ role string Permission role (owner, organizer, fileOrganizer, writer, commenter, reader) ↳ emailAddress string Email of the grantee ↳ displayName string Display name of the grantee ↳ photoLink string Photo URL of the grantee ↳ domain string Domain of the grantee ↳ expirationTime string When permission expires ↳ deleted boolean Whether grantee account is deleted ↳ allowFileDiscovery boolean Whether file is discoverable by grantee ↳ pendingOwner boolean Whether ownership transfer is pending ↳ permissionDetails json Details about inherited permissions nextPageTokenstring Token for fetching the next page of permissions
Get information about the user and their Google Drive (storage quota, capabilities)
Parameter Type Required Description
Parameter Type Description userjson Information about the authenticated user ↳ displayName string User display name ↳ emailAddress string User email address ↳ photoLink string URL to user profile photo ↳ permissionId string User permission ID ↳ me boolean Whether this is the authenticated user storageQuotajson Storage quota information in bytes ↳ limit string Total storage limit in bytes (null for unlimited) ↳ usage string Total storage used in bytes ↳ usageInDrive string Storage used by Drive files in bytes ↳ usageInDriveTrash string Storage used by trashed files in bytes canCreateDrivesboolean Whether user can create shared drives importFormatsjson Map of MIME types that can be imported and their target formats exportFormatsjson Map of Google Workspace MIME types and their exportable formats maxUploadSizestring Maximum upload size in bytes