Skip to main content
Google Docs logo
  • Category: documents
  • Auth: OAUTH2
  • Composio-managed OAuth available? Yes
  • Tools: 48
  • Triggers: 10
  • Slug: GOOGLEDOCS
  • Version: 20261101_00

Frequently Asked Questions

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.
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.
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.
The requested scopes are invalid or incorrectly formatted in the authorization URL. Verify your scope values against the Google OAuth scopes docs. If you’re creating auth configs programmatically, see the programmatic auth config guide.
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 was exceeded. Re-authenticating the user typically resolves this.
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

Slug: GOOGLEDOCS_COPY_DOCUMENTTool 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

string
The title for the new copied document. If not provided, the title will be ‘Copy of [original document’s title]’.
string
required
The ID of the Google Document to be copied.
boolean
Whether to support copying documents from shared drives. Defaults to True.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_AND_POPULATE_TABLECreates a table in a Google Document and attempts to populate its cells with the provided text. Table creation and cell population are separate steps, so a failure after creation can leave the table in the document.

Input Parameters

integer
required
The number of rows in the table. Must be between 1 and 20.
integer
The zero-based index where the table will be inserted, in UTF-16 code units. The index must be strictly less than the segment’s end index. To insert at the end of a segment, omit this parameter and set ‘insertAtEndOfSegment’ to true instead.
string
The tab that the location is in. When omitted, the request is applied to the first tab.
integer
required
The number of columns in the table. Must be between 1 and 20.
array
required
A 2D array (list of lists) containing the text content for each cell. The outer list represents rows, and each inner list represents columns. Must match the dimensions specified by ‘rows’ and ‘columns’. Empty strings are allowed for empty cells.
string
The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document’s body.
string
required
The ID of the document to update.
boolean
If true, inserts the table at the end of the segment (document body, header, or footer specified by segment_id). If false or omitted, and ‘index’ is not provided, it defaults to inserting at the end of the document body.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_DOCUMENTCreates 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

string
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.
string
required
Title for the new document, used as its filename in Google Drive.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_DOCUMENT2DEPRECATED: Use GOOGLEDOCS_CREATE_DOCUMENT instead. Tool to create a blank Google Docs document with a specified title. Use when you need to create a new, empty document.

Input Parameters

string
required
The title of the document to create. This will be used as the document name in Google Drive.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_DOCUMENT_MARKDOWNCreates a new Google Docs document, optionally initializing it with a title and content provided as Markdown text.

Input Parameters

string
required
The title for the new Google Docs document.
array
Optional uploaded images that Markdown can reference by name. Use Markdown image syntax like Alt. Public HTTPS image URLs in markdown do not need image_assets.
string
The initial content for the document, formatted as Markdown. Also accepts ‘content’ as an alias. Supports headings, real Google Docs lists including nested lists, multiple Markdown tables, task-list markers, images via publicly accessible URLs or matching image_assets uploads (max 2KB URL length after resolution; formats: JPEG, PNG, GIF; SVG not supported), blockquotes, code blocks, hyperlinks (e.g., text), and text formatting (bold, italic, etc.). If empty or omitted, creates document with title only.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_DRIVE_FILECreate a metadata-only Google Drive file, folder, or shortcut.

Input Parameters

string
Name of the Drive item. Google Drive supplies a default when omitted.
string
Drive partial-response field selector.
boolean
Whether the item is starred.
string
Drive MIME type, such as application/vnd.google-apps.folder.
object
Public custom properties.
string
File description.
object
Private app custom properties.
string
Parent Drive folder ID.
string
Target ID when creating a Drive shortcut.
boolean
Support My Drive and shared drives.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_FOOTNOTETool 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

object
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.
string
required
The ID of the document to create the footnote in.
object
Inserts the footnote reference at the end of the document body. The segmentId within this EndOfSegmentLocation object must be empty.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_HEADERCreates a header in a Google Document, optionally for a specified section, and can add text. For a document-level default header, it may reuse an existing header; text insertion is attempted separately and its success is reported.

Input Parameters

string
Optional text content to add to the header after creation. If provided, the text will be inserted into the header at index 0.
string ("HEADER_FOOTER_TYPE_UNSPECIFIED" | "DEFAULT")
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.
string
required
The ID of the document to create the header in.
object
The location of the SectionBreak which begins the section this header should belong to. Only needed for section-specific headers.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_NAMED_RANGETool 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

