DocsIntegrations

Google Drive

Save selected Drive files to the library, publish library files to Drive, and watch Sheets and Docs for changes.

A Google Drive integration lets an assistant save selected files to the Mobius library and publish library files to Drive. It also watches specific Google Sheets and Docs files for changes, turning Drive callbacks into Mobius source events.

Use Google Drive when Mobius should know that a shared spreadsheet or document changed. Drive callbacks tell Mobius that the file changed; the event does not contain cell-level or paragraph-level diffs.

For the shared Google credential model, see Google integrations.

Capability map

CapabilityValue
Provider IDgoogle_drive
Auth kindoauth2_user
Connect flowGoogle OAuth, then Google Picker
ActionsYes
EventsYes
Webhook deliveryYes
Event samplesNo
Live statusYes

Connect Google Drive

SurfaceSupport
AppOpen Build > Integrations, choose Google Drive, continue through Google OAuth, then choose Google Sheets or Docs with Picker.
CLIThe mobius CLI does not connect Google Drive integrations yet. Use the app or API.
APICall POST /v1/integrations/providers/google_drive/connect with file_ids or files, then redirect the user to the returned Google OAuth URL.

The account choice defaults to My account. An organization administrator can choose Shared account before Google sign-in for a Google account the team shares. A team member's own account can only be connected as theirs. After connecting, use Assistant access on the account page to grant the exact Drive connection to assistants that need to read watched files. The grant does not add files to the watch.

Google expires Drive channels, so Mobius stores channel state and renews watches before expiration. The webhook endpoint must be reachable over public HTTPS for Google to deliver callbacks.

Permissions

Mobius requests drive.file and the connected account email. It can read, export, update, or watch only files selected with Picker or created by Mobius. Picker must be signed into the same Google account shown on the connection.

Mobius verifies each selected file through the backend connection before creating a watch. Pasting an ID through the API does not grant access.

Authorize files and folders

Open the connected Drive account's Files available to assistants section and choose files while signed into the account shown. Choosing files makes them available to assistants already allowed to use this account. This Picker accepts uploaded PDFs, Office files, Google Slides, and folders as well as Docs and Sheets. Use the Shared drives tab to choose files from a Google shared drive. Mobius verifies the selection through the stored connection before showing it as accessible. Share the file's link with your assistant to save it, or choose a folder as the destination for publishing. Folder selection grants access to the folder itself; it does not grant access to every child file. Files added to a shared drive later are not included until someone chooses them.

Selection alone does not save a library copy or start a watch. The separate Change notifications section still supports only native Docs and Sheets. Watching files notifies Mobius when they change; stopping a watch leaves file access intact. Google keeps chosen files authorized until you change the app's access in Google account connections. This manages the app's access in Google, rather than revoking a single file in Mobius.

Direct file browsing requires your own personal connection. Team account management alone does not provide content access; the contextual chat flow requires an eligible assistant and saved conversation. When file selection is available in that flow, authorized people can select existing files with Use selected. Choosing more files requires the account manager and sign-in to the connected Google account. Verified selections show their file names; if some could not be verified, retry those files or choose again. No selection sends a message automatically.

Save a file to the library

Use google_drive.file.save with file_id to keep a copy that the document tools can inspect, read, search, and edit. The action is available when library storage is configured. Binary files, such as uploaded PDFs, retain their bytes. Google-native files export to these defaults:

SourceLibrary format
Google DocsDOCX
Google SheetsXLSX
Google SlidesPPTX

Set export_mime to application/pdf for a PDF copy instead. An optional name sets the library filename. The save ceiling is 25 MiB; Google's native-file export API also imposes its own 10 MB limit. Oversized files are refused, never truncated. Folders cannot be saved as files.

The result includes artifact_id, artifact_ref, library_path, and document_readable. Pass the artifact ID to mobius.document.read for a supported document. Saving the same source version, export format, and visibility again returns the existing file with existing: true. A changed version or a deleted library copy allows a new file.

A personal connection defaults to private; a team-managed connection defaults to organization. You can set visibility explicitly, within the connection grant's permitted audience. A team connection granted only for named people requires a private save or a broader grant. Private copies stay separate by owner. Team copies of the same source converge across team-managed connections.

The library details drawer shows the source and its link. This is a retained copy: later Drive edits do not update it. Disconnecting Drive does not delete saved copies; delete them in the library.

google_drive.file.export remains useful for small results inside a turn. It accepts text, Office, and PDF formats with a 1 MiB ceiling; binary results use base64 with content_base64: true. Use .file.save when document tools need the complete file.

Publish a library file

Use google_drive.file.put with artifact_id and an optional name and folder_id. The assistant must have access to both the library file and the selected Drive connection. Files up to 100 MiB are supported. You can also provide content instead of artifact_id, with content_base64: true for binary content and an optional content_type.

conflict defaults to replace. It can also be rename or fail. Name checks cover only files Mobius can access in the destination folder, or the Drive root when no folder is supplied. Google Drive permits duplicate names, so this is not an account-wide uniqueness check or a conditional write against a revision. Ambiguous replacement matches and replacement of a Google-native file are refused. Choose an accessible folder; pasting an ID does not grant permission.

The result contains the file's ID, name, MIME type, and web link. Publishing an artifact records the destination in its library details, keeping the latest 20 deliveries. If the remote upload succeeds but the library record fails, delivery_warning says so: inspect the returned remote file before retrying. Files created by Mobius are accessible under drive.file without another Picker step.

Events

google_drive.sheet.updated
google_drive.document.updated

Each event payload includes the Drive file ID, file name, MIME type, Drive resource state, changed facets from X-Goog-Changed, and the channel metadata used for deduplication. When Drive metadata is available, it also includes version, head_revision_id, and md5_checksum. The google_drive.file.get action returns the same version fields.

Drive sends an initial sync notification when a channel is created. Mobius acknowledges that callback without emitting a source event, so only later file updates reach the org's event stream.

API shape

{
  "file_ids": ["<google-sheet-or-doc-file-id>"]
}

Use the expanded form when you want to document the expected file kind:

{
  "files": [
    { "file_id": "<spreadsheet-id>", "kind": "sheet" },
    { "file_id": "<document-id>", "kind": "document" }
  ]
}

Mobius verifies the MIME type with Drive before creating the watch. If a file is not a native Google Sheet or Google Doc, the connect request fails before anything can depend on it.

Troubleshooting

The file ID is rejected

Choose the file with Picker while signed into the connected account. The API still accepts an ID for a file already authorized to Mobius. Uploaded Excel, Word, PDF, or binary files are not valid watch targets.

The first callback emits no event

Drive sends an initial sync notification after Mobius creates a channel. Mobius records it without emitting a source event. Update the file after the watch is active to see a real event.

A spreadsheet changed but no cell values are in the event

Drive events say that the file changed. Read the exact values inside the turn with Google Sheets.

Next

A publish destination is recorded only when the connection permits that link to be shown to the library file's audience. For example, publishing a team file through a personal connection can succeed with delivery_warning and no saved destination link. The returned remote file remains the successful result.