Best answer

Error - "too many requests" from Xero app - how to workaround?

  • 22 February 2024
  • 8 replies
  • 75 views

Userlevel 1
Badge

Hi!

My Zap is a loop which generates c.150 invoices in Xero from a table. 

The loop works perfectly as it should, however after around invoice no. 100 i start getting errors

“Too Many Requests”

I imagine this is Xero rejecting Zapier’s requests to make invoices because it had received too many. 

I have tried making one of the steps in the loop a minutes delay, but this did not fix the problem. 

The workflow is not too time sensitive - it could take 24 hours to execute, for instance. 

 

Is the answer just to increase the delay? Or is there a better workaround?

 

Thanks so much!

 

icon

Best answer by Troy Tessalone 23 February 2024, 19:23

View original

8 replies

Userlevel 7
Badge +12

@ABABAB 

Not a solution, but I will share what I am thinking.  

As you have said, it seems that you have hit a limit on the number of Xero transactions that can be created in a single zap.  There are others that have hit this transaction limit, but I did not see a fix.  I would research a way to schedule the invoice creation jobs and limit the number of transactions per job (aka zap).  Perform some testing and see how many invoices you can create in 1 hour.  Zapier has a way to schedule zaps, or you could use external ways to trigger the zap.  

A simple way to setup a trigger and control how many invoices get create in each zap would to have a spreadsheet row created/updated trigger.  Have a zap copy rows from spreadsheet A to spreadsheet B ten at a time (for starts).  Set the trigger on spreadsheet B and process those invoices.  Mark the rows in spreadsheet A complete.

Your thinking is correct in looking at the rate of execution, but the Xero transaction limit may be on a single zap.  Only the techs who wrote the API / Zap public integration can answer that question.

Try submitting the zaps as smaller jobs and see if that helps.  

Kind regards,

Mike

GetUWired

Userlevel 1
Badge

Thank you so much for the response, really helpful. 

I have tried breaking up the data into chunks of 50 invoices on google sheets, and then processing them using separate Zaps. 

Testing now, so lets see how that goes. 

 

Thanks again 

Userlevel 7
Badge +14

Hi @ABABAB 

Try using Delay - After Queue to space out the requests to Xero.

https://zapier.com/help/create/customize/add-delays-to-zaps#delay-after-queue

Userlevel 1
Badge

oh interesting - where would i put this delay step in my loop?

Thanks

Userlevel 7
Badge +14

@ABABAB 

Within the Loop before the Xero step.

We would need to see screenshots with how your steps are outline in order to have more context, thanks.

Userlevel 1
Badge

Thank you so much, as ever. 

I have tried this with 1 mins delay after the Q. 

I shall report back in a few hours to see where we get to.

Userlevel 1
Badge

This works perfectly, thank you 

Userlevel 7
Badge +6

That’s an amazing news @ABABAB! Big thanks to the folks here for pointing you in the right direction!

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help! 🤗

Reply