Google Docs Batch Update icon

Google Docs Batch Update

Build and send Google Docs batch update requests

Create Document Request → Insert Person

AI-generated

Summary

Inserts a person into a Google Doc at a specified location

Inputs

  • Name (required) — The name of the person to insert
  • Email (required) — The email address of the person to insert
  • insertionLocation (required) — The location type for insertion ("location" or "endOfSegmentLocation")
  • index (required) — Zero‑based index in UTF‑16 code units relative to the start of the segment; required when insertionLocation is "location"
  • additionalLocationFields — Additional fields for end‑of‑segment location (e.g., segmentId, tabId)

Output shape

a single Document resource

The updated document is returned; fields may be partially populated.

Examples

Example 1: Insert a person at the end of the document

Name: John Doe; Email: john@example.com; insertionLocation: endOfSegmentLocation; index: null; additionalLocationFields: {}

Example 2: Insert a person at a specific segment with index

Name: Jane Smith; Email: jane@example.com; insertionLocation: location; index: 0; additionalLocationFields: {segmentId: "body", tabId: ""}

Example 3: Insert a person into a header

Name: Bob Lee; Email: bob@example.com; insertionLocation: location; index: 5; additionalLocationFields: {segmentId: "header", tabId: "headerTab"}

Links

Discussion