Recently I've started the automation of my checklists. I used to have them as .csv files and used Todoist import functionality, but now I want them to unroll by a simple click. To accomplish this, I've set a Zap consisting of three steps: Webhooks by Zapier (thank you, @PaulKortman), Code by Zapier (using technique from here) and Todoist.
Code from Zapier returns an array of 12 objects which then should transform into tasks created in Todoist. The problem is that several requests for tasks creation fail due to "Too Many Requests" error.
Is there an option to create several tasks with a single request or some other method to avoid this issue?
Best answer by DanversBest answer by Danvers
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').
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 😊
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?
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.
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').
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 😊
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More about cookies
Customize which cookies to allow
Marketing cookies
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Social media cookies
label
These cookies are set by a range of social media services that we have added to the site to enable you to share our content with your friends and networks. They are capable of tracking your browser across other sites and building up a profile of your interests. This may impact the content and messages you see on other websites you visit. If you do not allow these cookies you may not be able to use or see these sharing tools.
Analytics/performance cookies
These cookies enable the website to provide enhanced functionality and personalization, and allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. These cookies may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly and we will not know how you are using our site.
Functional cookies
label
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
Essential cookies
Always active
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.