Currently, we only have the option of ‘Contact’ or Invoice’ with Xero, and many very helpful methods are missing (e.g. Bank Transactions, Invoices, Manual Journals, all can be found here: Accounting API HTTP Requests and Responses | Xero Developer
It would be great to see some more Resources added. Otherwise, any feedback on being able to access the Xero API directly via a HTTP request? I tried this, but found it difficult to connect Xero outside of the n8n module.
lets say you need to make a payment to 50 employees via a batch.
The Bank Transactions Resource will allow you to generate a bank transaction on Xero for this payment in advance of reconciliation. That is, you can automate filling out all of the line items, correct amounts paid to each employee etc
Without this you would have to manually enter 50 lines for each employee on Xero
Then when the payment clears on Xero, it can be automatically reconciled
This will be very very helpful to anyone using Xero to manage a business and n8n to manage automation (like us!)
Here is a screenshot of currently what is available on Integromat/Make.
If we could use something like this, then we could essentially manually create any of the other above integrations easily using the developer docs on Xero, until they become available on n8n.
You probably are aware already, but the poor transition from Integromat to Make has disappointed a lot of people and there is a mass exodus. If this feature was possible, it would definitely open n8n up to a lot of people in business who rely on Xero API (and currently use make/integromat for this).
hi @pb84, thanks a lot for the feedback and the request
We do have on our (short term) roadmap a feature that is quite similar to the Make API Call, you would be able to do it easily (way easier than now) via the HTTPRequest node, this should allow you to do any operation that you like without the hustle of setting up credentials the hard way
On the Xero node front - We’ve processed several PRs regarding the Xero node recently, it definitely needs some love for our side, but for sake of priorities, I can’t really say that we’re going to do that soon.
If still needed, we could definitely help you set up the credentials via the current HTTPRequest node, just give us a shout
Hi @Nivb_6, that is really pleasing to hear that you have a Make an API Call feature on the roadmap.
I would be incredibly grateful to take up your offer to assist with getting Xero credentials up and running via the current HTTPRequest node! I did try and do this with no success myself. What would be the best way of doing this?
Which API are you trying to use with the HTTP Request node? Did you get any errors back? I know using Xero Webhooks can be a massive pain as the signing process involves a bit of extra code in a function node and allowing a library to be used.
I would start by removing the authorization header, This would be set by the Oauth2 credentials automatically so that could be why you are getting an auth error.
With the credentials the Auth URL should only need to be https://login.xero.com/identity/connect/authorize the other parts will be sent automatically.
Hi @Jon, thanks for this - I have made the change (set-up the Credential for OAuth2 API as recommended - this worked no problem). Still getting the same error when executing the node though:
{
"status": "rejected",
"reason": {
"message": "403 -
{"Type":null,"Title":"Forbidden","Status":403,"Detail":"AuthenticationUnsuccessful",
"Instance":"f9b11bee-1ca4-4c6f-9416-2##########","Extensions":{}}",
"name": "Error",
"stack": "Error: Request failed with status code 403 at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15) at
settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12) at
IncomingMessage.handleStreamEnd
(/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11) at
IncomingMessage.emit (node:events:538:35) at endReadableNT
(node:internal/streams/readable:1345:12) at processTicksAndRejections
(node:internal/process/task_queues:83:21)"
}
}