Get Sheets from Zoho Sheet
Table of Contents
Note:
- Each time the zoho.sheet.getSheets integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.sheet.getSheets integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Description
The zoho.sheet.getSheets task is used to fetch a list of all the worksheets from the specified Zoho Sheet file. This task is based on the Zoho Sheet API - List All Worksheets.
Syntax
<response> = zoho.sheet.getSheets(<resource_id>, <connection>);
where:
| Params | Data type | Description |
| <response> | KEY-VALUE | The names and IDs of all the worksheets present in the specified Zoho Sheet file. |
| <resource_id> | TEXT | The Zoho Sheet file from which a list of worksheets will be fetched. Note: The resource_id can be obtained from the URL of the Zoho Sheet file. The URL is in the following format: https://sheet.zoho.com/sheet/open/<resource_id>/sheets/<worksheet_name> |
| <connection> | TEXT | The link name of the connection. Note:
|
Example
The following script fetches the list of all the worksheets from the Zoho Sheet file of ID - eev4nXXXXXXXXXXXXXXXXXXXXXXXXXXXcff41.
response = zoho.sheet.getSheets("eev4nXXXXXXXXXXXXXXXXXXXXXXXXXXXcff41", "sheet_connection");
where:
response"eev4nXXXXXXXXXXXXXXXXXXXXXXXXXXXcff41""sheet_connection"Response Format
Success Response
The success response will be returned in the following format:
{
"worksheet_names": [
{
"worksheet_id": "0#",
"worksheet_name": "Sheet1"
},
{
"worksheet_id": "1#",
"worksheet_name": "Sheet2"
}
],
"method": "worksheet.list",
"status": "success"
}
Failure Response
The failure response for invalid resource ID will be returned in the following format:
{
"error_message": "Mentioned resource ID is not valid",
"error_code": 2898
}