Help Centre › Functions & Formulas
This article describes the RPA Google Workspace connector function to protect a range from editing.
For a full list of available functions, please read GOOGLE WORKSPACE functions.
Description
The Protect range function adds protection to a specified range, preventing other users from editing the cells. Only the owner and specified editors can modify protected cells.
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Connector | Yes | Select | - | Select the Google Workspace connector to use |
| Spreadsheet ID | Yes | Text | - | Google Sheets spreadsheet ID |
| Sheet ID | Yes | Text | - | Numeric sheet ID |
| Range | Yes | Text | - | A1 notation range to protect |
| Description | No | Text | - | Description for the protected range |
| Warning only | No | Boolean | false | If true, show a warning instead of blocking edits |
| Variable | Yes | Text | - | Variable to store the result |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Object | Object containing protectedRangeId |
Errors
- Sheet not found – no sheet exists with the given ID
- Insufficient permissions – you do not have permission to protect ranges
Tips
- Use Warning only mode to alert users without blocking edits
- Store the protectedRangeId to unprotect later
Related functions
- Unprotect range – Remove protection from a range