Help Centre › Functions & Formulas
This article describes the RPA Google Workspace connector function to delete content from a Google Docs document.
For a full list of available functions, please read GOOGLE WORKSPACE functions.
Description
The Delete content function removes content between two index positions in a Google Docs document. Content after the deleted range is shifted to fill the gap.
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 |
| Start index | Yes | Number | - | Start index of content to delete (inclusive) |
| End index | Yes | Number | - | End index of content to delete (exclusive) |
Errors
- Document not found – the document ID is invalid or you lack access
- Invalid range – the start or end index is outside the document bounds
Tips
- Use Get content to find the correct start and end indices
- When deleting multiple sections, delete from end to start to avoid index shifts
Related functions
- Insert text – Insert text at a position
- Replace text – Replace specific text