string
required
The name for the new named range. Must be 1-256 characters.
string
Optional. The ID of the document tab containing this range. When omitted, Google Docs applies the request to the first tab.
string
required
The ID of the document where the named range will be created.
integer
required
The zero-based end index of the range.
string
Optional. The ID of the header, footer, or footnote. Empty for document body.
integer
required
The zero-based start index of the range.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_PARAGRAPH_BULLETSTool 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

string
Optional tab ID to apply to createParagraphBullets.range.tabId. When omitted, Google Docs applies the request to the first tab.
string
required
The ID of the document to update.
object
required
The request body for creating paragraph bullets in the document.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_CREATE_TABCreates a new tab in a Google Docs document. Tabs allow you to organize document content into separate sections within a single document. Use this action when you need to add a new organizational tab to a document. When a tab is added at a specified index, all subsequent tabs’ indexes are automatically incremented.

Input Parameters

string
required
The unique identifier of the Google Docs document where the tab will be created. This ID can be found in the document’s URL.
object
Properties of a tab to be created.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_DELETE_CONTENT_RANGETool 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

object
required
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.
string
required
The ID of the document from which to delete content. This ID can be found in the URL of the Google Doc.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_DELETE_HEADERDeletes a specified header by ID from a Google Document, optionally targeting a document tab.

Input Parameters

string
The tab containing the header to delete. When omitted, the request is applied to the first tab.
string
required
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.
string
required
The ID of the document from which to delete the header.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_DELETE_NAMED_RANGETool 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

string
required
The ID of the document.
object
required
Specifies the named range to delete.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_DELETE_PARAGRAPH_BULLETSTool 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

object
required
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.
string
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.
string
required
The ID of the document to update.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_DELETE_TABDeletes a tab from a Google Document. This action is irreversible — the tab cannot be recovered once removed. Use when you need to remove a tab and all its child tabs from a document’s tab structure.

Input Parameters

string
required
The ID of the tab to delete. If the tab has child tabs, they will also be deleted.
string
required
The ID of the document containing the tab to delete.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_DELETE_TABLE_COLUMNTool 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

array
required
A list of requests to be applied to the document.
string
required
The ID of the document to delete the table column from.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_DELETE_TABLE_ROWTool 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

string
required
The ID of the document.
object
required
The reference table cell location from which the row will be deleted.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_EXPORT_DOCUMENT_AS_PDFTool 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

string
required
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
string
Optional suggested filename for the exported PDF (e.g., ‘report.pdf’). If not provided, a default filename will be generated.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_GET_DOCS_DRIVE_FILE_METADATAGet selected metadata fields for one Google Drive file by ID.

Input Parameters

string
Drive partial-response field selector.
string
required
Opaque Google Drive file ID.
string
Comma-separated label IDs to include in labelInfo.
boolean
Whether the request supports files in My Drive and shared drives.
string
Include permissions for the published view.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_GET_DOCS_SPREADSHEET_VALUESRead cell values from one range in a Google Sheets spreadsheet.

Input Parameters

string
required
An A1 or R1C1 notation range to read, including a sheet name when needed, such as ‘Sheet1!A1:D100’.
string
required
The Google Sheets spreadsheet ID from the spreadsheet URL.
string ("ROWS" | "COLUMNS")
Whether the outer values array represents rows or columns.
string ("FORMATTED_VALUE" | "UNFORMATTED_VALUE" | "FORMULA")
How cell values are represented in the response.
string ("SERIAL_NUMBER" | "FORMATTED_STRING")
How dates, times, and durations are represented when value_render_option is UNFORMATTED_VALUE.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_GET_DOCUMENT_BY_IDRetrieves an existing Google Document by its ID; will error if the document is not found.

Input Parameters

string
required
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.
boolean
When true, request includeTabsContent=true so the response includes document.tabs with content for all tabs. When false, Google Docs returns the legacy first-tab content fields.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_GET_DOCUMENT_END_INDEXRetrieves the end index and paragraph structure of a Google Document or specific segment. Use this action when you need to determine valid insertion points for text operations, especially before using insertText requests. The end index represents the maximum boundary of the document body or specified segment (header, footer, footnote, or tab).

