> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# google-docs

> Document creation and editing

**Server path:** `/google-docs` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`google_docs_batch_update`](#google_docs_batch_update)                           | Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically. |
| [`google_docs_create_document`](#google_docs_create_document)                     | Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [`google_docs_find_and_replace`](#google_docs_find_and_replace)                   | Find and replace text throughout a Google Docs document. Returns the number of occurrences changed. Uses the batchUpdate API with a replaceAllText request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`google_docs_get_document`](#google_docs_get_document)                           | Gets the latest version of the specified document.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [`google_docs_insert_page_break`](#google_docs_insert_page_break)                 | Insert a page break into a Google Docs document at the specified position. Uses the batchUpdate API with an insertPageBreak request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [`google_docs_insert_table`](#google_docs_insert_table)                           | Insert a table into a Google Docs document at the specified position. Uses the batchUpdate API with an insertTable request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [`google_docs_insert_text`](#google_docs_insert_text)                             | Insert text at a specific location in a Google Docs document. Uses the batchUpdate API with an insertText request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [`google_docs_list_trigger_capabilities`](#google_docs_list_trigger_capabilities) | List available Google Docs trigger types and their configurations. Returns the supported trigger types for document change monitoring.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [`google-docs_poll_trigger`](#google-docs_poll_trigger)                           | Poll for changes to a specific Google Docs document by checking its current revision against a previous cursor. Returns change events when the document has been modified since the last poll.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

***

## google\_docs\_batch\_update

Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.

**Parameters:**

| Parameter      | Type      | Required | Default | Description                                                                                                                                                                          |
| -------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `documentId`   | string    | Yes      | —       | The ID of the document to update.                                                                                                                                                    |
| `requests`     | object\[] | Yes      | —       | A list of updates to apply to the document. Each request object should contain exactly one operation type (e.g., insertText, insertTable, replaceAllText, deleteContentRange, etc.). |
| `writeControl` | object    | No       | —       | Provides control over how write requests are executed. Optional.                                                                                                                     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "documentId": {
        "type": "string",
        "description": "The ID of the document to update."
      },
      "requests": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "A list of updates to apply to the document. Each request object should contain exactly one operation type (e.g., insertText, insertTable, replaceAllText, deleteContentRange, etc.)."
      },
      "writeControl": {
        "type": "object",
        "description": "Provides control over how write requests are executed. Optional.",
        "properties": {
          "requiredRevisionId": {
            "type": "string",
            "description": "The optional revision ID of the document the write request is applied to. If this is not the latest revision of the document, the request is not processed and returns a 400 bad request error."
          },
          "targetRevisionId": {
            "type": "string",
            "description": "The optional target revision ID of the document the write request is applied to."
          }
        }
      }
    },
    "required": [
      "PCID",
      "documentId",
      "requests"
    ]
  }
  ```
</Expandable>

***

## google\_docs\_create\_document

Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document.

**Parameters:**

| Parameter | Type   | Required | Default | Description                          |
| --------- | ------ | -------- | ------- | ------------------------------------ |
| `title`   | string | Yes      | —       | The title of the document to create. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "title": {
        "type": "string",
        "description": "The title of the document to create."
      }
    },
    "required": [
      "PCID",
      "title"
    ]
  }
  ```
</Expandable>

***

## google\_docs\_find\_and\_replace

Find and replace text throughout a Google Docs document. Returns the number of occurrences changed. Uses the batchUpdate API with a replaceAllText request.

**Parameters:**

| Parameter     | Type    | Required | Default | Description                                           |
| ------------- | ------- | -------- | ------- | ----------------------------------------------------- |
| `documentId`  | string  | Yes      | —       | The ID of the Google Docs document                    |
| `findText`    | string  | Yes      | —       | The text to find                                      |
| `replaceText` | string  | Yes      | —       | The text to replace with                              |
| `matchCase`   | boolean | No       | —       | Whether to match case when searching (default: false) |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "documentId": {
        "type": "string",
        "description": "The ID of the Google Docs document"
      },
      "findText": {
        "type": "string",
        "description": "The text to find"
      },
      "replaceText": {
        "type": "string",
        "description": "The text to replace with"
      },
      "matchCase": {
        "type": "boolean",
        "description": "Whether to match case when searching (default: false)"
      }
    },
    "required": [
      "PCID",
      "documentId",
      "findText",
      "replaceText"
    ]
  }
  ```
</Expandable>

***

## google\_docs\_get\_document

Gets the latest version of the specified document.

**Parameters:**

| Parameter             | Type   | Required | Default | Description                                                                                                                                                                                             |
| --------------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `documentId`          | string | Yes      | —       | The ID of the document to retrieve.                                                                                                                                                                     |
| `suggestionsViewMode` | string | No       | —       | The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, DEFAULT\_FOR\_CURRENT\_ACCESS is used. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "documentId": {
        "type": "string",
        "description": "The ID of the document to retrieve."
      },
      "suggestionsViewMode": {
        "type": "string",
        "description": "The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, DEFAULT_FOR_CURRENT_ACCESS is used.",
        "enum": [
          "DEFAULT_FOR_CURRENT_ACCESS",
          "SUGGESTIONS_INLINE",
          "PREVIEW_SUGGESTIONS_ACCEPTED",
          "PREVIEW_WITHOUT_SUGGESTIONS"
        ]
      }
    },
    "required": [
      "PCID",
      "documentId"
    ]
  }
  ```
