GOOGLE WORKSPACE Insert text function

The GOOGLE WORKSPACE Insert text (Docs) function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Google Workspace connector function to insert text at a specified position in a Google Docs document.

For a full list of available functions, please read GOOGLE WORKSPACE functions.


Description

The Insert text function inserts text at a specified index position in a Google Docs document. Existing content after the index is shifted to make room for the new text.


Input parameters

ParameterRequiredTypeDefaultDescription
ConnectorYesSelect-Select the Google Workspace connector to use
Document IDYesText-Google Docs document ID
IndexYesNumber-The zero-based character index position to insert at
TextYesTextarea-The text to insert

Errors

  • Document not found – the document ID is invalid or you lack access
  • Invalid index – the index is outside the document bounds

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

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.