loader

For this tutorial in video form, click here

In this article, we’ll show you how to get the list of users from Zoho CRM using a Deluge Script custom function.

The Process

Open your CRM and head into API v2.

Next, head into REST API and then User API.

We’re doing this because there’s no Deluge wrapper, which means we have to directly interface with the API via a connection. Check out this URL:

As you can see on the top right, there’s no Deluge option for it.

Creating A Connection

The workaround for this is creating a connection in Zoho CRM that will allow us to create our own CRM. This sounds a bit wild, but it’s easy to do and works like a charm.

In your CRM, and go to setup.

Here, go to Connections under Developer Space. You’ll be taken to a new webpage. Click “Add Connection” in the top right.

You’ll be given a bunch of options. Click Zoho OAuth, like in the above example. This will take you to the Connection Details page. Fill them out like below:

Once you click the “Create & Connect” button, grant access by clicking “accept”. Your connection status should be a green “Connected”. Below that, you’ll be given the code to use the connection.

Next, click “functions” (on the left), and create a new function.

Make it a standalone function, then paste your code. For the URL, use what was given to you in the beginning, under “Get Users”. We’ll also make it a GET request, and we don’t need to provide parameters. This is what your code should look like before saving and executing the script.

response = invokeUrl [
   url: "https://www.zohoapis.com/crm/v2/users"
   type: GET
   connection: "zoho_crm_getusers"
];

Conclusion

As you can see, the output gives us all of the users. Nice and easy!

For this tutorial in video form, click here