← Back to all apps

Google Docs

Productivityby OpenAI

Google Docs connector with document reads, raw batch updates, and export actions.

11ChatGPT Tools
OpenAIDeveloper
ProductivityCategory

Available Tools

Append Markdown

append_markdown
Full Description

Append markdown content to the end of a document as rich text.

Parameters (2 required)
Required
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... . Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

markdownstring

Markdown content to append. Supports headings, bold/italic, inline links, lists, and tables.

Append Text

append_text
Full Description

Append text to the end of the document. Markdown is not supported. Use update_text_style to style the text.

Parameters (2 required)
Required
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... . Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

textstring

Plain text to append at the end of the document. For markdown formatting, use append_markdown.

Batch Update

batch_update
Full Description

Apply raw Google Docs batchUpdate requests to a document.

If editing a document created earlier in the turn, wait for the create action to return successfully before calling this action. Use only the document ID or URL returned by that earlier action.

Parameters (1 required, 3 optional)
Required
requestsarray

Raw Google Docs API documents.batchUpdate request objects. Each list item must set exactly one request type key such as insertText, updateTextStyle, replaceAllText, deleteContentRange, or addDocumentTab. Send each request as a structured object in the list, not as a JSON string or other stringified input. Requests execute in order.

Optional
document_idstring

Raw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.

Default: null
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

Default: null
write_control

Optional writeControl object for the underlying Google Docs API batch update call.

Default: null

Create Document

create_document
Full Description

Create a new Google Doc with the given title.

This creation flow is eventually consistent. Do not mention or synthesize a Google Docs URL until this action returns, and then use only the document URL returned in the response.

Parameters (1 required)
Required
titlestring

Title for the new document. This action accepts only `title`.

Export

export
Full Description

Export a Google Doc to the requested MIME type.

Parameters (0 required, 3 optional)
Optional
document_idstring

Raw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.

Default: null
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

Default: null
mime_typestring

Export MIME type, including, but not limited to: application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/markdown, text/plain, text/csv

Default: application/pdf

Find Text Range

find_text_range
Full Description

Find the index range of an exact text match in a Google Doc.

Parameters (1 required, 4 optional)
Required
text_to_findstring

Exact document text to match. Prefer this over raw indexes when possible.

Optional
document_idstring

Raw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.

Default: null
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

Default: null
instanceinteger

1-based occurrence number when target_text appears multiple times.

Default: 1
tab_idstring

Optional Google Docs tab ID. Use this to target a specific tab in a tabbed document.

Default: null

Get Document

get_document
Full Description

Get the full Google Doc, including tab content when present.

Parameters (0 required, 3 optional)
Optional
document_idstring

Raw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.

Default: null
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

Default: null
include_tabs_contentboolean

If true, include content across all tabs in the response tabs field.

Default: False

Get Document Comments

get_document_comments
Full Description

Read user comments and replies on a Google Doc for additional review context.

Parameters (0 required, 5 optional)
Optional
document_idstring

Raw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.

Default: null
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

Default: null
include_deletedboolean

When true, include deleted comments and deleted replies in the result.

Default: False
page_sizeinteger

Maximum comment threads to return on this page. Use the response nextPageToken to continue.

Default: 100
page_tokenstring

Opaque nextPageToken from a previous get_document_comments response.

Default: null

Get Document Text

get_document_text
Full Description

Return paragraph text with document indexes for a Google Doc.

Parameters (0 required, 3 optional)
Optional
document_idstring

Raw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.

Default: null
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

Default: null
tab_idstring

Optional Google Docs tab ID. Use this to target a specific tab in a tabbed document.

Default: null

Get Paragraph Range

get_paragraph_range
Full Description

Resolve the paragraph range containing a given document index.

Parameters (1 required, 3 optional)
Required
index_withininteger

A Google Docs document index that falls within the paragraph you want to resolve.

Optional
document_idstring

Raw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.

Default: null
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

Default: null
tab_idstring

Optional Google Docs tab ID. Use this to target a specific tab in a tabbed document.

Default: null

Get Profile

get_profile
Full Description

Return the connected Google account profile.

Get Tables

get_tables
Full Description

Return table structures and cell text from a Google Doc.

Parameters (0 required, 3 optional)
Optional
document_idstring

Raw Google Docs document ID only (for example `1abcDEF...`). Use this when you already have the ID from a prior search result. Do not pass a full URL here.

Default: null
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... or a raw Google Docs document ID. If you only know the document title or title keywords, call `search_documents` first instead of asking the user for a URL. Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

Default: null
tab_idstring

Optional Google Docs tab ID. Use this to target a specific tab in a tabbed document.

Default: null

Insert Image

insert_image
Parameters (3 required)
Required
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... . Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

image_urlstring

Publicly reachable image URL starting with http:// or https://. The URL must be fetchable by Google Docs.

indexinteger

Index to insert the image at. Must be within segment bounds and less than segment endIndex. Use null to append at document end.

Insert Text

insert_text
Full Description

Insert text at a specific index in the document. Markdown is not supported. Use update_text_style to style the text.

Parameters (3 required)
Required
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... . Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

indexinteger

Insertion index in Docs structural indices. Must be within the segment and strictly less than segment endIndex. For writing at document end, use append_text.

textstring

Plain text to insert. Markdown is not parsed by this tool.

Replace Text

replace_text
Parameters (3 required)
Required
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... . Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

replace_textstring

Replacement text.

search_textstring

Exact text to find (case-sensitive).

Search Documents

search_documents
Full Description

Search Google Drive for Google Docs documents by title before reading or editing.

Parameters (1 required, 2 optional)
Required
querystring

Keyword query for finding a Google Doc in Drive. Use the document title or short title keywords, not a long natural-language instruction.

Optional
require_viewed_by_userboolean

When true, keep only documents viewed by the authenticated user.

Default: False
topninteger

Maximum documents to return. Parameter name is `topn`.

Default: 10

Update Text Style

update_text_style
Full Description

Update text style for the given range.

At least one style field must be set (bold/italic/underline/font_size/link_url/ background_color/foreground_color). If all style fields are null, the request fails.

Parameters (3 required, 7 optional)
Required
document_urlstring

Google Docs URL in the format https://docs.google.com/document/d/<DOCUMENT_ID>/... . Do not pass document titles, Drive open?id links, app:// URLs, or /document/create.

end_indexinteger

End index of the style range (exclusive). Must be within segment bounds and greater than start_index.

start_indexinteger

Start index of the style range (inclusive). Must be within segment bounds and less than end_index.

Optional
background_colorarray
Default: null
boldboolean
Default: null
font_sizeinteger
Default: null
foreground_colorarray
Default: null
italicboolean
Default: null
link_urlstring
Default: null
underlineboolean
Default: null