L2 Construct: get_cell
sheets googleDescription
GetCell retrieves the value of a specific cell from a Google Sheets spreadsheet.
This handler takes the following input:
- spreadsheet_id: The ID of the Google Sheets spreadsheet
- sheet_name: The name of the sheet within the spreadsheet
- location: An object specifying the row and column of the cell to retrieve
It returns:
- spreadsheet_id: The ID of the spreadsheet (same as input)
- sheet_name: The name of the sheet (same as input)
- spreadsheet_url: The URL to access the spreadsheet
- value: The value of the specified cell
- value_type: The data type of the cell's value (e.g., string, number, boolean)
L2 Data
- Provider: google
- Module: gsheets
- Action: get_cell
Example Step
{
"name": "insert-your-step-name",
"type": "l2",
"l2_data": {
"provider": "google",
"module": "gsheets",
"action": "get_cell",
"metadata": {}
}
}
Input
Example
{
"spreadsheet_id": "1234567890",
"sheet_name": "Sheet1",
"location": {
"row": 1,
"col": 1
}
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/google/gsheets/get-cell-input",
"$ref": "#/$defs/GetCellInput",
"$defs": {
"GetCellInput": {
"properties": {
"spreadsheet_id": {
"type": "string"
},
"sheet_name": {
"type": "string"
},
"location": {
"$ref": "#/$defs/Origin"
}
},
"additionalProperties": false,
"type": "object",
"required": ["spreadsheet_id", "sheet_name", "location"]
},
"Origin": {
"properties": {
"row": {
"type": "integer"
},
"col": {
"type": "integer"
}
},
"additionalProperties": false,
"type": "object",
"required": ["row", "col"]
}
}
}
Output
Example
{
"spreadsheet_id": "1234567890",
"sheet_name": "Sheet1",
"spreadsheet_url": "https://docs.google.com/spreadsheets/d/1234567890",
"error": {
"is_error": false
},
"value": "Hello, World!",
"value_type": "string"
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/google/gsheets/get-cell-output",
"$ref": "#/$defs/GetCellOutput",
"$defs": {
"GetCellOutput": {
"properties": {
"spreadsheet_id": {
"type": "string"
},
"sheet_name": {
"type": "string"
},
"spreadsheet_url": {
"type": "string"
},
"error": {
"$ref": "#/$defs/HandlerError"
},
"value": true,
"value_type": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"spreadsheet_id",
"sheet_name",
"spreadsheet_url",
"error",
"value",
"value_type"
]
},
"HandlerError": {
"properties": {
"is_error": {
"type": "boolean"
},
"errors": {
"items": {
"type": "string"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": ["is_error"]
}
}
}