Input Parameters

string
The ID of the document tab to get the end index from. When omitted, the request is applied to the first tab.
string
The ID of the header, footer, or footnote segment to get the end index for. Leave empty or omit to get the end index of the document body.
string
required
The ID of the document to retrieve the end index from.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_GET_DOCUMENT_PLAINTEXTRetrieve 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

array
Optional tab IDs to include when include_tabs_content=true. Nested child tabs are searched recursively.
string
required
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.
boolean
Whether to include table content in the plain text output. Tables are rendered with configurable cell and row delimiters.
boolean
Whether to include footer text in the plain text output. Footers are appended with a clear section separator.
boolean
Whether to include header text in the plain text output. Headers are appended with a clear section separator.
boolean
Whether to include footnote text in the plain text output. Footnotes are appended with a clear section separator.
string
The delimiter to use between table rows (default: newline character).
boolean
When true, fetch the document using includeTabsContent=true query parameter to render all tabs. When false, only the main body content is rendered.
string
The delimiter to use between table cells (default: tab character).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_INSERT_IMAGE_IN_TABLE_CELLInserts an image from a URI at a position in a Google Document table cell identified by table start index, row and column. The table lookup searches top-level body content, including the specified top-level tab when provided.

Input Parameters

string
required
The URI of the image to insert. Must be a publicly accessible direct image URL (no redirects or viewer links). 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.
string
required
The ID of the document containing the table.
object
The size of the image. If not specified, the image is rendered at its intrinsic size.
integer
The zero-based offset within the table cell’s content where the image should be inserted. Each table cell contains a paragraph, and this index specifies the position within that paragraph. Use 0 to insert at the beginning of the cell, or a higher value to insert after existing content. If omitted, the image is inserted at the beginning of the cell (index 0).
object
required
The location of the table cell where the image should be inserted. Specify the table’s start index, row index, and column index to identify the target cell.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_INSERT_INLINE_IMAGETool 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

string
required
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.
object
required
The location in the document to insert the image. The index field is required to specify the insertion point.
string
required
The ID of the document to update.
object
The size of the image. If not specified, the image is rendered at its intrinsic size.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_INSERT_PAGE_BREAKTool 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

string
required
The ID of the document to update.
string
required
The details for the insertPageBreak request.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_INSERT_TABLE_ACTIONTool 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

integer
required
The number of rows in the table.
integer
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.
string
The tab that the location is in. When omitted, the request is applied to the first tab.
integer
required
The number of columns in the table.
string
The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document’s body.
string
required
The ID of the document to update.
boolean
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_INSERT_TABLE_COLUMNTool 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

array
required
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.
string
required
The ID of the document to update.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_INSERT_TABLE_ROWInserts a new row into a table in a Google Document at a specified location. Use this action when you need to add a row to an existing table, either above or below a reference cell location.

Input Parameters

array
required
A list of insert table row requests. Multiple requests can be sent in a single call to insert rows at different locations in the document.
string
required
The ID of the document to update.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_INSERT_TEXT_ACTIONTool 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

string
The ID of the document tab to insert text into. When omitted, Google Docs applies the request to the first tab.
string
The ID of the header, footer or footnote to insert text into. Leave empty or omit to insert into the document body. Works with both append_to_end and insertion_index modes.
string
required
The ID of the document to insert text into.
boolean
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.
string
required
The string of text to insert. Alternatively, you can provide this as ‘text’.
integer
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_INSERT_TEXT_IN_TABLE_CELLInsert text into a Google Docs table using the table’s start index and zero-based row and column positions. Existing table content can cause the text to be inserted outside the requested cell.

Input Parameters

string
required
The text to insert into the table cell.
string
The ID of the document tab containing the table. When omitted, the request is applied to the first tab.
integer
required
The zero-based row index of the target cell (0 for first row, 1 for second row, etc.).
string
required
The ID of the document containing the table.
integer
required
The zero-based column index of the target cell (0 for first column, 1 for second column, etc.).
integer
required
The zero-based index where the target table starts in the document, in UTF-16 code units. To find this index, use GOOGLEDOCS_GET_DOCUMENT_BY_ID to retrieve the document structure and locate the table’s startIndex.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_LIST_DRIVE_ITEM_PERMISSIONSList permissions for a Google Drive file, folder, or shared drive.

