Google Docs Batch Update icon

Google Docs Batch Update

Build and send Google Docs batch update requests

Create Tabs Request → Add Document Tab

AI-generated

Summary

Adds a new tab to a Google Doc using a batch update request.

Inputs

  • tabId (required) — The ID of the tab to create.
  • title (required) — The title of the tab.
  • index (required) — The zero-based index where the tab should be inserted.
  • parentTabId — The ID of the parent tab. If not set, the tab will be a top-level tab.
  • iconEmoji — The emoji icon for the tab.

Output shape

A list of items containing the original input data plus a status field.

The operation uses Google Docs' batch update API to queue the tab creation. It does not return the tab's new ID or metadata directly; the tab appears in the document after execution.

Examples

Example 1: Create a new top-level tab named 'Notes' at the start of the document.

tabId: 'tab-1', title: 'Notes', index: 0

Example 2: Add a child tab 'Project Files' to an existing parent tab.

tabId: 'tab-2', title: 'Project Files', index: 1, parentTabId: 'parent-tab-abc'

Links

Discussion