Google Docs Batch Update icon

Google Docs Batch Update

Build and send Google Docs batch update requests

Create Tables Request → Insert Table Row

AI-generated

Summary

Inserts a new row into a specific Google Docs table cell.

Inputs

  • index (required) — The zero-based index, in UTF-16 code units, relative to the beginning of the segment specified by segmentId.
  • additionalLocationFields — A collection of fields to specify the location within the document (e.g., tabId, segmentId).
  • rowIndex — The row index to insert at. Defaults to 0.
  • insertBelow — Whether to insert the new row below the reference cell location. Defaults to true.

Output shape

a single record

The operation returns the document ID or a success message, depending on the specific implementation details of the batch update request.

Examples

Example 1: Insert a row at the top of a table in the first tab

Set index to 0, rowIndex to 0, and omit tabId to use the default first tab.

Example 2: Insert a row below a specific header cell

Set index to the header's location, rowIndex to the desired position, and insertBelow to true.

Links

Discussion