Fetch groups
Table of Contents
Note:
- Each time the zoho.connect.myGroups 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.connect.myGroups 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.
Overview
This task is used to fetch all the groups under a specified network.
Syntax
<variable> = zoho.connect.myGroups(<scopeID>, <connectionName>);
where,
| Params | Description | Data type |
| <variable> | is the variable which will hold the returned response. The response contains the group names and their respective Partition IDs. | KEY-VALUE |
| <scopeID> | is the variable which represents the Scope ID of the network. You can also fetch the scope ID from the response of myNetworks task. | NUMBER |
<connectionName> (optional)* | is the name of the Zoho connect connection. *Note: This param is not applicable to Zoho Creator and mandatory in Zoho Cliq. | TEXT |
Example
Imagine that the user wants to know all the groups under a network represented by the Scope ID - 105000017039001. The following snippet can be used in such a scenario.
groupDetails = zoho.connect.myGroups(105000017039001);
where,
groupDetails105000017039001Sample Response
Following is a sample success response:
"{\"name\":\"Deluge\",\"id\":\"23412000000002002\"}",
"{\"name\":\"DRE\",\"id\":\"23425000000002002\"}",
"{\"name\":\"Test Group\",\"id\":\"32890000000002002\"}",
}
To fetch the partition IDs, use the following snippet:
for each <loop_variable> in <variable>
{
info <loop_variable>.get("id");
}
Note: The partition id can also be found out from the settings of a group which is under the corresponding network.
The response returned is null when the Scope ID supplied is incorrect