Input Parameters

string
Drive partial-response selector for the permission page.
string
required
Opaque Drive file or shared drive ID.
integer
Maximum number of permissions to return on this page (1-100).
string
Token from a prior next_page_token for the next page.
boolean
Whether the request supports My Drive and shared drives.
boolean
Use eligible Workspace administrator access for a shared drive.
string
Include permissions for the published view.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_LIST_SPREADSHEET_CHARTSTool 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

string
required
The ID of the Google Sheets spreadsheet from which to retrieve charts.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_REPLACE_ALL_TEXTReplaces occurrences of text in a Google Document, either across the document or in selected tabs. Supports case-sensitive matching and regular expressions.

Input Parameters

array
Optional. A list of specific tab IDs to perform the replacement on. If not provided, replacement occurs on all tabs.
string
required
The text to search for in the document. Cannot be empty.
boolean
Indicates whether the search should be case sensitive. Defaults to False (case insensitive).
string
required
The ID of the document to update.
string
required
The text that will replace the matched text.
boolean
Optional. If True, the find_text is treated as a regular expression. Defaults to False.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_REPLACE_IMAGETool 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

string
required
The ID of the document containing the image to replace.
object
required
The details of the image replacement request.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_SEARCH_DOCUMENTSSearch for Google Documents using various filters including name, content, date ranges, and more.

Input Parameters

string
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.
string
Order results by field. Common options: ‘modifiedTime desc’, ‘modifiedTime asc’, ‘name’, ‘createdTime desc’
string
Token for continuing a previous search request on the next page. Use the next_page_token from the previous response to retrieve additional results.
integer
Maximum number of documents to return per page (1-100). Defaults to 10. Use page_token for pagination when more results are available.
boolean
Whether to return only starred documents. Defaults to False.
string
Return documents created after this date. Use RFC 3339 format like ‘2024-01-01T00:00:00Z’.
string
Return documents modified after this date. Use RFC 3339 format like ‘2024-01-01T00:00:00Z’.
boolean
Whether to return only documents shared with the current user. Defaults to False.
boolean
Whether to include documents in trash. Defaults to False.
string ("minimal" | "full")
Level of detail in the response. ‘minimal’ returns only essential fields (id, name, modifiedTime, webViewLink) for efficient token usage. ‘full’ returns comprehensive metadata including permissions, owners, timestamps, and other detailed information.
boolean
Whether to include documents from shared drives you have access to. Defaults to True.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UNMERGE_TABLE_CELLSTool 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

string
required
The ID of the document to unmerge table cells in.
object
required
The table range specifying which cells of the table to unmerge.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UPDATE_DOCUMENT_BATCHApplies a batch of updates to a Google Document, such as inserting text, updating styles, and modifying tables or document structure. Text-style requests with empty ranges are filtered out before the remaining requests are submitted; optional write control helps manage concurrent edits. DEPRECATED: Use UpdateExistingDocument instead.

Input Parameters

array
required
A list of updates to apply to the document. Each request dict must contain exactly one request type key (e.g., insertText, replaceAllText, updateTextStyle, createParagraphBullets). For updateTextStyle, range must be non-empty (startIndex < endIndex). See https://developers.google.com/docs/api/reference/rest/v1/documents/request for all types.
string
required
The ID of the document to update.
object
Provides control over how write requests are executed.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UPDATE_DOCUMENT_MARKDOWNReplaces the body content of a Google Docs tab with rendered Markdown; requires edit permissions. If no tab is specified, the first tab is updated.

Input Parameters

string
required
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/&#123;DOCUMENT_ID&#125;/edit). When a URL is provided, the document ID will be automatically extracted.
string
Optional tab ID to replace with the rendered Markdown. When omitted, the first tab is updated.
string
required
Markdown content that will replace the document’s entire existing content. Supports standard Markdown features.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UPDATE_DOCUMENT_SECTION_MARKDOWNInsert or replace a section of a Google Docs document with rendered Markdown, using start and optional end indices, or append when no start index is provided. A replacement may leave the original content in place while inserting the new content.

