Choose where you’d like to start

Fetch folders 

Note: As previously announced, Zoho Docs is being discontinued and the Deluge Docs integration tasks will stop executing starting 15th September 2023. For your advanced file management and collaboration requirements, we recommend you refer to the WorkDrive API documents as an alternative.

Overview

This task is used to fetch details of all the subfolders inside a specified folder.

Note: On average, it takes about a minute to index a file/folder after it is created or updated. This indexing time can increase if the queue size increases. You will not get the expected result if you execute zoho.docs.getFolder task before the folders you need to fetch are indexed.

Syntax

<response> = zoho.docs.getFolder(<folderID>);

where,

ParamsDescriptionData 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"
is the ID of the folder whose subfolders have to be retrieved. It is of TEXT data type.

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:

var = <response_variable>.get("FOLDER");
for each var1 in var
{
info var1.getJson("FOLDERID");
}

Get Started Now

Execute