Help Centre › Functions & Formulas
This article describes the RPA Google Workspace connector function to update text styling in a Google Docs document.
For a full list of available functions, please read GOOGLE WORKSPACE functions.
Description
The Update text style function applies text formatting to a range of content in a Google Docs document. Supports bold, italic, underline, strikethrough, font family, font size, and foreground/background colour.
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 the text range |
| End index | Yes | Number | - | End index of the text range |
| Style | Yes | Text | - | JSON object with style properties (bold, italic, underline, fontSize, fontFamily, foregroundColor) |
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 indices for the text you want to style
- Colors use RGB values between 0 and 1
- Combine with Update paragraph style for full formatting control
Related functions
- Update paragraph style – Change paragraph alignment and spacing
- Get content – Get document indices