Document Update

Google Drive

Apply an atomic batch of content or formatting changes to a Google Docs document.

Current price
$0.0050/call
Availability
Connected app
Last accepted verification

What this API does

Applies up to 100 Google Docs batchUpdate operations atomically, including inserting, replacing, deleting or formatting document content. It cannot delete the Drive file or change sharing. Always one upstream request at $0.0050.

Agents select this operation with tool ID google-drive.document-update, then inspect its current executable contract before a run.

Public input and output shape

Input

bodyobject · required

Bounded request body sent to the connected application.

pathobject · required

Identifier path for the authorised connected-app record.

Output

documentIdstring

Returned document id value.

repliesarray

Returned replies value.

writeControlobject

Returned write control value.

Example request and output

This reviewed worked example is shared with inspect. Inspect also returns the current executable schema and price estimate before a paid run.

Request

{
  "tool_id": "google-drive.document-update",
  "input": {
    "body": {
      "requests": [
        {
          "insertText": {
            "text": "Created and edited by a Scrollport agent for Google OAuth verification.\n",
            "location": {
              "index": 1
            }
          }
        }
      ]
    },
    "path": {
      "documentId": "YOUR-GOOGLE-DRIVE-FILE-ID"
    }
  }
}

Output

{
  "replies": [
    {}
  ],
  "documentId": "1AbCdEfGhIjKlMnOpQrStUvWxYz",
  "writeControl": {
    "requiredRevisionId": "revision-output-id"
  }
}
Teaching errors and limitations
  • connection_required: This capability acts on your own Google Drive, which isn't connected yet.Open connect_url, approve Google Drive read and write access, then retry this run unchanged.
  • invalid_input: Google Docs rejected one or more update requests or the revision precondition.Read the document first, use its current indexes and revision id, then submit a bounded batchUpdate request.
Updated
22 August 2026

Use Document Update with Scrollport

Scrollport validates tools for connected apps and provides them on a pay-as-you-go basis so your agent can use accounts you already own without receiving sensitive API keys.

Give your agent the setup prompt to receive $1 in trial credit and start using the tools right away.