Skip to main content

Hi there,

 

I’m having an issue connecting to the Xero API. See below. I do not get an option to select an organisation but get the below error?

 

Please advise,

Thanks

Paul

 

 

 

Hi @donegalnet, thanks for joining the Community here! 🙂

Ah, that error appears to be related to a known bug with the API Request action where the Organization field is no longer appearing. Really sorry about that! I can’t make any promises around when it will be resolved by but I’ve added you to the bug report so that we’ll be able to notify you the minute it’s been sorted. 

In the meantime, I’d like to suggest using the Custom Action option instead: 

82a982adcf25d4e1c5884c83e6098382.png

It handles the custom requests to Xero differently to API Request actions so I’m hoping that’ll help to get around that error. You can find out more about how to set up custom actions here: Create a custom action

Can you please give it a try and let me know how you get on?


Custom Actions don’t work either. This whole thing is a joke. The whole point of Zapier is not having to learn how to make custom API requests. What the hell is this, then? How come this has been an issue for so long and yet nothing has been done about it??


Hi ​@tgt-admin 👋

Fully understand how frustrating this issue with Xero’s API Request action must be. Since both API Requests and Custom Actions are still in Beta, occasional challenges or unexpected behavior can arise as the features are refined. I’ve added you to the bug report so we can notify you by email as soon as it’s sorted.

In the meantime, I’ve just done some testing with Custom Actions and was able to get it to create a custom action that successfully retrieved a list of the tracking categories from Xero. It can sometimes take a little bit of back and forth with the AI Copilot to get it to generate the code as needed but shouldn’t require you to do any coding yourself!

I tested with the following instructions for the Copilot and it generated it correctly on the first attempt: 

Set up a custom action to get the tracking categories (https://api.xero.com/api.xro/2.0/TrackingCategories endpoint) and include a field where the Xero organisation can be selected and passed in the API call to Xero. And ensure that Accept: application/json is added to the header so that the response comes over as Json instead of XML.

2948d15890a7a6e3ab389f9a4aaf3044.png
 

So it could be that the instructions given to Copilot just need a bit of tweaking. Can you try giving the Copilot instructions more like the ones used in the example above and let me know whether that does the trick? 


Hello everyone, i don’t know if you guys are still struggling with this but i found the solution :

Just add an Additional Request Headers : xero-tenant-id and as a value use the id of the organization 

 

You can find the ID of the organization easily through a native xero action step, like shown below :

 

Automate well guys 🙏🏼


Awesome stuff, ​@Ameur J! 🙌 I double-checked that approach in an API Request action by making a call to the Tracking Categories endpoint too, and it worked perfectly! 😁🎉

Thank you so much for taking the time to share the solution you found for this—it’s super helpful! I’ll mark it as the best answer now to make it easier for others in the Community to find.

Thanks again! 🧡


Thank you ​@SamB, I actually found many solutions to many automation issues, I will start sharing answers and even creating posts when the question hasn’t been asked yet 

 

is it possible to open a question and give the solution?

 

 


We’d love that, ​@Ameur J! 🤗

is it possible to open a question and give the solution?

It is indeed! You can share details of any other solutions you found to unasked questions by starting a new topic in our Show & Tell section😁


Reply