Input Parameters

string
Optional tab ID to update with the rendered Markdown. When omitted, the first tab is updated.
integer
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.
string
required
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/&#123;DOCUMENT_ID&#125;/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’.
integer
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.
string
required
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UPDATE_DOCUMENT_STYLETool 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

string
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.
string
The ID of the tab to update the style for. If not provided, the first tab is used.
string
required
The ID of the document to update.
object
required
The DocumentStyle object with the new style settings.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UPDATE_EXISTING_DOCUMENTApplies a batch of edits to a specified Google Doc, such as inserting, deleting, or formatting text.

Input Parameters

array
required
(Required) A list of requests to execute on the document. Each request must be a dict containing exactly ONE of the valid request types listed below. Common request types: replaceAllText, insertText, updateTextStyle, createParagraphBullets, deleteParagraphBullets, createNamedRange, deleteNamedRange, updateParagraphStyle, deleteContentRange, insertInlineImage, insertTable, insertTableRow, insertTableColumn, deleteTableRow, deleteTableColumn, insertPageBreak, deletePositionedObject, updateTableColumnProperties, updateTableCellStyle, updateTableRowStyle, replaceImage, updateDocumentStyle, mergeTableCells, unmergeTableCells, createHeader, createFooter, createFootnote, replaceNamedRangeContent, updateSectionStyle, insertSectionBreak, deleteHeader, deleteFooter, pinTableHeaderRows, addDocumentTab, deleteTab, updateDocumentTabProperties, insertPerson. Do NOT use request types from other Google APIs (Slides, Sheets, etc.). For full request schemas, see https://developers.google.com/docs/api/reference/rest/v1/documents/batchUpdate. SEGMENT IDs: Use empty string "" for document body, or a header/footer/footnote ID from the document. Internal ‘kix.’ IDs are NOT valid segment IDs and will cause “Segment with ID … was not found” errors. Call GOOGLEDOCS_GET_DOCUMENT_BY_ID to get valid IDs. TAB IDs: When omitted, operations target the first tab. Invalid tab IDs cause errors. Get valid tab IDs from GOOGLEDOCS_GET_DOCUMENT_BY_ID at tabs[].tabProperties.tabId. BATCH INSERT OPERATIONS: Operations execute sequentially. Each insertText shifts subsequent indices. For multiple inserts at specific positions, process in REVERSE index order (highest first). For appending, use endOfSegmentLocation for each insert. Auto-correction: insertText without location/endOfSegmentLocation automatically appends to document body. INDEX BOUNDARIES: location.index must be LESS than the segment end index (valid: 1 to N-1). To insert at the end, use endOfSegmentLocation instead. PARAGRAPH BOUNDARIES: Text can only be inserted inside existing paragraphs, not at structural boundaries (e.g., a table’s start index). For table cells, add +1 or +2 to the cell’s startIndex. deleteContentRange: The range CANNOT include the trailing newline at segment end. If segment ends at N, use endIndex: N-1. deleteTableRow: Requires tableCellLocation object (NOT top-level rowIndex/tableStartLocation). Structure: { tableCellLocation: { tableStartLocation: { index: N }, rowIndex: R, columnIndex: C } }. updateTableCellStyle: Use EITHER tableStartLocation (all cells) OR tableRange (specific cells), not both. Style updates (updateParagraphStyle, updateTextStyle, updateTableCellStyle, updateDocumentStyle): The ‘fields’ parameter is auto-populated from style keys if omitted. Document title CANNOT be updated via batchUpdate - use Google Drive API instead. updateDocumentStyle valid fields: background, marginTop, marginBottom, marginLeft, marginRight, marginHeader, marginFooter, pageSize, pageNumberStart, useEvenPageHeaderFooter, useFirstPageHeaderFooter, flipPageOrientation (NOT “title”).
string
required
(Required) The unique identifier of the Google Docs document to be updated.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UPDATE_TABLE_ROW_STYLEUpdates the style of selected rows in a Google Document table, including minimum row height and overflow prevention.

Input Parameters

