Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt

Use this file to discover all available pages before exploring further.

Google Drive The Google Drive app provides read/write access to a user’s Google Drive through the Drive REST v3 API. It can be used either as a Builder app (automations call Drive instructions directly) or as a remote MCP server consumed by an AI agent. Each tenant configures its own Google OAuth Application; end-users sign in with their own Google account and tokens are stored per (user × tenant). The connector exposes 27 operations covering files (CRUD, copy, export, trash), permissions, comments, replies and revisions.

Files & Folders

List, search, create, update, copy, export and delete files, folders and Google-native documents

Sharing & Permissions

Grant, change and revoke access for users, groups, domains or anyone with the link

Comments & Revisions

Browse and manage comment threads, replies and historical revisions of any file

Prerequisites

  • A Google account with access to the Drive content you want to expose. For Google Workspace drives, the workspace admin may need to allow third-party OAuth apps.
  • A Google Cloud project with the Drive API enabled at console.cloud.google.com/apis/library/drive.googleapis.com.
  • A Google OAuth 2.0 Client of type Web application, created at console.cloud.google.com/apis/credentials. The Authorized redirect URIs must contain the value shown in the OAuth Callback URL field of the installed app instance (auto-populated on install — copy it back into the Google Cloud Console after installation).
  • An OAuth consent screen configured in the Google Cloud project. While the app is in Testing state, add the end-user’s email to Test users. The full Drive scope (https://www.googleapis.com/auth/drive) is classed restricted and requires CASA verification when the consent screen moves to Production.
  • Base URL (default: https://www.googleapis.com)

Installation

  1. Go to Apps in your workspace
  2. Search for Google Drive and install it
  3. Open the app instance configuration and fill in the required fields

Configuration

FieldDescription
Google Drive API Base URLBase URL of the Drive API (default https://www.googleapis.com)
API Token (fallback)Optional static OAuth access token used as a shared fallback for all users of this tenant. Stored as a workspace secret. Most deployments leave this empty and rely on per-user OAuth.
OAuth2 Client IDGoogle OAuth Application Client ID. Create an OAuth client of type Web application in the Google Cloud Console. Stored as a workspace secret.
OAuth2 Client SecretGoogle OAuth Client Secret, stored as a workspace secret
OAuth Authorize URLDefault https://accounts.google.com/o/oauth2/v2/auth
OAuth Token URLDefault https://oauth2.googleapis.com/token
OAuth Revoke URLDefault https://oauth2.googleapis.com/revoke
OAuth ScopesSpace-separated Google API scopes. Default https://www.googleapis.com/auth/drive (full Drive access). Other common values: drive.readonly, drive.file, drive.metadata, drive.appdata
Refresh Token TTL (seconds)Default 15552000 (180 days, Google’s max)
MCP EndpointAuto-populated on install — URL of the MCP endpoint for this instance
MCP API KeyAuto-populated on install — signed key used in the mcp-api-key header. Do not modify
MCP Endpoint and MCP API Key are generated automatically by the onInstall flow. The OAuth credentials (OAuth2 Client ID, OAuth2 Client Secret) must be filled in manually after creating the OAuth client in the Google Cloud Console.

Authorize end-users

Once the app instance is configured, each end-user authorizes their own Google account through a browser-based consent screen:
1

Trigger the connect flow

From an MCP client (Agent Creator capability or any tool client), call any data tool. If no OAuth session exists for the current user × tenant, the MCP server returns a connector_auth_required payload with a connect_url. Alternatively, call the connect tool explicitly to receive the same payload.
2

Open the connect URL

Open the returned URL in a browser tab where the user is already authenticated to Prisme.ai. The platform redirects to the Google OAuth consent screen.
3

Grant access

The user reviews the requested scopes (default https://www.googleapis.com/auth/drive) and clicks Allow. Google redirects back to the platform’s oauthCallback webhook.
4

Confirmation

The user sees a Connection complete page and can close the tab. The platform has stored an access token plus refresh token as user-scoped secrets — both are tenant-prefixed so they do not leak across app instances.
Each user’s OAuth tokens are scoped per (user × tenant). A user who has authorized in tenant A does not gain access in tenant B — they must run the connect flow again per app instance. Refresh tokens are rotated by Google on each refresh and live up to 180 days when idle.

Available Instructions

Every instruction resolves credentials from the workspace configuration. Most list operations accept pageSize (default 100, max 1000) and pageToken for pagination, plus a fields parameter using Google’s partial response syntax to control the returned payload size.

Files

InstructionArguments
listFilesq, pageSize, pageToken, orderBy, fields, spaces, corpora, driveId, includeItemsFromAllDrives, supportsAllDrives
getFilefileId*, fields, supportsAllDrives, includePermissionsForView
createFilename, mimeType, description, parents, starred, properties, appProperties, supportsAllDrives, ignoreDefaultVisibility, keepRevisionForever, ocrLanguage, useContentAsIndexableText, fields
updateFilefileId*, addParents, removeParents, keepRevisionForever, ocrLanguage, useContentAsIndexableText, supportsAllDrives, fields, name, mimeType, description, starred, trashed, properties, appProperties
copyFilefileId*, name, parents, description, supportsAllDrives, keepRevisionForever, ocrLanguage, ignoreDefaultVisibility, fields
deleteFilefileId*, supportsAllDrives
exportFilefileId, mimeType
emptyTrashenforceSingleParent
generateFileIdscount, space, type

Permissions

InstructionArguments
listPermissionsfileId*, pageSize, pageToken, fields, supportsAllDrives, includePermissionsForView
getPermissionfileId, permissionId, supportsAllDrives, fields
createPermissionfileId, type, role*, emailAddress, domain, allowFileDiscovery, expirationTime, emailMessage, sendNotificationEmail, supportsAllDrives, transferOwnership, moveToNewOwnersRoot, fields
updatePermissionfileId, permissionId, removeExpiration, transferOwnership, supportsAllDrives, fields, role, expirationTime
deletePermissionfileId, permissionId, supportsAllDrives

Comments

InstructionArguments
listCommentsfileId*, pageSize, pageToken, includeDeleted, startModifiedTime, fields
getCommentfileId, commentId, includeDeleted, fields
createCommentfileId, content, anchor, quotedFileContent, fields
updateCommentfileId, commentId, content, resolved, fields
deleteCommentfileId, commentId

Replies

InstructionArguments
listRepliesfileId, commentId, pageSize, pageToken, includeDeleted, fields
createReplyfileId, commentId, content, action, fields
updateReplyfileId, commentId, replyId*, content, fields
deleteReplyfileId, commentId, replyId*

Revisions

InstructionArguments
listRevisionsfileId*, pageSize, pageToken, fields
getRevisionfileId, revisionId, fields
updateRevisionfileId, revisionId, keepForever, publishAuto, published, publishedOutsideDomain, fields
deleteRevisionfileId, revisionId
Arguments flagged with * are required.

DSUL Examples

Search the latest spreadsheets in My Drive

- GoogleDrive.listFiles:
    q: "mimeType = 'application/vnd.google-apps.spreadsheet' and trashed = false"
    orderBy: modifiedTime desc
    pageSize: 10
    fields: "files(id,name,modifiedTime,webViewLink)"
    output: spreadsheets

Create a folder and a Google Doc inside it

- GoogleDrive.createFile:
    name: Project Acme
    mimeType: application/vnd.google-apps.folder
    output: folder
- GoogleDrive.createFile:
    name: Kickoff Notes
    mimeType: application/vnd.google-apps.document
    parents:
      - '{{folder.id}}'
    output: doc

Share a file with a user as commenter

- GoogleDrive.createPermission:
    fileId: '{{file_id}}'
    type: user
    role: commenter
    emailAddress: alice@example.com
    sendNotificationEmail: true
    emailMessage: |
      Hi Alice — feel free to comment on the Q1 brief.
    output: permission

Export a Google Sheet to XLSX

- GoogleDrive.exportFile:
    fileId: '{{spreadsheet_id}}'
    mimeType: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    output: xlsx

Resolve a comment thread

- GoogleDrive.updateComment:
    fileId: '{{file_id}}'
    commentId: '{{comment_id}}'
    resolved: true
    output: resolved

Error Handling

HTTP StatusErrorSolution
401Unauthorized / token expiredThe OAuth token was revoked or expired. Re-run the connect flow for that user. The connector auto-refreshes when a refresh token is present
403ForbiddenCheck the OAuth scopes (https://www.googleapis.com/auth/drive for full access) and verify the Drive API is enabled on the Google Cloud project
404Not FoundVerify the fileId / permissionId / commentId / revisionId. Drive IDs are case-sensitive and never include a trailing slash
429Rate Limited / Quota exceededDrive enforces per-user and per-project quotas. Back off and retry with exponential delay
500Server errorTransient. Retry once with a small delay

Common Issues

“Not configured” — The app instance has no OAuth client. Fill in OAuth2 Client ID and OAuth2 Client Secret from the Google Cloud Console. “Invalid API key” (MCP) — The mcp-api-key header does not match the central app secret. Reinstall the app instance to regenerate a signed key. “Credentials lookup failed” — The MCP endpoint could not reach the getConfig webhook of the installed app. Verify that the app instance is still installed in the expected workspace. redirect_uri_mismatch at the Google consent screen — The redirect URI registered in your Google OAuth client does not match the one the connector sends. Copy the value of OAuth Callback URL from the app instance configuration and paste it verbatim into the Authorized redirect URIs list of your OAuth client in the Google Cloud Console. Drive API has not been used in project ... or it is disabled — Enable the Drive API at console.cloud.google.com/apis/library/drive.googleapis.com for the project that owns your OAuth client. Propagation takes up to a minute. File not found: <id> on a shared drive — Pass supportsAllDrives: true (and includeItemsFromAllDrives: true on listFiles). Without these flags, the Drive API silently scopes the request to My Drive only. fileNotDownloadable on exportFileexportFile works only on Google-native files (Docs/Sheets/Slides/Drawings). For uploaded binaries (PDF, DOCX, …), use a file-content endpoint instead.

External Resources

Google Drive API Reference

Official Drive REST v3 reference

Tool Agents

Plug MCP servers into AI Knowledge agents