I’m trying to set up a custom connection between Zapier and Xero using the ‘Webhooks by Zapier’ feature and a private Xero connection. Has anyone pulled this off?
The main issue I’m facing is Xero’s use of OAuth-1a for session creation. I’m totally stumped on how to tackle this. Any tips or tricks would be super helpful!
I know there’s a standard Zapier-Xero integration, but it doesn’t cover what I need (creating manual journals). That’s why I’m looking into this DIY approach.
If anyone has experience with this or can point me in the right direction, I’d really appreciate it. Thanks in advance for any help!
I’ve tackled this challenge before, and it’s definitely not straightforward. The key is to use Zapier’s ‘Code by Zapier’ step instead of Webhooks. This gives you more flexibility to handle the OAuth-1a authentication.
For the OAuth implementation, I found the ‘oauth-1.0a’ npm package to be invaluable. You’ll need to store your Xero app credentials as environment variables in Zapier for security.
One crucial aspect is properly formatting your API requests, especially for dates and monetary values. Xero is quite strict about these.
The setup process can be time-consuming, but once it’s working, it’s quite reliable. If you encounter specific issues during implementation, don’t hesitate to ask for more detailed guidance.
hey mate, i actually got this working recently. used zapier’s code step instead of webhooks. the oauth-1a thing was a pain, but found a npm package that helped. make sure u format dates and money right for xero or it’ll throw a fit. took me ages to figure out but its smooth sailing now. lmk if u need more help
I’ve actually gone through a similar process with Zapier and Xero, specifically for creating manual journals. It was quite a challenge, but I managed to get it working eventually.
The OAuth-1a authentication is indeed tricky. What worked for me was using Zapier’s ‘Code by Zapier’ step instead of Webhooks. This allowed me to implement the OAuth-1a flow directly in JavaScript.
I used the ‘oauth-1.0a’ npm package to handle the OAuth signing. You’ll need to set up your Xero app credentials as environment variables in Zapier.
One gotcha to watch out for: Xero’s API can be quite particular about date formats and decimal places for monetary values. Make sure you’re formatting these correctly in your requests.
It took some trial and error, but once set up, it’s been running smoothly for months now. If you hit any specific roadblocks, feel free to ask and I’ll try to help further.