Fetch networks
Table of Contents
Note:
- Each time the zoho.connect.myNetworks 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.myNetworks 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 the list of networks to which the user is associated.
Syntax
<variable> = zoho.connect.myNetworks(<connectionName>);
where,
| Parameter | Description | Data type |
|---|---|---|
| <variable> | is the variable which will hold the returned response. | KEY-VALUE |
<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
The following snippet can be used to fetch the list of networks you are associated with.
networkDetails = zoho.connect.myNetworks();
where,
networkDetailsis a variable which will hold the response.
Sample Response
Following is a sample success response:
{"networks": [
"{\"name\":\"ManageEngine PitStop\",\"id\":\"12913000000002002\"}",
"{\"name\":\"Creator Certified Developers\",\"id\":\"23392000000002002\"}",
"{\"name\":\"DC Partner Network\",\"id\":\"34630000000002002\"}",
"{\"name\":\"ManageEngine ADSolutions\",\"id\":\"19687000000002002\"}",
"{\"name\":\"Zoho Books Advisors\",\"id\":\"23476000000002002\"}"
],"emailId":"testuser@zohocorp.com"
}
"{\"name\":\"ManageEngine PitStop\",\"id\":\"12913000000002002\"}",
"{\"name\":\"Creator Certified Developers\",\"id\":\"23392000000002002\"}",
"{\"name\":\"DC Partner Network\",\"id\":\"34630000000002002\"}",
"{\"name\":\"ManageEngine ADSolutions\",\"id\":\"19687000000002002\"}",
"{\"name\":\"Zoho Books Advisors\",\"id\":\"23476000000002002\"}"
],"emailId":"testuser@zohocorp.com"
}
To fetch the network IDs (or the scope IDs), use the following snippet:
<variable> = <response_variable>.get("networks");
for each <loop_variable> in <variable>
{
info <loop_variable>.get("id");
}
for each <loop_variable> in <variable>
{
info <loop_variable>.get("id");
}
Note: The network id (also referred to as the Scope ID) returned by the response above is what would be used in almost every ZOHO Connect integration task. Alternatively, the user can get the Scope ID from the settings of a group which is under the corresponding network.