Google Docs
Objects
Every object and enum the Google Docs tools accept.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Every object and enum the Google Docs tools accept.
| Field | Type | Description |
|---|---|---|
title | string | The title of the new document. This is the only field documents.create honours; the document is created empty. |
| Field | Type | Description |
|---|---|---|
requests * | Request[] | The edits to apply, in order. Each entry sets exactly one kind of request. Note that edits are applied sequentially and indices shift as they are: when inserting several pieces of text by index, order the requests back-to-front so that earlier insertions do not move the positions later ones refer to. |
writeControl | WriteControl | Optional concurrency control. Set requiredRevisionId to refuse the write if the document has changed since it was read. |
| Field | Type | Description |
|---|---|---|
replaceAllText | ReplaceAllTextRequest | Replaces all instances of the specified text. |
insertText | InsertTextRequest | Inserts text at the specified location. |
updateTextStyle | UpdateTextStyleRequest | Updates the text style at the specified range. |
createParagraphBullets | CreateParagraphBulletsRequest | Creates bullets for paragraphs. |
deleteParagraphBullets | DeleteParagraphBulletsRequest | Deletes bullets from paragraphs. |
createNamedRange | CreateNamedRangeRequest | Creates a named range. |
deleteNamedRange | DeleteNamedRangeRequest | Deletes a named range. |
updateParagraphStyle | UpdateParagraphStyleRequest | Updates the paragraph style at the specified range. |
deleteContentRange | DeleteContentRangeRequest | Deletes content from the document. |
insertInlineImage | InsertInlineImageRequest | Inserts an inline image at the specified location. |
insertTable | InsertTableRequest | Inserts a table at the specified location. |
insertTableRow | InsertTableRowRequest | Inserts an empty row into a table. |
insertTableColumn | InsertTableColumnRequest | Inserts an empty column into a table. |
deleteTableRow | DeleteTableRowRequest | Deletes a row from a table. |
deleteTableColumn | DeleteTableColumnRequest | Deletes a column from a table. |
insertPageBreak | InsertPageBreakRequest | Inserts a page break at the specified location. |
deletePositionedObject | DeletePositionedObjectRequest | Deletes a positioned object from the document. |
updateTableColumnProperties | UpdateTableColumnPropertiesRequest | Updates the properties of columns in a table. |
updateTableCellStyle | UpdateTableCellStyleRequest | Updates the style of table cells. |
updateTableRowStyle | UpdateTableRowStyleRequest | Updates the row style in a table. |
replaceImage | ReplaceImageRequest | Replaces an image in the document. |
updateDocumentStyle | UpdateDocumentStyleRequest | Updates the style of the document. |
mergeTableCells | MergeTableCellsRequest | Merges cells in a table. |
unmergeTableCells | UnmergeTableCellsRequest | Unmerges cells in a table. |
createHeader | CreateHeaderRequest | Creates a header. |
createFooter | CreateFooterRequest | Creates a footer. |
createFootnote | CreateFootnoteRequest | Creates a footnote. |
replaceNamedRangeContent | ReplaceNamedRangeContentRequest | Replaces the content in a named range. |
updateSectionStyle | UpdateSectionStyleRequest | Updates the section style of the specified range. |
insertSectionBreak | InsertSectionBreakRequest | Inserts a section break at the specified location. |
deleteHeader | DeleteHeaderRequest | Deletes a header from the document. |
deleteFooter | DeleteFooterRequest | Deletes a footer from the document. |
pinTableHeaderRows | PinTableHeaderRowsRequest | Updates the number of pinned header rows in a table. |
| Field | Type | Description |
|---|---|---|
replaceText * | string | The text that will replace the matched text. |
tabsCriteria | TabsCriteria | Optional. The criteria used to specify in which tabs the replacement occurs. |
containsText * | SubstringMatchCriteria | Finds text in the document matching this substring criteria. |
| Field | Type | Description |
|---|---|---|
tabIds | string[] | The list of tab IDs in which the request executes. |
| Field | Type | Description |
|---|---|---|
text * | string | The text to search for in the document. |
matchCase | boolean | Indicates whether the search should respect case. |
searchByRegex | boolean | True if the find value should be treated as a regular expression. |
| Field | Type | Description |
|---|---|---|
text * | string | The text to be inserted. |
location | Location | Inserts the text at a specific index in the document. |
endOfSegmentLocation | EndOfSegmentLocation | Inserts the text at the end of a header, footer, footnote or the document body. |
| Field | Type | Description |
|---|---|---|
segmentId | string | The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document’s body. |
index | integer | The zero-based index, in UTF-16 code units relative to the beginning of the segment. |
tabId | string | The tab that the location is in. When omitted, the request is applied to the first tab. |
| Field | Type | Description |
|---|---|---|
segmentId | string | The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document’s body. |
tabId | string | The tab that the location is in. When omitted, the request is applied to the first tab. |
| Field | Type | Description |
|---|---|---|
bold | boolean | Whether the text is bold. |
italic | boolean | Whether the text is italic. |
underline | boolean | Whether the text is underlined. |
| Field | Type | Description |
|---|---|---|
startIndex | integer | The start index of the range, in UTF-16 code units. |
endIndex | integer | The end index of the range, in UTF-16 code units. |
segmentId | string | The ID of the header, footer or footnote the range is in. An empty segment ID signifies the document’s body. |
| Field | Type | Description |
|---|---|---|
range * | Range | The range to apply the bullet preset to. |
bulletPreset * | BulletGlyphPreset | The kinds of bullet glyphs to be used. |
| Field | Type | Description |
|---|---|---|
range * | Range | The range to delete bullets from. |
| Field | Type | Description |
|---|---|---|
name * | string | The name of the NamedRange. |
range * | Range | The range to apply the name to. |
| Field | Type | Description |
|---|---|---|
tabsCriteria | TabsCriteria | Optional. The criteria used to specify which tab(s) the range deletion should occur in. |
namedRangeId | string | The ID of the named range to delete. |
name | string | The name of the range(s) to delete. |
| Field | Type | Description |
|---|---|---|
paragraphStyle * | ParagraphStyle | The styles to set on the paragraphs. |
fields * | string | The fields that should be updated. |
range * | Range | The range overlapping the paragraphs to style. |
| Field | Type | Description |
|---|---|---|
alignment | string | The text alignment for this paragraph. |
| Field | Type | Description |
|---|---|---|
range * | Range | The range of content to delete. |
| Field | Type | Description |
|---|---|---|
uri * | string | The image URI. |
objectSize | Size | The size that the image should appear as in the document. |
location | Location | Inserts the image at a specific index in the document. |
endOfSegmentLocation | EndOfSegmentLocation | Inserts the image at the end of a header, footer, footnote or the document body. |
| Field | Type | Description |
|---|---|---|
width | number | Width in points. |
height | number | Height in points. |
| Field | Type | Description |
|---|---|---|
rows * | integer | The number of rows in the table. |
columns * | integer | The number of columns in the table. |
location | Location | Inserts the table at a specific index in the document. |
endOfSegmentLocation | EndOfSegmentLocation | Inserts the table at the end of a header, footer, footnote or the document body. |
| Field | Type | Description |
|---|---|---|
tableCellLocation * | TableCellLocation | The reference table cell location from which rows will be inserted. |
insertBelow * | boolean | Whether to insert new row below the reference cell location. |
| Field | Type | Description |
|---|---|---|
tableStartLocation * | Location | The location where the table starts in the document. |
rowIndex * | integer | The zero-based row index. |
columnIndex * | integer | The zero-based column index. |
| Field | Type | Description |
|---|---|---|
tableCellLocation * | TableCellLocation | The reference table cell location from which columns will be inserted. |
insertRight * | boolean | Whether to insert new column to the right of the reference cell location. |
| Field | Type | Description |
|---|---|---|
tableCellLocation * | TableCellLocation | The reference table cell location from which the row will be deleted. |
| Field | Type | Description |
|---|---|---|
tableCellLocation * | TableCellLocation | The reference table cell location from which the column will be deleted. |
| Field | Type | Description |
|---|---|---|
location | Location | Inserts the page break at a specific index in the document. |
endOfSegmentLocation | EndOfSegmentLocation | Inserts the page break at the end of the document body. |
| Field | Type | Description |
|---|---|---|
objectId * | string | The ID of the positioned object to delete. |
tabId | string | The tab that the positioned object to delete is in. |
| Field | Type | Description |
|---|---|---|
tableStartLocation * | Location | The location where the table starts in the document. |
columnIndices | integer[] | The list of zero-based column indices whose property should be updated. If no indices are specified, all columns will be updated. |
tableColumnProperties * | TableColumnProperties | The table column properties to update. |
fields * | string | The fields that should be updated. |
| Field | Type | Description |
|---|---|---|
width | number | Column width in points. |
| Field | Type | Description |
|---|---|---|
tableCellStyle * | TableCellStyle | The style to set on the table cells. |
fields * | string | The fields that should be updated. |
tableRange | TableRange | The table range representing the subset of the table to which the updates are applied. |
tableStartLocation | Location | The location where the table starts in the document. |
| Field | Type | Description |
|---|---|---|
backgroundColor | string | Background color as a hex string. |
| Field | Type | Description |
|---|---|---|
tableCellLocation * | TableCellLocation | The cell location where the table range starts. |
rowSpan * | integer | The row span of the table range. |
columnSpan * | integer | The column span of the table range. |
| Field | Type | Description |
|---|---|---|
tableStartLocation * | Location | The location where the table starts in the document. |
rowIndices | integer[] | The list of zero-based row indices whose style should be updated. If no indices are specified, all rows will be updated. |
tableRowStyle * | TableRowStyle | The styles to be set on the rows. |
fields * | string | The fields that should be updated. |
| Field | Type | Description |
|---|---|---|
minRowHeight | number | Minimum row height in points. |
| Field | Type | Description |
|---|---|---|
imageObjectId * | string | The ID of the existing image that will be replaced. |
uri * | string | The URI of the new image. |
imageReplaceMethod | ImageReplaceMethod | Optional. The replacement method. |
tabId | string | The tab that the image to be replaced is in. |
| Field | Type | Description |
|---|---|---|
documentStyle * | DocumentStyle | The styles to set on the document. |
fields * | string | The fields that should be updated. |
tabId | string | The tab that contains the style to update. |
| Field | Type | Description |
|---|---|---|
background | string | Background color as a hex string. |
| Field | Type | Description |
|---|---|---|
tableRange * | TableRange | The table range specifying which cells of the table to merge. |
| Field | Type | Description |
|---|---|---|
tableRange * | TableRange | The table range specifying which cells of the table to unmerge. |
| Field | Type | Description |
|---|---|---|
type * | HeaderFooterType | The type of header to create. |
sectionBreakLocation | Location | The location of the SectionBreak which begins the section this header should belong to. |
| Field | Type | Description |
|---|---|---|
type * | HeaderFooterType | The type of footer to create. |
sectionBreakLocation | Location | The location of the SectionBreak immediately preceding the section whose SectionStyle this footer should belong to. |
| Field | Type | Description |
|---|---|---|
location | Location | Inserts the footnote reference at a specific index in the document. |
endOfSegmentLocation | EndOfSegmentLocation | Inserts the footnote reference at the end of the document body. |
| Field | Type | Description |
|---|---|---|
tabsCriteria | TabsCriteria | Optional. The criteria used to specify in which tabs the replacement occurs. |
text * | string | Replaces the content of the specified named range(s) with the given text. |
namedRangeId | string | The ID of the named range whose content will be replaced. |
namedRangeName | string | The name of the NamedRanges whose content will be replaced. |
| Field | Type | Description |
|---|---|---|
range * | Range | The range overlapping the sections to style. |
sectionStyle * | SectionStyle | The styles to be set on the section. |
fields * | string | The fields that should be updated. |
| Field | Type | Description |
|---|---|---|
marginLeft | number | Left margin in points. |
| Field | Type | Description |
|---|---|---|
sectionType * | SectionType | The type of section to insert. |
location | Location | Inserts a newline and a section break at a specific index in the document. |
endOfSegmentLocation | EndOfSegmentLocation | Inserts a newline and a section break at the end of the document body. |
| Field | Type | Description |
|---|---|---|
headerId * | string | The id of the header to delete. |
tabId | string | The tab containing the header to delete. |
| Field | Type | Description |
|---|---|---|
footerId * | string | The id of the footer to delete. |
tabId | string | The tab that contains the footer to delete. |
| Field | Type | Description |
|---|---|---|
tableStartLocation * | Location | The location where the table starts in the document. |
pinnedHeaderRowsCount * | integer | The number of table rows to pin, where 0 implies that all rows are unpinned. |
| Field | Type | Description |
|---|---|---|
requiredRevisionId | string | The revision ID the write is applied to. If this is not the latest revision of the document, the request is not processed and returns a 400. Obtain it from revisionId on a document you fetched. |
targetRevisionId | string | The target revision ID. The request is applied to the latest revision, with any changes made since the target revision transformed onto it rather than rejected. Mutually exclusive with requiredRevisionId. |
| Value |
|---|
DEFAULT_FOR_CURRENT_ACCESS |
SUGGESTIONS_INLINE |
PREVIEW_SUGGESTIONS_ACCEPTED |
PREVIEW_WITHOUT_SUGGESTIONS |
| Value |
|---|
ARROW |
ARROW3D |
CHECKBOX |
CIRCLE |
DIAMOND |
DIAMONDX |
HOLLOWDIAMOND |
DISC |
SQUARE |
STAR |
ALPHA |
UPPERALPHA |
DECIMAL |
ZERODECIMAL |
ROMAN |
UPPERROMAN |
LEFTTRIANGLE |
BULLET_GLYPH_PRESET_UNSPECIFIED |
BULLET_DISC_CIRCLE_SQUARE |
BULLET_DIAMONDX_ARROW3D_SQUARE |
BULLET_CHECKBOX |
BULLET_ARROW_DIAMOND_DISC |
BULLET_STAR_CIRCLE_SQUARE |
BULLET_ARROW3D_CIRCLE_SQUARE |
BULLET_LEFTTRIANGLE_DIAMOND_DISC |
BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE |
BULLET_DIAMOND_CIRCLE_SQUARE |
NUMBERED_DECIMAL_ALPHA_ROMAN |
NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS |
NUMBERED_DECIMAL_NESTED |
NUMBERED_UPPERALPHA_ALPHA_ROMAN |
NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL |
NUMBERED_ZERODECIMAL_ALPHA_ROMAN |
| Value |
|---|
IMAGE_REPLACE_METHOD_UNSPECIFIED |
CENTER_CROP |
| Value |
|---|
HEADER_FOOTER_TYPE_UNSPECIFIED |
DEFAULT |
| Value |
|---|
SECTION_TYPE_UNSPECIFIED |
CONTINUOUS |
NEXT_PAGE |
NEXT_COLUMN |
Was this page helpful?