Fetch folders
Overview
This task is used to fetch details of all the subfolders inside a specified folder.
Syntax
<response> = zoho.docs.getFolder(<folderID>);
where,
Params | Description | Data Type |
<response> | Variable which will hold the response returned by Zoho Docs. It contains folder accessibility, author details, and other folder-related information. | KEY-VALUE |
<folderID> | is the ID of the folder from which details of the subfolders will be fetched. The Folder ID can be viewed in the url when clicked on the folder in Zoho Docs. Folder IDs are also present in the response of retrieveFiles() task. | TEXT |
Example 1
The following script fetches details of all the subfolders from the specified folder in Zoho Docs.
response= zoho.docs.getFolder("0kav58698776c2a8b465f86b5efef876c7d3b");
where,
"0kav58698776c2a8b465f86b5efef876c7d3b"
Response
The success response returned is of the following format:
{
"FILES":[
],
"FOLDER":[
"{\"PERMISSION\":1,\"LAST_MODIFIED_AUTHOR_NAME\":\"Dinesh \",\"FOLDERNAME\":\"test\",\"AUTHOR_ID\":\"33133XX6\",\"LAST_MODIFIED_TIME\":\"1570516873923\",\"CREATED_TIME\":\"1570516873923\",\"FOLDERID\":\"h0tih5fcc3974bb0246d1XXXXXXXX9ad98bb1\",\"SCOPE\":0,\"AUTHOR_NAME\":\"Dinesh\",\"PARENT_FOLDER_ID\":\"bXXXXXXXXddd8ba9f437c9a5c76e60dd0a14e\",\"LAST_MODIFIEDBY\":\"33133826\",\"IS_SHARED\":false,\"IS_FAVOURITE\":false,\"LAST_OPENED_TIME\":\"1570517045566\"}"
]
}
To fetch the IDs of the subfolders, execute the following snippet:
for each var1 in var
{
info var1.getJson("FOLDERID");
}