Zoho issues with post and coql requsts

Describe the issue/error/question

With just a little customization the Zoho module quickly becomes unfunctional because admins tend to create custom modules. For that reason I find myself using the http helper allot!

In addition to that the zoho api is finicky and the web is riddled with people complaining about getting 400 bad request, and 400 missing parameter errors.

In the code block here are a few zoho api requests, and they always return errors. but I cannot figure out why. Then I looked at this page in the code base. under scope it says would adding scope to the zoho credential be as easy as adding it right here? one additional important scope which I am trying to make work is coql (the zoho query language)

here is a list of additional scopes available by zoho

Summary / Actual Problem Statement
I have not been able to get any post request working with zoho even when I build the body by hand, I have however been able to make get requests work.

Second, COQL and many other scopes are not available through the credential… any Ideas on how to add them?

			displayName: 'Scope',
			name: 'scope',
			type: 'hidden',
			default: 'ZohoCRM.modules.ALL,ZohoCRM.settings.all,ZohoCRM.users.all',

What is the error message (if any)?

Please share the workflow

If anyone has personal experience making zoho work in N8N I would be happy to pay for a consulting hour. Getting COQL to work is a big deal.

Hey @roofboard,

Adding the scopes to the credentials would require the code to be updated then a custom docker image made from that change. It sounds like rather than just updating the scope though maybe a feature request to support coql would be a better option?

Looking at your workflow you are using pre-defined credentials which won’t work if you need those specific scopes so you would need to start by adding a new generic oauth2 credential and using that for your requests.

Looking at the Zoho docs that might be enough to get it working with what you currently have.

Finally got it working…
Oauth2 is tricky, first think get the built in credentials working with a get request that is easy, then proceeded to getting the custom calls working. Zoho is pretty unique about how calls are fomatted. So here is some stuff tested working.

One important step is adding scopes. The syntax for adding scopes is demonstrated in the configuration script.

1 Like

This was a lifesaver. Thank you for documenting it. I just executed my first successful Zoho CRM COQL query via n8n.

I can’t get it work. Actually I don’t understand your @roofboard workflow. Those “## config script from codebase use as refrence” where do you execute it?

Ohh I got it now
I created a new credential type OAuth2 API.
Then you’ll able to fill in all kinds of scopes available in Zoho