Help Centre › Functions & Formulas
This article describes the RPA Google Workspace connector function to create an embedded chart.
For a full list of available functions, please read GOOGLE WORKSPACE functions.
Description
The Create chart function creates an embedded chart in a Google Sheets spreadsheet. Supports bar, line, pie, area, scatter, and other chart types based on data in a specified range.
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 |
| Data range | Yes | Text | - | A1 notation range of the chart data (e.g. A1:C10) |
| Chart type | Yes | Select | BAR | Chart type: BAR, LINE, PIE, AREA, SCATTER, COLUMN, COMBO |
| Title | No | Text | - | Chart title |
| Position | No | Text | - | JSON object with anchorCell, offsetX, and offsetY |
| Variable | Yes | Text | - | Variable to store the result |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Object | Object containing chartId |
Errors
- Sheet not found – no sheet exists with the given ID
- Invalid data range – the data range is empty or malformed
Tips
- The first row of the data range is typically used as category labels
- Use the Batch update spreadsheet function for more advanced chart customisation
Related functions
- Read sheet range – Read data for chart creation
- Batch update spreadsheet – Advanced chart configuration