</Expandable>

***

## google\_docs\_insert\_page\_break

Insert a page break into a Google Docs document at the specified position. Uses the batchUpdate API with an insertPageBreak request.

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                                                                                       |
| ------------ | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `documentId` | string | Yes      | —       | The ID of the document to insert the page break into                                                                              |
| `index`      | number | Yes      | —       | The zero-based index position in the document to insert the page break at. Use 1 to insert at the beginning of the document body. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "documentId": {
        "type": "string",
        "description": "The ID of the document to insert the page break into"
      },
      "index": {
        "type": "number",
        "description": "The zero-based index position in the document to insert the page break at. Use 1 to insert at the beginning of the document body."
      }
    },
    "required": [
      "PCID",
      "documentId",
      "index"
    ]
  }
  ```
</Expandable>

***

## google\_docs\_insert\_table

Insert a table into a Google Docs document at the specified position. Uses the batchUpdate API with an insertTable request.

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                                                                                  |
| ------------ | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `documentId` | string | Yes      | —       | The ID of the document to insert the table into                                                                              |
| `rows`       | number | Yes      | —       | Number of rows in the table (minimum 1)                                                                                      |
| `columns`    | number | Yes      | —       | Number of columns in the table (minimum 1)                                                                                   |
| `index`      | number | Yes      | —       | The zero-based index position in the document to insert the table at. Use 1 to insert at the beginning of the document body. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "documentId": {
        "type": "string",
        "description": "The ID of the document to insert the table into"
      },
      "rows": {
        "type": "number",
        "description": "Number of rows in the table (minimum 1)"
      },
      "columns": {
        "type": "number",
        "description": "Number of columns in the table (minimum 1)"
      },
      "index": {
        "type": "number",
        "description": "The zero-based index position in the document to insert the table at. Use 1 to insert at the beginning of the document body."
      }
    },
    "required": [
      "PCID",
      "documentId",
      "rows",
      "columns",
      "index"
    ]
  }
  ```
</Expandable>

***

## google\_docs\_insert\_text

Insert text at a specific location in a Google Docs document. Uses the batchUpdate API with an insertText request.

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                                                                             |
| ------------ | ------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------- |
| `documentId` | string | Yes      | —       | The ID of the document to insert text into                                                                              |
| `text`       | string | Yes      | —       | The text to insert                                                                                                      |
| `index`      | number | Yes      | —       | The zero-based index position in the document to insert text at. Use 1 to insert at the beginning of the document body. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "documentId": {
        "type": "string",
        "description": "The ID of the document to insert text into"
      },
      "text": {
        "type": "string",
        "description": "The text to insert"
      },
      "index": {
        "type": "number",
        "description": "The zero-based index position in the document to insert text at. Use 1 to insert at the beginning of the document body."
      }
    },
    "required": [
      "PCID",
      "documentId",
      "text",
      "index"
    ]
  }
  ```
</Expandable>

***

## google\_docs\_list\_trigger\_capabilities

List available Google Docs trigger types and their configurations. Returns the supported trigger types for document change monitoring.

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "required": []
  }
  ```
</Expandable>

***

## google-docs\_poll\_trigger

Poll for changes to a specific Google Docs document by checking its current revision against a previous cursor. Returns change events when the document has been modified since the last poll.

**Parameters:**

| Parameter      | Type   | Required | Default | Description                                                                                                                                             |
| -------------- | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `url`          | string | Yes      | —       | Google Docs document URL to monitor (e.g., [https://docs.google.com/document/d/DOCUMENT\_ID/edit](https://docs.google.com/document/d/DOCUMENT_ID/edit)) |
| `cursor`       | string | No       | —       | Last known revision ID for incremental sync                                                                                                             |
| `minTimestamp` | number | No       | —       | Unix timestamp in seconds — used for test polls to verify trigger setup                                                                                 |
| `maxResults`   | number | No       | —       | Maximum number of events to return (default: 100)                                                                                                       |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "url": {
        "type": "string",
        "description": "Google Docs document URL to monitor (e.g., https://docs.google.com/document/d/DOCUMENT_ID/edit)"
      },
      "cursor": {
        "type": "string",
        "description": "Last known revision ID for incremental sync"
      },
      "minTimestamp": {
        "type": "number",
        "description": "Unix timestamp in seconds — used for test polls to verify trigger setup"
      },
      "maxResults": {
        "type": "number",
        "description": "Maximum number of events to return (default: 100)"
      }
    },
    "required": [
      "PCID",
      "url"
    ]
  }
  ```
</Expandable>
