I too have been running into the "Too Many Requests" error but mostly with Google Docs in November. It seems to have settled a little bit now.
As for your specific issue, is there a reason you have to create all 12 at the same time?
Option1:
Can you split it up into two code steps that each spit out 6 tasks (or 3 that do 4 or 4 that do 3 etc) and after each code step have a todoist step to create those tasks.
My thinking is that there's some real-world limit to the number of tasks that trigger the too many requests error within a time period. If you break it up and that doesn't avoid the error, throw a 1 minute delay in there, or even a webhook to call another zap to create the other 6 tasks as that will slow it down by less than a minute but more than being in the same zap.
This is assuming that the 12 tasks are being called one right after the other as line-items. And so 12 almost instant requests to todoist is too much, perhaps 6 won't hit that threshold?
Option 2:
You could use the todoist API (webhooks for the win!!) and batch the creation of new items (todos) see here. Since you're already doing a code step you could format the output to pass as the body on a POST request to the todoist API. -- However upon further reading it looks like the todoist API is only through oauth so you'll need to create a private app on the Zapier developer platform to do this.
@PaulKortman, thank you for your reply! Due to continuous New Year party, I only now managed to respond!
This checklist contains things that I need to take for a short journey, so the faster it works, the more usable it is. I want it to be something available on the run. I used to import a template with it, which is built-in Todoist functionality. Doing so is not possible from mobile devices, so I started to look for other ways.
Todoist API seems to be a preferable solution in this case, but it looks like something Zapier is supposed to hide from me! Nevertheless, thanks for this viable solution.
@Danvers, @jesse, as far as I understand, you are the members of Zapier team. Do you know anything about batching requests to Todoist? Or maybe some other workaround?
@terbiy Hmm, it sounds like the "too many requests" error you're seeing might be coming from the Todoist API but I can't say for sure without seeing the logs. Have you tried reaching out to their team to see how many requests they're able to handle and in what timeframe?
@jesse, this is for sure a rejection from Todoist side: The app returned "Too Many Requests". I haven't tried to reach the Todoist team, and I think that utilizing several requests even for 12 tasks is a little bit overhead. I do not know the internals of Zapier communications with other applications, but this might turn out to be like if we need to move 12 people from one place to another using a dedicated bus for each other.
@terbiy - I can see what you're saying: can we send all of the tasks in one batch rather then sending each one individually, so that you're only making one request and not 12.
I think that's something that you'd need to check with Todoist - you could take a look at their API docs to see if it's possible to send more than one task at once perhaps?
@Danvers, yes, this is absolutely correct!
Todoist API reference indeed has a part about batching and requests per minute limits:
> We’re able to batch up to 100 commands per request and when combined with the 50 requests per minute, this gives us a total of 5,000 requests per minute when maximally batched.
Here is the link for this part of API: https://developer.todoist.com/sync/v8/#batching-commands.
Got it, thanks for the link to the docs @terbiy!
Based on that, it seems like your best option is what @PaulKortman suggested - to create your own Todoist app in the Zapier Developer Platform. You wouldn't need to build out every trigger and action, just those that you need (eg 'add multiple tasks').
You can find the Platform here: https://zapier.com/platform
There's lots of guides there on how to get started but if you need some extra support, you can always ask in the Community Developer Discussion category
@Danvers, @PaulKortman, @jesse, thank you for your answers!
I'll investigate the Zapier Developer Platform usage option.