Create a Invoice in Zoho Books using http request

Describe the problem/error/question

I want to extract the data from the Invoice and post it into zoho books via http request

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Arudhra,

What error are you seeing when you run your workflow and is the Schedule Trigger node running or is the workflow being called by another workflow?

I used schedule trigger, because zoho token will expiry every one hour so in one of the post MuteJam advised to run the scheduled trigger every 30 min.

This is error i am getting, i am not knowing how to pass the JSON body with data

Hey @Arudhra,

That looks like Zoho is not happy with the data you are sending, It might be worth sending the request to something like so you can inspect the data and check that it matches what the API is expecting.

can you give me one example, to try

Hey @Arudhra,

If you go to it gives you a url, You can then paste this into the http request node as the url and check the site this will then show you what you are sending.

I have scheduled one workflow, as per the output the token should change every time it gets executed, Can you please help me here what is the wrong in this workflow

Hey @Arudhra,

What error are you seeing? Also don’t forget to remove anything sensitive from your workflows like client ids, client secrets and refresh tokens.

Ok sure, I am got getting error
But when the workflow or node is executed, it should generate a new access token so that i can pass it to another HTTP request node which is Invoice Create Http node
Currently i am not able to see the new access token which was suppose to generate after every scheduled execution

Hey @Arudhra,

Have you followed the documentation for OAuth with zoho? I would have expected the parameters to be in the body not the query. It also looks like you don’t have a url query option for access_type=offline

Thanks will check once

ERROR: Header name must be a valid HTTP token - currently i am trying to pass manually the auth token. But unable to know how to pass the access token.
I tried also Bearer $token - but it did not work

Hey @Arudhra,

Auth Zoho is what you have the header name set to there, You will need to set it to whatever name Zoho is expecting.

I am passing as per the postman, It is working in postman, but not in n8n

Hey @Arudhra.

What error are you seeing now? There seems to be 2 different issues in here.

ERROR: Authorization failed - please check your credentials

401 - “{"code":57,"message":"You are not authorized to perform this operation"}”

But it is working in postman

Hey @Arudhra,

That looks like your authentication is still not correct, have you verified that what you are doing in n8n is the same as what you are doing in Postman? It looks like you are getting the response back from Zoho so this will be an authentication issue.

Why are you using header auth as an option? Does the OAuth2 credential not cover what you need for this?

N8N zoho Oauth2 are linked to zoho CRM, but most of the customers will not use CRM, customers will be having individual Zoho modules. So trying to connect with Zoho invoice module

Hey @Arudhra,

We have an option in n8n to use a custom OAuth2 credential, Have you tried using that?

This lets you set all of the options without having to try and implement the OAuth handshake yourself.

yes, trying it out