string
required
The ID of the document to update.
object
required
The request body for updating the table row style.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UPDATE_TAB_PROPERTIESUpdates properties of a document tab such as title, parent tab, index, and icon emoji. Use this action when you need to rename a tab, change its emoji icon, move it within the tab hierarchy, or reorganize tab structure.

Input Parameters

string
A comma-separated list of fields to update (using camelCase API names like ‘title’, ‘parentTabId’, ‘index’, ‘iconEmoji’). Use '' to automatically update only fields that have values set in tab_properties. For example: ‘title,iconEmoji’. When '' is specified, the action automatically computes the field mask from the provided tab_properties fields.
string
required
The ID of the tab to update. Get valid tab IDs from GOOGLEDOCS_GET_DOCUMENT_BY_ID at tabs[].tabProperties.tabId.
string
required
The ID of the document containing the tab to update.
object
required
The tab properties to update. Only the fields specified in the ‘fields’ parameter will be updated.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: GOOGLEDOCS_UPLOAD_DRIVE_FILEUpload a file of 5 MiB or less to Google Drive using multipart upload.

Input Parameters

object
required
File content to upload using multipart upload; maximum 5 MiB.
string
Drive filename. Defaults to the uploaded file’s name.
string
Drive partial-response field selector for the created File resource.
string
Media MIME type. Defaults to the uploaded file’s MIME type or application/octet-stream.
string
Description to store in the Drive file metadata.
string
ID of the Drive folder that should contain the uploaded file.
boolean
Whether the request supports both My Drive and shared drives.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not

Triggers

Slug: GOOGLEDOCS_DOCUMENT_CREATED_TRIGGERType: pollTriggers when a new Google Doc is created. This trigger monitors Google Docs and fires when new documents are detected. Uses timestamp filtering to efficiently poll for new documents.

Configuration

number
Periodic Interval to Check for Updates & Send a Trigger in Minutes
integer
Maximum number of documents to check in each poll (1-1000)
string
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

object
required
The newly created Google document
string
Type of event that occurred
Slug: GOOGLEDOCS_DOCUMENT_DELETED_TRIGGERType: pollTriggers when an existing Google Doc is deleted (moved to trash). This trigger monitors Google Docs and fires when documents are trashed.

Configuration

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

Payload

object
required
The deleted Google document
string
Type of event that occurred
Slug: GOOGLEDOCS_DOCUMENT_PLACEHOLDER_FILLED_TRIGGERType: pollTriggers when a Google Doc’s plain text changes such that a configured placeholder token/pattern is no longer present (i.e., the document has been filled in).This trigger monitors a specific Google Doc and fires when a placeholder pattern that was previously present is no longer found in the document’s plain text.

Configuration

boolean
Whether the placeholder pattern matching should be case-sensitive.
string
required
The unique identifier for the Google Document to monitor. Accepts either a document ID (typically a 44-character alphanumeric string) or a full Google Docs URL.
boolean
Whether to include footer text when checking for placeholders.
boolean
Whether to include footnote text when checking for placeholders.
boolean
Whether to include header text when checking for placeholders.
number
Periodic Interval to Check for Updates & Send a Trigger in Minutes
string
required
The placeholder token/pattern to monitor (e.g., ‘{{NAME}}’, ‘[FILL_ME]’, ‘TODO’). Can be a literal string or a regex pattern if use_regex is enabled.
boolean
If true, treat placeholder_pattern as a regex pattern. If false, treat it as a literal string.

Payload

object
required
The document that was filled in
string
Type of event that occurred
string
required
The placeholder pattern that is no longer present
Slug: GOOGLEDOCS_DOCUMENT_SEARCH_UPDATE_TRIGGERType: pollTriggers when a Google Doc matching a user-defined search query is newly created or updated since the last poll. This trigger uses timestamp filtering to efficiently monitor documents.

Configuration

boolean
Whether to include documents from shared drives you have access to. Defaults to True.
boolean
Whether to include documents in trash. Defaults to False.
number
Periodic Interval to Check for Updates & Send a Trigger in Minutes
integer
Maximum number of documents to check in each poll (1-100)
string
required
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’.
boolean
Whether to return only documents shared with the current user. Defaults to False.
boolean
Whether to return only starred documents. Defaults to False.

Payload

