# Google Docs

Google Docs is a cloud-based word processor with real-time collaboration, version history, and integration with other Google Workspace apps

- **Category:** documents
- **Auth:** OAUTH2
- **Tools:** 35
- **Triggers:** 4
- **Slug:** `GOOGLEDOCS`
- **Version:** 20260211_00

## Frequently Asked Questions

### How do I set up custom Google OAuth credentials for Google Docs?

For a step-by-step guide on creating and configuring your own Google OAuth credentials with Composio, see [How to create OAuth2 credentials for Google Apps](https://composio.dev/auth/googleapps).

### Why am I seeing "App is blocked" when connecting Google Docs?

The OAuth client is requesting scopes that Google hasn't verified for that client. This usually happens when you add extra scopes beyond the defaults.

Remove the additional scopes from your auth config, or create your own OAuth app and submit the scopes for verification. See [How to create OAuth2 credentials for Google Apps](https://composio.dev/auth/googleapps).

### Why am I getting "Google Docs API has not been used in project" error?

When using custom OAuth credentials, the Google Docs API must be enabled in the Google Cloud project that owns those credentials. Enable it in Google Cloud Console under APIs & Services, wait a few minutes, and retry.

### Why am I getting "Error 400: invalid_scope"?

The requested scopes are invalid or incorrectly formatted in the authorization URL. Verify your scope values against the [Google OAuth scopes docs](https://developers.google.com/identity/protocols/oauth2). If you're creating auth configs programmatically, see the [programmatic auth config guide](/docs/auth-configuration/programmatic-auth-configs).

### Why does the OAuth consent screen show "Composio" instead of my app?

By default, the consent screen uses Composio's OAuth app. To show your own app name and logo, create your own OAuth app and set a custom redirect URL. See [White-labeling the OAuth consent screen](/docs/auth-configuration/custom-auth-configs#white-labeling-the-oauth-consent-screen).

### Why am I getting 401 errors on tool calls?

The user's access token is no longer valid. Common causes: the user revoked access, changed their password or 2FA, a Workspace admin policy changed, or Google's refresh token limit (~50 per account) was exceeded. Re-authenticating the user typically resolves this.

### Why am I getting "Quota Exhausted" or "rate limit exhausted"?

Google enforces per-minute and daily request quotas. If you're using Composio's default OAuth app, you share that quota with other users, which can cause limits to be hit faster. Use your own OAuth app credentials to get a dedicated quota, and add exponential backoff and retries to handle transient rate limits.

---

## Tools

### Copy Google Document

**Slug:** `GOOGLEDOCS_COPY_DOCUMENT`

Tool to create a copy of an existing Google Document. Use this to duplicate a document, for example, when using an existing document as a template. The copied document will have a default title (e.g., 'Copy of [original title]') if no new title is provided, and will be placed in the user's root Google Drive folder.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `title` | string | No | The title for the new copied document. If not provided, the title will be 'Copy of [original document's title]'. |
| `document_id` | string | Yes | The ID of the Google Document to be copied. |
| `include_shared_drives` | boolean | No | Whether to support copying documents from shared drives. Defaults to True. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create a document

**Slug:** `GOOGLEDOCS_CREATE_DOCUMENT`

Creates a new Google Docs document using the provided title as filename and inserts the initial text at the beginning if non-empty, returning the document's ID and metadata (excluding body content).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | No | Optional initial text content to insert at the beginning of the new document. If not provided, an empty document will be created. For very large text (over 50,000 characters), the text will be inserted in chunks to avoid API limits. |
| `title` | string | Yes | Title for the new document, used as its filename in Google Drive. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create blank document

**Slug:** `GOOGLEDOCS_CREATE_DOCUMENT2`

Tool to create a blank Google Docs document with a specified title. Use when you need to create a new, empty document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `title` | string | Yes | The title of the document to create. This will be used as the document name in Google Drive. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Document Markdown

**Slug:** `GOOGLEDOCS_CREATE_DOCUMENT_MARKDOWN`

Creates a new Google Docs document, optionally initializing it with a title and content provided as Markdown text.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `title` | string | Yes | The title for the new Google Docs document. |
| `markdown_text` | string | No | The initial content for the document, formatted as Markdown. Also accepts 'content' as an alias. CRITICAL TABLE LIMITATION: Only ONE table is allowed per call - multiple tables will be rejected due to a Google Docs API nesting limitation where subsequent tables become nested inside previous tables. To include multiple tables: create the document with the first table using this action, then use GOOGLEDOCS_UPDATE_DOCUMENT_SECTION_MARKDOWN to append each additional table separately. Supports: headings, lists (nested lists not supported), single table per call, images (via publicly accessible URLs, max 2KB URL length; formats: JPEG, PNG, GIF; SVG not supported), blockquotes, code blocks, hyperlinks (e.g., [text](url)), text formatting (bold, italic, etc.). If empty or omitted, creates document with title only. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Footer

**Slug:** `GOOGLEDOCS_CREATE_FOOTER`

Tool to create a new footer in a Google Document. Use when you need to add a footer, optionally specifying its type and the section it applies to.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `type` | string ("HEADER_FOOTER_TYPE_UNSPECIFIED" | "DEFAULT") | Yes | The type of footer to create. |
| `document_id` | string | Yes | The ID of the document to create the footer in. |
| `section_break_location` | object | No | The location of the SectionBreak immediately preceding the section whose SectionStyle this footer should belong to. If this is unset or refers to the first section break in the document, the footer applies to the document style. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Footnote

**Slug:** `GOOGLEDOCS_CREATE_FOOTNOTE`

Tool to create a new footnote in a Google Document. Use this when you need to add a footnote at a specific location or at the end of the document body.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `location` | object | No | Inserts the footnote reference at a specific index in the document. The segmentId within this Location object must be empty as footnotes can only be inserted in the document body. |
| `documentId` | string | Yes | The ID of the document to create the footnote in. |
| `endOfSegmentLocation` | object | No | Inserts the footnote reference at the end of the document body. The segmentId within this EndOfSegmentLocation object must be empty. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Header

**Slug:** `GOOGLEDOCS_CREATE_HEADER`

Tool to create a new header in a Google Document, optionally with text content. Use this tool when you need to add a header to a document. You can provide: - document_id: The ID of the document (required) - type: The header type (DEFAULT is the standard header) - text: Optional text content to add to the header - section_break_location: Optional location for section-specific headers

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | No | Optional text content to add to the header after creation. If provided, the text will be inserted into the header at index 0. |
| `type` | string ("HEADER_FOOTER_TYPE_UNSPECIFIED" | "DEFAULT") | No | The type of header to create. Use 'DEFAULT' for the standard document header. Only one DEFAULT header can exist per document; if one already exists, the existing header ID will be returned. |
| `documentId` | string | Yes | The ID of the document to create the header in. |
| `sectionBreakLocation` | object | No | The location of the SectionBreak which begins the section this header should belong to. Only needed for section-specific headers. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Named Range

**Slug:** `GOOGLEDOCS_CREATE_NAMED_RANGE`

Tool to create a new named range in a Google Document. Use this to assign a name to a specific part of the document for easier reference or programmatic manipulation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The name for the new named range. Must be 1-256 characters. |
| `documentId` | string | Yes | The ID of the document where the named range will be created. |
| `rangeEndIndex` | integer | Yes | The zero-based end index of the range. |
| `rangeSegmentId` | string | No | Optional. The ID of the header, footer, or footnote. Empty for document body. |
| `rangeStartIndex` | integer | Yes | The zero-based start index of the range. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Paragraph Bullets

**Slug:** `GOOGLEDOCS_CREATE_PARAGRAPH_BULLETS`

Tool to add bullets to paragraphs within a specified range in a Google Document. Use when you need to format a list or a set of paragraphs as bullet points.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document_id` | string | Yes | The ID of the document to update. |
| `createParagraphBullets` | object | Yes |  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Content Range in Document

**Slug:** `GOOGLEDOCS_DELETE_CONTENT_RANGE`

Tool to delete a range of content from a Google Document. Use when you need to remove a specific portion of text or other structural elements within a document. Note: Every segment (body, header, footer, footnote) in Google Docs ends with a final newline character that cannot be deleted. Ensure the endIndex does not include this trailing newline.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `range` | object | Yes | The range of content to delete. Deleting text across paragraph boundaries may merge paragraphs and affect styles. Certain deletions can invalidate document structure (e.g., part of a surrogate pair, last newline of critical elements, incomplete deletion of tables/equations). IMPORTANT: The endIndex must not include the final newline character at the end of a segment (body, header, footer, footnote), as this newline cannot be deleted. |
| `document_id` | string | Yes | The ID of the document from which to delete content. This ID can be found in the URL of the Google Doc. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Footer

**Slug:** `GOOGLEDOCS_DELETE_FOOTER`

Tool to delete a footer from a Google Document. Use when you need to remove a footer from a specific section or the default footer.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tab_id` | string | No | The tab that contains the footer to delete. When omitted, the request is applied to the first tab. |
| `footer_id` | string | Yes | The ID of the footer to delete. Footer IDs are system-generated strings created by Google Docs. Obtain a valid footer ID from: (1) GOOGLEDOCS_CREATE_FOOTER response (footer_id field), or (2) GOOGLEDOCS_GET_DOCUMENT_BY_ID (footers dictionary keys). Do not use made-up or placeholder values. If this footer is defined on DocumentStyle, the reference to this footer is removed, resulting in no footer of that type for the first section of the document. If this footer is defined on a SectionStyle, the reference to this footer is removed and the footer of that type is now continued from the previous section. |
| `document_id` | string | Yes | The ID of the document to delete the footer from. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Header

**Slug:** `GOOGLEDOCS_DELETE_HEADER`

Deletes the header from the specified section or the default header if no section is specified. Use this tool to remove a header from a Google Document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tab_id` | string | No | The tab containing the header to delete. When omitted, the request is applied to the first tab. |
| `header_id` | string | Yes | The ID of the header to delete. If this header is defined on `DocumentStyle`, the reference to this header is removed, resulting in no header of that type for the first section of the document. If this header is defined on a `SectionStyle`, the reference to this header is removed and the header of that type is now continued from the previous section. |
| `document_id` | string | Yes | The ID of the document from which to delete the header. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Named Range

**Slug:** `GOOGLEDOCS_DELETE_NAMED_RANGE`

Tool to delete a named range from a Google Document. Use when you need to remove a previously defined named range by its ID or name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document_id` | string | Yes | The ID of the document. |
| `deleteNamedRange` | object | Yes | Specifies the named range to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Paragraph Bullets

**Slug:** `GOOGLEDOCS_DELETE_PARAGRAPH_BULLETS`

Tool to remove bullets from paragraphs within a specified range in a Google Document. Use when you need to clear bullet formatting from a section of a document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `range` | object | Yes | The range of the document from which to delete paragraph bullets. The range is applied to the document body by default. To specify a different segment (e.g. header, footer), include segment_id in the range object. |
| `tab_id` | string | No | The ID of the tab the range is in. If omitted, it applies to the first tab or the singular tab in a single-tab document. |
| `document_id` | string | Yes | The ID of the document to update. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Table

**Slug:** `GOOGLEDOCS_DELETE_TABLE`

Tool to delete an entire table from a Google Document. Use when you have the document ID and the specific start and end index of the table element to be removed. The table's range can be found by inspecting the document's content structure.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tab_id` | string | No | The ID of the tab containing the table, if the document uses tabs. If omitted, the action applies to the first tab or the only tab. |
| `segment_id` | string | No | The ID of the segment (e.g., header, footer) containing the table. If omitted or empty, the table is assumed to be in the main document body. |
| `document_id` | string | Yes | The ID of the Google Document from which the table will be deleted. |
| `table_end_index` | integer | Yes | The end index (UTF-16 code unit) of the table in the document structure, as reported by the Google Docs API (e.g., from table.endIndex). |
| `table_start_index` | integer | Yes | The start index (UTF-16 code unit) of the table in the document structure, as reported by the Google Docs API (e.g., from table.startIndex). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Table Column

**Slug:** `GOOGLEDOCS_DELETE_TABLE_COLUMN`

Tool to delete a column from a table in a Google Document. Use this tool when you need to remove a specific column from an existing table within a document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `requests` | array | Yes | A list of requests to be applied to the document. |
| `document_id` | string | Yes | The ID of the document to delete the table column from. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Table Row

**Slug:** `GOOGLEDOCS_DELETE_TABLE_ROW`

Tool to delete a row from a table in a Google Document. Use when you need to remove a specific row from an existing table.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `documentId` | string | Yes | The ID of the document. |
| `tableCellLocation` | object | Yes | The reference table cell location from which the row will be deleted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Export Google Doc as PDF

**Slug:** `GOOGLEDOCS_EXPORT_DOCUMENT_AS_PDF`

Tool to export a Google Docs file as PDF using the Google Drive API. Use when you need to generate a PDF version of a Google Docs document for download or distribution. Note: Google Drive enforces a 10MB limit on export content.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The ID of the Google Docs file to export as PDF. This is the same as the document ID for Google Docs files - typically a 44-character alphanumeric string. Extract it from a Google Docs URL: https://docs.google.com/document/d/{FILE_ID}/edit |
| `filename` | string | No | Optional suggested filename for the exported PDF (e.g., 'report.pdf'). If not provided, a default filename will be generated. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Charts from Spreadsheet

**Slug:** `GOOGLEDOCS_GET_CHARTS_FROM_SPREADSHEET`

Tool to retrieve a list of all charts from a specified Google Sheets spreadsheet. Use when you need to get chart IDs and their specifications for embedding or referencing elsewhere, such as in Google Docs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `spreadsheet_id` | string | Yes | The ID of the Google Sheets spreadsheet from which to retrieve charts. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get document by id

**Slug:** `GOOGLEDOCS_GET_DOCUMENT_BY_ID`

Retrieves an existing Google Document by its ID; will error if the document is not found.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier for a native Google Docs document (typically a 44-character alphanumeric string). Accepts either a document ID or a full Google Docs URL (e.g., https://docs.google.com/document/d/{DOCUMENT_ID}/edit). When a URL is provided, the document ID will be automatically extracted. IMPORTANT: This tool only works with native Google Docs documents (mimeType application/vnd.google-apps.document), not uploaded Office files (DOCX, XLSX, etc.) stored in Google Drive. Use GOOGLEDOCS_SEARCH_DOCUMENTS to find available documents. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get document plain text

**Slug:** `GOOGLEDOCS_GET_DOCUMENT_PLAINTEXT`

Retrieve a Google Doc by ID and return a best-effort plain-text rendering. Converts document structure into plain text including paragraphs, lists, and tables without requiring clients to traverse complex Docs API JSON.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document_id` | string | Yes | The unique identifier for the Google Document. Accepts either a document ID (typically a 44-character alphanumeric string) or a full Google Docs URL. When a URL is provided, the document ID will be automatically extracted. Note: This parameter also accepts 'id' as an alias for consistency with other GOOGLEDOCS tools. |
| `include_tables` | boolean | No | Whether to include table content in the plain text output. Tables are rendered with configurable cell and row delimiters. |
| `include_footers` | boolean | No | Whether to include footer text in the plain text output. Footers are appended with a clear section separator. |
| `include_headers` | boolean | No | Whether to include header text in the plain text output. Headers are appended with a clear section separator. |
| `include_footnotes` | boolean | No | Whether to include footnote text in the plain text output. Footnotes are appended with a clear section separator. |
| `table_row_delimiter` | string | No | The delimiter to use between table rows (default: newline character). |
| `include_tabs_content` | boolean | No | When true, fetch the document using includeTabsContent=true query parameter to render all tabs. When false, only the main body content is rendered. |
| `table_cell_delimiter` | string | No | The delimiter to use between table cells (default: tab character). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Insert Inline Image

**Slug:** `GOOGLEDOCS_INSERT_INLINE_IMAGE`

Tool to insert an image from a given URI at a specified location in a Google Document as an inline image. Use when you need to add an image to a document programmatically.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `uri` | string | Yes | The URI of the image. Must be a publicly accessible direct image URL (no redirects or viewer links like Google Drive preview pages). Images must be less than 50MB, not exceed 25 megapixels, and be in PNG, JPEG, or GIF format (SVG not supported). The URI can be at most 2 kB in length. |
| `location` | object | Yes | The location in the document to insert the image. The index field is required to specify the insertion point. |
| `documentId` | string | Yes | The ID of the document to update. |
| `objectSize` | object | No | The size of the image. If not specified, the image is rendered at its intrinsic size. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Insert Page Break

**Slug:** `GOOGLEDOCS_INSERT_PAGE_BREAK`

Tool to insert a page break into a Google Document. Use when you need to start new content on a fresh page, such as at the end of a chapter or section.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `documentId` | string | Yes | The ID of the document to update. |
| `insertPageBreak` | object | Yes | The details for the insertPageBreak request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Insert Table in Google Doc

**Slug:** `GOOGLEDOCS_INSERT_TABLE_ACTION`

Tool to insert a table into a Google Document. Use when you need to add a new table at a specific location or at the end of a segment (like document body, header, or footer) in a document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `rows` | integer | Yes | The number of rows in the table. |
| `index` | integer | No | The zero-based index where the table will be inserted, in UTF-16 code units. IMPORTANT: The index must be strictly less than the segment's end index (you cannot insert at the exact end position using an index). To insert at the end of a segment, omit this parameter and set 'insertAtEndOfSegment' to true instead. If provided, 'location' will be used. If omitted and 'insertAtEndOfSegment' is false or omitted, 'endOfSegmentLocation' will be used for the document body. |
| `tabId` | string | No | The tab that the location is in. When omitted, the request is applied to the first tab. |
| `columns` | integer | Yes | The number of columns in the table. |
| `segmentId` | string | No | The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body. |
| `documentId` | string | Yes | The ID of the document to update. |
| `insertAtEndOfSegment` | boolean | No | If true, inserts the table at the end of the segment (document body, header, or footer specified by segment_id). This is the recommended way to append content to the end of a segment, as using an index equal to the segment's end position will fail. If false or omitted, and 'index' is not provided, it defaults to inserting at the end of the document body. If 'index' is provided, this field is ignored. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Insert Table Column

**Slug:** `GOOGLEDOCS_INSERT_TABLE_COLUMN`

Tool to insert a new column into a table in a Google Document. Use this tool when you need to add a column to an existing table at a specific location.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `requests` | array | Yes | A list of insert table column requests. Multiple requests can be sent in a single call to insert columns at different locations in the document. |
| `document_id` | string | Yes | The ID of the document to update. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Insert Text into Document

**Slug:** `GOOGLEDOCS_INSERT_TEXT_ACTION`

Tool to insert a string of text at a specified location within a Google Document. Use when you need to add new text content to an existing document. IMPORTANT: Two ways to specify insertion location: 1. Use 'insertion_index' to insert at a specific position (index 1 is safe for document start) 2. Use 'append_to_end=true' to append text to the end of the document (recommended for appending) CRITICAL CONSTRAINT: When using insertion_index, the index MUST fall within the bounds of an EXISTING paragraph. You cannot insert text at arbitrary indices or at structural boundaries (e.g., table starts). The index must also be strictly less than the document's end index. To safely append text without index concerns, use append_to_end=true.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `segment_id` | string | No | The ID of the header, footer or footnote to insert text into. Leave empty or omit to insert into the document body. Only used when append_to_end is true. |
| `document_id` | string | Yes | The ID of the document to insert text into. |
| `append_to_end` | boolean | No | Set to true to append text to the end of the document body. When true, the 'insertion_index' parameter is ignored. This is the recommended way to add text at the end of a document as it avoids index boundary issues. |
| `text_to_insert` | string | Yes | The string of text to insert. Alternatively, you can provide this as 'text'. |
| `insertion_index` | integer | No | The zero-based UTF-16 code unit index where text will be inserted. Alternatively, you can provide this as 'index'. CRITICAL CONSTRAINTS: (1) The index MUST fall within the bounds of an EXISTING paragraph - you cannot insert at arbitrary indices or at structural boundaries like table starts. (2) The index MUST be strictly less than the document's end index. Index 1 is the minimum valid index and is safe for inserting at the document start. To determine valid indices, first retrieve the document structure using GOOGLEDOCS_GET_DOCUMENT_BY_ID to identify paragraph boundaries. For safely adding text without index concerns, set 'append_to_end' to true instead. Either 'insertion_index' or 'append_to_end' must be provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Charts from Spreadsheet

**Slug:** `GOOGLEDOCS_LIST_SPREADSHEET_CHARTS_ACTION`

Tool to retrieve a list of charts with their IDs and metadata from a Google Sheets spreadsheet. Use to identify charts available for embedding into Google Docs.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fields_mask` | string | No | Field mask to specify which parts of the spreadsheet and chart resources to include. Example: '''sheets(properties(sheetId,title),charts(chartId,spec(title,altText)))''' |
| `spreadsheet_id` | string | Yes | The ID of the Google Sheets spreadsheet. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Replace All Text in Document

**Slug:** `GOOGLEDOCS_REPLACE_ALL_TEXT`

Tool to replace all occurrences of a specified text string with another text string throughout a Google Document. Use when you need to perform a global find and replace operation within a document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tab_ids` | array | No | Optional. A list of specific tab IDs to perform the replacement on. If not provided, replacement occurs on all tabs. |
| `find_text` | string | Yes | The text to search for in the document. |
| `match_case` | boolean | No | Indicates whether the search should be case sensitive. Defaults to False (case insensitive). |
| `document_id` | string | Yes | The ID of the document to update. |
| `replace_text` | string | Yes | The text that will replace the matched text. |
| `search_by_regex` | boolean | No | Optional. If True, the find_text is treated as a regular expression. Defaults to False. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Replace Image in Document

**Slug:** `GOOGLEDOCS_REPLACE_IMAGE`

Tool to replace a specific image in a document with a new image from a URI. Use when you need to update an existing image within a Google Doc.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document_id` | string | Yes | The ID of the document containing the image to replace. |
| `replace_image` | object | Yes | The details of the image replacement request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Search Documents

**Slug:** `GOOGLEDOCS_SEARCH_DOCUMENTS`

Search for Google Documents using various filters including name, content, date ranges, and more.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | No | Search query to filter documents. Provide either: (1) Plain text to search in document content (e.g., 'quarterly report'), which will search fullText, or (2) Drive API query syntax with operators like 'name contains', 'fullText contains', combined with 'and', 'or', 'not'. Leave empty to get all documents. |
| `order_by` | string | No | Order results by field. Common options: 'modifiedTime desc', 'modifiedTime asc', 'name', 'createdTime desc' |
| `page_token` | string | No | Token for continuing a previous search request on the next page. Use the next_page_token from the previous response to retrieve additional results. |
| `max_results` | integer | No | Maximum number of documents to return per page (1-100). Defaults to 10. Use page_token for pagination when more results are available. |
| `starred_only` | boolean | No | Whether to return only starred documents. Defaults to False. |
| `created_after` | string | No | Return documents created after this date. Use RFC 3339 format like '2024-01-01T00:00:00Z'. |
| `modified_after` | string | No | Return documents modified after this date. Use RFC 3339 format like '2024-01-01T00:00:00Z'. |
| `shared_with_me` | boolean | No | Whether to return only documents shared with the current user. Defaults to False. |
| `include_trashed` | boolean | No | Whether to include documents in trash. Defaults to False. |
| `include_shared_drives` | boolean | No | Whether to include documents from shared drives you have access to. Defaults to True. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Unmerge Table Cells

**Slug:** `GOOGLEDOCS_UNMERGE_TABLE_CELLS`

Tool to unmerge previously merged cells in a table. Use this when you need to revert merged cells in a Google Document table back to their individual cell states.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `documentId` | string | Yes | The ID of the document to unmerge table cells in. |
| `tableRange` | object | Yes | The table range specifying which cells of the table to unmerge. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document Batch

**Slug:** `GOOGLEDOCS_UPDATE_DOCUMENT_BATCH`

Tool to apply one or more updates to a Google Document. Use when you need to perform batch operations on a document, such as inserting text, updating styles, or modifying document structure. Supports 35+ request types including insertText, replaceAllText, updateTextStyle, createParagraphBullets, insertTable, createHeader/Footer, and more. Each request is validated before being applied. If any request is invalid, the entire operation fails and nothing is applied.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `requests` | array | Yes | A list of updates to apply to the document. Each request is a dictionary containing exactly one request type (e.g., insertText, replaceAllText, updateTextStyle, createParagraphBullets, etc.). The request types include: insertText, replaceAllText, updateTextStyle, createParagraphBullets, deleteParagraphBullets, updateParagraphStyle, createNamedRange, deleteNamedRange, replaceNamedRangeContent, deleteContentRange, insertInlineImage, insertTable, insertTableRow, insertTableColumn, deleteTableRow, deleteTableColumn, updateTableColumnProperties, updateTableCellStyle, updateTableRowStyle, mergeTableCells, unmergeTableCells, pinTableHeaderRows, insertPageBreak, insertSectionBreak, updateSectionStyle, createHeader, deleteHeader, createFooter, deleteFooter, createFootnote, updateDocumentStyle, deletePositionedObject, replaceImage, and more. Refer to https://developers.google.com/docs/api/reference/rest/v1/documents/request for detailed schemas. |
| `document_id` | string | Yes | The ID of the document to update. |
| `write_control` | object | No | Provides control over how write requests are executed. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document Markdown

**Slug:** `GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWN`

Replaces the entire content of an existing Google Docs document with new Markdown text; requires edit permissions for the document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier for the Google Docs document to update. Accepts either a document ID (alphanumeric string, length varies by document age - newer documents typically have 44-character IDs) or a full Google Docs URL (e.g., https://docs.google.com/document/d/{DOCUMENT_ID}/edit). When a URL is provided, the document ID will be automatically extracted. |
| `markdown` | string | Yes | Markdown content that will replace the document's entire existing content. Supports standard Markdown features. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document Section Markdown

**Slug:** `GOOGLEDOCS_UPDATE_DOCUMENT_SECTION_MARKDOWN`

Tool to insert or replace a section of a Google Docs document with Markdown content. Use when you need to update only a section of a document by specifying start and optional end indices. Supports full Markdown formatting.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `end_index` | integer | No | Optional one-based end index of the content to replace (exclusive); must be greater than or equal to start_index. If end_index is not provided, the content is inserted at the start_index without replacing existing content. Requires start_index to be provided - if start_index is omitted (append mode), end_index is ignored. Important: Use the exact indices from GOOGLEDOCS_GET_DOCUMENT_BY_ID without modification. The Google Docs API does not allow deleting the last newline character of a document segment (body, header, footer, etc.), so ensure end_index does not include the final segment newline. |
| `document_id` | string | Yes | The unique ID of the Google Docs document to update. This is the alphanumeric string found in the document URL: https://docs.google.com/document/d/{DOCUMENT_ID}/edit. Valid IDs are typically 44 characters long and contain only letters, numbers, hyphens, and underscores (e.g., '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms'). To get a document ID: create a new document using GOOGLEDOCS_CREATE_DOCUMENT, or extract it from an existing document's URL. Also accepts parameter aliases: 'id', 'doc_id', 'documentId', or 'docId'. |
| `start_index` | integer | No | One-based UTF-16 code unit index where to insert or start replacement. If not provided, content will be appended to the end of the document. Use 1 to insert at the very beginning of the document. To insert at a specific position, first use GOOGLEDOCS_GET_DOCUMENT_BY_ID to retrieve the document structure and find the desired index from the body.content elements' start_index/end_index values. If the provided index equals or exceeds the document segment's end index, it will be automatically adjusted to the last valid position (end_index - 1) and a message will be included in the response. |
| `markdown_text` | string | Yes | Markdown content to insert or replace in the document section. Large content is automatically split into smaller batches to avoid API limits. Also accepts 'markdown', 'content', 'text', 'body', 'markdownText', or 'markdown_content'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Document Style

**Slug:** `GOOGLEDOCS_UPDATE_DOCUMENT_STYLE`

Tool to update the overall document style, such as page size, margins, and default text direction. Use when you need to modify the global style settings of a Google Document.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `fields` | string | No | A comma-separated list of fields to update (using camelCase API names like 'marginTop', 'pageSize'). Use '*' to automatically update only fields that have values set in document_style. For example: "pageSize,marginTop,marginBottom". When '*' is specified, the action automatically computes the field mask from the provided document_style fields. |
| `tab_id` | string | No | The ID of the tab to update the style for. If not provided, the first tab is used. |
| `document_id` | string | Yes | The ID of the document to update. |
| `document_style` | object | Yes | The DocumentStyle object with the new style settings. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update existing document

**Slug:** `GOOGLEDOCS_UPDATE_EXISTING_DOCUMENT`

Applies programmatic edits, such as text insertion, deletion, or formatting, to a specified Google Doc using the `batchUpdate` API method.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `editDocs` | array | Yes | (Required) Requests conforming to the Google Docs API `batchUpdate` method, where each item specifies an operation. Must contain at least one operation. For full details and more request types, see https://developers.google.com/docs/api/reference/rest/v1/documents/batchUpdate.  IMPORTANT LIMITATIONS: - Document title CANNOT be updated via batchUpdate. The title is file metadata managed by Google Drive API, not Google Docs API. To rename a document, use the Google Drive API's files.update method instead.  CRITICAL - SEGMENT IDs: A segment ID identifies a specific part of the document. Valid segment IDs are: 1. Empty string "" for the document body (most common) 2. A header ID from the document's 'headers' property 3. A footer ID from the document's 'footers' property 4. A footnote ID from the document's 'footnotes' property  WARNING: Internal paragraph/element IDs (which often start with 'kix.') are NOT valid segment IDs. These identifiers appear in the document structure but cannot be used as segment IDs. Using them will result in "Segment with ID ... was not found" errors.  To get valid header/footer/footnote IDs, call GOOGLEDOCS_GET_DOCUMENT_BY_ID and examine the 'headers', 'footers', or 'footnotes' properties in the response.  CRITICAL - BATCH INSERT OPERATIONS: Operations are processed sequentially. Each insertText shifts all subsequent content indices forward by the length of inserted text. If you batch multiple insertText operations with pre-calculated indices, later operations will have stale indices and may fail.  IMPORTANT - PARAGRAPH BOUNDARIES: Text can only be inserted INSIDE existing paragraphs, not at structural boundaries. For example, text cannot be inserted at a table's start index - it must be inserted inside the preceding or following paragraph. When working with tables, add +1 or +2 to the table cell's startIndex to insert inside the cell's paragraph bounds.  Safe patterns for multiple insertions: 1. APPEND MULTIPLE TEXTS: Use endOfSegmentLocation for each insertion (they will append in order):    [{"insertText": {"text": "First\n", "endOfSegmentLocation": {"segmentId": ""}}},     {"insertText": {"text": "Second\n", "endOfSegmentLocation": {"segmentId": ""}}}]  2. INSERT AT SPECIFIC POSITIONS: Process in REVERSE index order (highest index first):    To insert "A" at index 10 and "B" at index 50, order them as:    [{"insertText": {"text": "B", "location": {"index": 50}}},     {"insertText": {"text": "A", "location": {"index": 10}}}]  3. SINGLE BATCH CALL: Make separate API calls for each insertion if indices depend on current document state.  CRITICAL - INDEX BOUNDARIES: When using location.index for ANY insert operation (insertText, insertTable, insertPageBreak, etc.), the index must be LESS than the segment's end index. If your document body ends at index N, valid indices are 1 to N-1. Trying to insert at index N or higher will fail with "Index X must be less than the end index of the referenced segment, N". To insert at the end of a segment, ALWAYS use endOfSegmentLocation instead of location.  AUTO-CORRECTION FOR insertText: If you provide an insertText operation with text but without specifying either 'location' or 'endOfSegmentLocation', the action will automatically add endOfSegmentLocation: {segmentId: ''} to append the text to the end of the document body. This prevents errors on empty documents and provides user-friendly behavior. The response will include a composio_execution_message explaining the auto-correction. If you want to insert at a specific location, explicitly provide the 'location' field.  VALID REQUEST TYPES include: insertText, deleteContentRange, replaceAllText, updateTextStyle, updateParagraphStyle, createParagraphBullets, deleteParagraphBullets, insertTable, insertTableRow, insertTableColumn, deleteTableRow, deleteTableColumn, insertPageBreak, insertInlineImage, createNamedRange, deleteNamedRange, updateDocumentStyle, updateSectionStyle, createHeader, createFooter, deleteHeader, deleteFooter, createFootnote, mergeTableCells, unmergeTableCells, replaceImage, and more.  DELETE TABLE ROW (deleteTableRow): CRITICAL: deleteTableRow requires a tableCellLocation object that specifies which row to delete. The structure is:  deleteTableRow has ONE field: - tableCellLocation (object, REQUIRED): Contains tableStartLocation, rowIndex, and columnIndex   - tableStartLocation (object, REQUIRED): Location object specifying where the table starts     - index (integer, REQUIRED): The index where the table begins in the document     - segmentId (string, optional): Segment ID (empty string "" for document body)     - tabId (string, optional): Tab ID if using tabs   - rowIndex (integer, REQUIRED): Zero-based row index (e.g., second row = 1)   - columnIndex (integer, REQUIRED): Zero-based column index (can be any column in the target row)  IMPORTANT: rowIndex and tableStartLocation are NOT direct fields of deleteTableRow. They must be nested inside tableCellLocation.  To delete the second row (rowIndex: 1) from a table starting at index 2: [{   "deleteTableRow": {     "tableCellLocation": {       "tableStartLocation": {"index": 2},       "rowIndex": 1,       "columnIndex": 0     }   } }]  If the specified cell is merged and spans multiple rows, all spanned rows will be deleted. If no rows remain after deletion, the entire table is deleted.  For updateDocumentStyle, valid fields in documentStyle include: background, marginTop, marginBottom, marginLeft, marginRight, marginHeader, marginFooter, pageSize, pageNumberStart, useEvenPageHeaderFooter, useFirstPageHeaderFooter, flipPageOrientation. Note: "title" is NOT a valid field in documentStyle.  Examples:  To insert text at the beginning of the document: [   {     "insertText": {       "text": "This is a new paragraph.\n",       "location": {         "index": 1       }     }   } ]  To insert text at the end of the document (body): [   {     "insertText": {       "text": "Appended text\n",       "endOfSegmentLocation": {         "segmentId": ""       }     }   } ]  To insert a table at the end of the document (body): [   {     "insertTable": {       "rows": 3,       "columns": 4,       "endOfSegmentLocation": {         "segmentId": ""       }     }   } ]  To insert a table at a specific index (location): IMPORTANT: The index must be LESS than the segment end. Use GOOGLEDOCS_GET_DOCUMENT_BY_ID first to find valid indices. If you don't know the document structure, use endOfSegmentLocation (shown above) instead. [   {     "insertTable": {       "rows": 2,       "columns": 3,       "location": {         "index": 1       }     }   } ]  To delete content by index range (startIndex must be less than endIndex): [{   "deleteContentRange": {     "range": {       "startIndex": 1,       "endIndex": 20     }   } }]  IMPORTANT: When using deleteContentRange, the range CANNOT include the trailing newline character at the end of a segment (body, header, footer, or footnote). Each segment has a protected final newline that cannot be deleted. If your segment ends at index N, use endIndex: N-1 to avoid this error. Use GetDocumentById first to find the correct segment boundaries.  To replace all text: [{   "replaceAllText": {     "containsText": {       "text": "old text"     },     "replaceText": "new text"   } }]  To update document style (e.g., margins): [{   "updateDocumentStyle": {     "documentStyle": {       "marginTop": {"magnitude": 72, "unit": "PT"},       "marginBottom": {"magnitude": 72, "unit": "PT"}     },     "fields": "marginTop,marginBottom"   } }]  TABLE CELL STYLING (updateTableCellStyle): CRITICAL: The tableStartLocation.index must be the EXACT start_index of an existing table in the document. You MUST first call GOOGLEDOCS_GET_DOCUMENT_BY_ID to find valid table indices.  IMPORTANT: Use EITHER tableStartLocation (to style ALL cells) OR tableRange (to style SPECIFIC cells), not both. If you need to style specific cells, use tableRange only - do NOT include a top-level tableStartLocation field (tableRange already contains tableStartLocation inside tableCellLocation).  To find the correct tableStartLocation.index: 1. Call GOOGLEDOCS_GET_DOCUMENT_BY_ID with your document_id 2. In the response, look for 'table' elements in body.content 3. Each table has a 'startIndex' field - use this value as tableStartLocation.index  To style ALL cells in a table (use tableStartLocation): [{   "updateTableCellStyle": {     "tableStartLocation": {"index": 2},     "tableCellStyle": {       "backgroundColor": {"color": {"rgbColor": {"red": 0.9, "green": 0.9, "blue": 0.9}}}     },     "fields": "backgroundColor"   } }]  To style SPECIFIC cells (use tableRange only, no top-level tableStartLocation): [{   "updateTableCellStyle": {     "tableRange": {       "tableCellLocation": {         "tableStartLocation": {"index": 2},         "rowIndex": 0,         "columnIndex": 0       },       "rowSpan": 2,       "columnSpan": 2     },     "tableCellStyle": {       "backgroundColor": {"color": {"rgbColor": {"red": 1.0, "green": 0.8, "blue": 0.8}}}     },     "fields": "backgroundColor"   } }]  Note: rowIndex and columnIndex are 0-based. The tableStartLocation.index in the examples above (2) is illustrative - you must use the actual table start index from your document. |
| `document_id` | string | Yes | (Required) The unique identifier of the Google Docs document to be updated. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Table Row Style

**Slug:** `GOOGLEDOCS_UPDATE_TABLE_ROW_STYLE`

Tool to update the style of a table row in a Google Document. Use when you need to modify the appearance of specific rows within a table, such as setting minimum row height or marking rows as headers.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `documentId` | string | Yes | The ID of the document to update. |
| `updateTableRowStyle` | object | Yes |  |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | object | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |


## Triggers

### Document Deleted

**Slug:** `GOOGLEDOCS_DOCUMENT_DELETED_TRIGGER`

**Type:** poll

Triggers when an existing Google Doc is deleted (moved to trash).
    This trigger monitors Google Docs and fires when documents are trashed.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |
| `max_results` | integer | No | Maximum number of documents to check in each poll (1-1000) |
| `query` | string | No | Optional search query to filter documents. Leave empty to monitor all documents for deletion. |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document` | object | Yes | The deleted Google document |
| `event_type` | string | No | Type of event that occurred |

### Document Updated

**Slug:** `GOOGLEDOCS_DOCUMENT_UPDATED_TRIGGER`

**Type:** poll

Triggers when an existing Google Doc is updated or modified.
    This trigger monitors Google Docs and fires when documents are updated.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |
| `max_results` | integer | No | Maximum number of documents to check in each poll (1-1000) |
| `query` | string | No | Optional search query to filter documents. Leave empty to monitor all documents. |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document` | object | Yes | The updated Google document |
| `event_type` | string | No | Type of event that occurred |

### New Folder Created in Root

**Slug:** `GOOGLEDOCS_FOLDER_CREATED_TRIGGER`

**Type:** poll

Triggers when a new folder is created in the root folder of Google Drive.
    This trigger monitors Google Drive and fires when new folders are detected in the root directory.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |
| `max_results` | integer | No | Maximum number of folders to check in each poll (1-1000) |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_type` | string | No | Type of event that occurred |
| `folder` | object | Yes | The newly created Google Drive folder |

### New Document Added

**Slug:** `GOOGLEDOCS_PAGE_ADDED_TRIGGER`

**Type:** poll

Triggers when a new Google Doc is added/created.
    This trigger monitors Google Docs and fires when new documents are detected.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |
| `max_results` | integer | No | Maximum number of documents to check in each poll (1-1000) |
| `query` | string | No | Optional search query to filter documents. Can search by name (name contains 'report'), full text content (fullText contains 'important'), or use complex queries with operators like 'and', 'or', 'not'. Leave empty to monitor all documents. |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `document` | object | Yes | The newly added Google document |
| `event_type` | string | No | Type of event that occurred |
