Skip to main content

Sheets: Get Spreadsheet Tool

Usage

All Portia tools using API endpoints that require OAuth are built with plug and play authentication support. They use Portia client credentials including client ID, client name and redirect URL. Such tools will raise a Action Clarification with an OAuth link as the action URL. The portia.wait_for_ready() method must be used in this scenario: Portia's OAuth server will listen for the authentication result and resolve the concerned clarification, allowing your plan run to resume again.

For more on this, please visit to the section on running Portia tools ().

Tool details

Tool ID: portia:google:sheets:get_spreadsheet

Tool description: Gets the content of a spreadsheet from Google Sheets by ID. The GoogleDriveSearchTool should be used to search for a spreadsheet by name if an ID is not known.

Args schema:

{
"description": "Schema for the Google Sheets Get Spreadsheet tool.",
"properties": {
"spreadsheet_id": {
"description": "The ID of the spreadsheet to get.",
"title": "Spreadsheet Id",
"type": "string"
}
},
"required": [
"spreadsheet_id"
],
"title": "GoogleSheetsGetSpreadsheetToolSchema",
"type": "object"
}

Output schema:

('dict', 'dict[str, list[dict[str, str]]]: Content of the spreadsheet.This is a structured response with a hierarchy including sheet names and its content in dict format.')