object
required
The document that was created or updated
string
required
Type of event that occurred: ‘document_created’ or ‘document_updated’
Slug: GOOGLEDOCS_DOCUMENT_STRUCTURE_CHANGED_TRIGGERType: pollTriggers when a Google Doc’s structure changes (headers/footers added/removed, tables/images count changes). This trigger monitors a specific document for structural changes like:
  • Headers added or removed
  • Footers added or removed
  • Tables added or removed
  • Images (inline objects) added or removed
  • Positioned objects added or removed
  • Footnotes added or removed

Configuration

string
required
The unique identifier for the Google Docs document to monitor. You can provide either a document ID or a full Google Docs URL.
number
Periodic Interval to Check for Updates & Send a Trigger in Minutes

Payload

array
required
List of structural changes detected
object
required
Current structural snapshot of the document
string
required
ID of the document that changed
string
required
Title of the document
string
required
URL to view the document
object
Snapshot of document structural elements.
Slug: GOOGLEDOCS_DOCUMENT_UPDATED_TRIGGERType: pollTriggers when an existing Google Doc is updated or modified. This trigger monitors Google Docs and fires when documents are updated.

Configuration

number
Periodic Interval to Check for Updates & Send a Trigger in Minutes
integer
Maximum number of documents to check in each poll (1-1000)
string
Optional search query to filter documents. Leave empty to monitor all documents.

Payload

object
required
The updated Google document
string
Type of event that occurred
Slug: GOOGLEDOCS_DOCUMENT_WORD_COUNT_THRESHOLD_TRIGGERType: pollTriggers when a Google Doc’s word/character count crosses a user-defined threshold. This trigger monitors a specific Google Doc and fires when its word or character count becomes greater than or equal to the configured threshold value.

Configuration

string
required
The unique identifier for the Google Document to monitor. 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.
number
Periodic Interval to Check for Updates & Send a Trigger in Minutes
boolean
If True, use character count instead of word count for the threshold comparison.
integer
The word count threshold. Trigger fires when the document’s word count becomes greater than or equal to this value.

Payload

integer
required
The current character count of the document
integer
required
The current word count of the document
string
required
The unique identifier of the document
string
required
The title of the document
string
Type of event that occurred
integer
required
The previous character count of the document
integer
required
The previous word count of the document
integer
required
The configured threshold value
string
required
Whether the threshold is for ‘words’ or ‘characters’
Link to view the document in browser
Slug: GOOGLEDOCS_FOLDER_CREATED_TRIGGERType: pollTriggers 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

number
Periodic Interval to Check for Updates & Send a Trigger in Minutes
integer
Maximum number of folders to check in each poll (1-1000)

Payload

string
Type of event that occurred
object
required
The newly created Google Drive folder
Slug: GOOGLEDOCS_KEYWORD_DETECTED_TRIGGERType: pollTriggers when a specific keyword or phrase first appears in a Google Doc. This trigger monitors a Google Doc and fires once when the specified keyword is detected. After the keyword is found, the trigger will not fire again until reset.

Configuration

boolean
Whether the keyword search should be case-sensitive. Set to False to ignore case when matching.
string
required
The unique identifier for the Google Document to monitor. Accepts either a document ID (typically a 44-character alphanumeric string) or a full Google Docs URL.
boolean
Whether to include footer text when searching for the keyword.
boolean
Whether to include footnote text when searching for the keyword.
boolean
Whether to include header text when searching for the keyword.
number
Periodic Interval to Check for Updates & Send a Trigger in Minutes
string
required
The keyword or phrase to detect in the document (case-sensitive). The trigger will fire when this text first appears anywhere in the document’s plain text.

Payload

string
required
The ID of the document
string
required
The title of the document
string
required
Web view link to the document in Google Docs
string
Type of event that occurred
string
required
The keyword that was detected
string
required
A short excerpt of the document text around the keyword (max 500 chars)
Slug: GOOGLEDOCS_PAGE_ADDED_TRIGGERType: pollTriggers when a new Google Doc is added/created. This trigger monitors Google Docs and fires when new documents are detected.

Configuration

number
Periodic Interval to Check for Updates & Send a Trigger in Minutes
integer
Maximum number of documents to check in each poll (1-1000)
string
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

object
required
The newly added Google document
string
Type of event that occurred