googledocs.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
Documents
copyDocument
documents.copyDocument
Copy an existing Google Doc
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | — |
name | string | No | — |
parents | string[] | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | — |
name | string | No | — |
mimeType | string | No | — |
parents | string[] | No | — |
trashed | boolean | No | — |
createdTime | string | No | — |
modifiedTime | string | No | — |
webViewLink | string | No | — |
size | string | No | — |
owners | any[] | No | — |
createBlankDocument
documents.createBlankDocument
Create a blank Google Doc [DEPRECATED: prefer documents.createDocument]
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
title | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
title | string | No | — |
revisionId | string | No | — |
body | any | No | — |
headers | any | No | — |
footers | any | No | — |
footnotes | any | No | — |
inlineObjects | any | No | — |
positionedObjects | any | No | — |
namedRanges | any | No | — |
lists | any | No | — |
documentStyle | any | No | — |
suggestionsViewMode | string | No | — |
createDocument
documents.createDocument
Create a Google Doc with an optional title and initial text
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
title | string | Yes | — |
text | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
title | string | No | — |
revisionId | string | No | — |
body | any | No | — |
headers | any | No | — |
footers | any | No | — |
footnotes | any | No | — |
inlineObjects | any | No | — |
positionedObjects | any | No | — |
namedRanges | any | No | — |
lists | any | No | — |
documentStyle | any | No | — |
suggestionsViewMode | string | No | — |
createDocumentMarkdown
documents.createDocumentMarkdown
Create a Google Doc initialized from Markdown text
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
title | string | No | — |
markdown | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
title | string | No | — |
revisionId | string | No | — |
body | any | No | — |
headers | any | No | — |
footers | any | No | — |
footnotes | any | No | — |
inlineObjects | any | No | — |
positionedObjects | any | No | — |
namedRanges | any | No | — |
lists | any | No | — |
documentStyle | any | No | — |
suggestionsViewMode | string | No | — |
exportDocumentAsPdf
documents.exportDocumentAsPdf
Export a Google Doc as PDF (Drive enforces a 10MB limit)
Risk: read
| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | — |
mimeType | string | Yes | — |
data | string | Yes | — |
getDocument
documents.getDocument
Retrieve a Google Doc by id
Risk: read
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
title | string | No | — |
revisionId | string | No | — |
body | any | No | — |
headers | any | No | — |
footers | any | No | — |
footnotes | any | No | — |
inlineObjects | any | No | — |
positionedObjects | any | No | — |
namedRanges | any | No | — |
lists | any | No | — |
documentStyle | any | No | — |
suggestionsViewMode | string | No | — |
getDocumentPlaintext
documents.getDocumentPlaintext
Retrieve a Google Doc as best-effort plain text
Risk: read
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
title | string | No | — |
text | string | Yes | — |
wordCount | number | Yes | — |
listSpreadsheetCharts
documents.listSpreadsheetCharts
List charts in a Google Sheets spreadsheet for embedding
Risk: read
| Name | Type | Required | Description |
|---|---|---|---|
spreadsheetId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
spreadsheetId | string | No | — |
sheets | any[] | No | — |
searchDocuments
documents.searchDocuments
Search Google Docs by name, content, or date filters
Risk: read
| Name | Type | Required | Description |
|---|---|---|---|
q | string | No | — |
pageSize | number | No | — |
pageToken | string | No | — |
orderBy | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
kind | string | No | — |
nextPageToken | string | No | — |
incompleteSearch | boolean | No | — |
files | object[] | No | — |
files full type
files full type
updateDocumentBatch
documents.updateDocumentBatch
Apply batchUpdate edits [DEPRECATED: prefer documents.updateExistingDocument]
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
requests | object[] | Yes | — |
writeControl | object | No | — |
requests full type
requests full type
writeControl full type
writeControl full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
updateDocumentMarkdown
documents.updateDocumentMarkdown
Replace a Google Doc content with Markdown text
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
markdown | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
updateDocumentSectionMarkdown
documents.updateDocumentSectionMarkdown
Replace a section of a Google Doc with Markdown text
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
markdown | string | Yes | — |
startIndex | number | Yes | — |
endIndex | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
updateDocumentStyle
documents.updateDocumentStyle
Update the page size, margins, and global document style
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
documentStyle | object | Yes | — |
fields | string | Yes | — |
documentStyle full type
documentStyle full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
updateExistingDocument
documents.updateExistingDocument
Apply batchUpdate edits (insert/delete/format) to a Google Doc
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
requests | object[] | Yes | — |
writeControl | object | No | — |
requests full type
requests full type
writeControl full type
writeControl full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
Structure
createFooter
structure.createFooter
Create a footer
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
type | DEFAULT | FIRST_PAGE | EVEN_PAGE | No | — |
sectionBreakLocation | object | No | — |
sectionBreakLocation full type
sectionBreakLocation full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
createFootnote
structure.createFootnote
Create a footnote
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
location | object | No | — |
endOfSegmentLocation | object | No | — |
location full type
location full type
endOfSegmentLocation full type
endOfSegmentLocation full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
createHeader
structure.createHeader
Create a header
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
type | DEFAULT | FIRST_PAGE | EVEN_PAGE | No | — |
sectionBreakLocation | object | No | — |
sectionBreakLocation full type
sectionBreakLocation full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
createNamedRange
structure.createNamedRange
Create a named range
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
name | string | Yes | — |
startIndex | number | Yes | — |
endIndex | number | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
createParagraphBullets
structure.createParagraphBullets
Add bullets to a range of paragraphs
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
startIndex | number | Yes | — |
endIndex | number | Yes | — |
bulletPreset | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
deleteFooter
structure.deleteFooter
Delete a footer
Risk: destructive
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
footerId | string | Yes | — |
type | DEFAULT | FIRST_PAGE | EVEN_PAGE | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
deleteHeader
structure.deleteHeader
Delete a header
Risk: destructive
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
headerId | string | Yes | — |
type | DEFAULT | FIRST_PAGE | EVEN_PAGE | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
deleteNamedRange
structure.deleteNamedRange
Delete a named range by id or name
Risk: destructive
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
namedRangeId | string | No | — |
name | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
deleteParagraphBullets
structure.deleteParagraphBullets
Remove bullets from a range of paragraphs
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
startIndex | number | Yes | — |
endIndex | number | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
Tables
deleteTableColumn
tables.deleteTableColumn
Delete a column from a table
Risk: destructive
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
tableCellLocation | object | Yes | — |
tableCellLocation full type
tableCellLocation full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
deleteTableRow
tables.deleteTableRow
Delete a row from a table
Risk: destructive
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
tableCellLocation | object | Yes | — |
tableCellLocation full type
tableCellLocation full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
insertTable
tables.insertTable
Insert a table into a Google Doc
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
rows | number | Yes | — |
columns | number | Yes | — |
insertionIndex | number | No | — |
appendToEnd | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
insertTableColumn
tables.insertTableColumn
Insert a column into a table
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
tableCellLocation | object | Yes | — |
insertRight | boolean | No | — |
tableCellLocation full type
tableCellLocation full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
unmergeTableCells
tables.unmergeTableCells
Unmerge previously merged table cells
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
tableRange | object | Yes | — |
tableRange full type
tableRange full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
updateTableRowStyle
tables.updateTableRowStyle
Update the style of table rows
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
tableStartLocation | object | Yes | — |
rowIndices | number[] | Yes | — |
tableRowStyle | object | No | — |
fields | string | No | — |
tableStartLocation full type
tableStartLocation full type
tableRowStyle full type
tableRowStyle full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
Text
deleteContentRange
text.deleteContentRange
Delete a content range from a Google Doc
Risk: destructive
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
startIndex | number | Yes | — |
endIndex | number | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
insertInlineImage
text.insertInlineImage
Insert an inline image from a URI into a Google Doc
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
uri | string | Yes | — |
insertionIndex | number | No | — |
appendToEnd | boolean | No | — |
size | object | No | — |
size full type
size full type
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
insertPageBreak
text.insertPageBreak
Start a new page at a location in a Google Doc
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
insertionIndex | number | No | — |
appendToEnd | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
insertText
text.insertText
Insert text at a location or append to the end of a Google Doc
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
text | string | Yes | — |
insertionIndex | number | No | — |
appendToEnd | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
replaceAllText
text.replaceAllText
Replace all occurrences of a string in a Google Doc
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
find | string | Yes | — |
replace | string | Yes | — |
matchCase | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type
replaceImage
text.replaceImage
Replace an existing image in a Google Doc
Risk: write
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | Yes | — |
imageObjectId | string | Yes | — |
uri | string | Yes | — |
imageReplaceMethod | CENTER_CROP | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
documentId | string | No | — |
replies | object[] | No | — |
writeControl | object | No | — |
replies full type
replies full type
writeControl full type
writeControl full type