Skip to content

Instantly share code, notes, and snippets.

@jeznag
Created May 22, 2015 10:10
Show Gist options
  • Save jeznag/62f22aa9b7a54d7ed107 to your computer and use it in GitHub Desktop.
Save jeznag/62f22aa9b7a54d7ed107 to your computer and use it in GitHub Desktop.
Get profile details for Zoho CRM user using deluge script
//get details for this user
userResp = getUrl(("https://crm.zoho.com/crm/private/xml/Users/getUsers?authtoken=AUTHTOKEN&scope=crmapi&type=ActiveUsers"));
info userResp;
users = userResp.executeXPath("/users/user");
if ((users != null) && (users != "")) {
userList = users.toList("-|-");
for each user in userList {
idNode = user.executeXPath("/user/@id");
id = idNode.executeXPath("/id/text()");
if (id == ownerId) {
emailNode = user.executeXPath("/user/@email");
owner_email = emailNode.executeXPath("/email/text()");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment