Help Centre › Functions & 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
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Connector | Yes | Select | - | Select the Google Workspace connector to use |
| Document ID | Yes | Text | - | Google Docs document ID |
| Index | Yes | Number | - | The zero-based character index position to insert at |
| Text | Yes | Textarea | - | 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