Google Workspace: Insert text at a specific index

Insert text at a specific index.

Help Centre › Functions & Formulas

Insert text at a specific index.

Add it to a process

In the process designer, open the Add step tab. Find Insert text at a specific index under Google Workspace › Docs, or type its name in the search box, and drag it onto the canvas.

Fields

FieldRequiredWhat it does
ValueYesThe text to insert
IndexNoCharacter position in the document to insert at (1 = beginning) Default: 1.

See all Google Workspace steps.

Tips

  • Use Get content to find the correct index positions before inserting
  • Index 1 inserts at the very beginning of the document body
  • Use \n for line breaks within the text

Related functions

  • Append text – Add text to the end
  • Delete content – Remove text at a position
  • Replace text – Find and replace text

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.