In my case: I have 3 requests for 3 tasks. But if these requests take at the same time, node will take the same task for 3 requests, instead of every.
This solve issues when other database through API have not updated yet, but need to get different IDs for tasks.
This look like:
Workflow without queue
[request 1] - [workflow]<at 9:00 am> - Got task id 01 <done at 9:00>
[request 2] - [workflow]<at 9:00 am> - Got task id 01 <Error! Duplicated ID>
[request 3] - [workflow]<at 9:05 am> - Got task id 02 <done at 9:05>
Workflow with queue
[request 1] - [workflow have queue node]<at 9:00 am> - [queue 1] - Got task id 01 <done at 9:00>
[request 2] - [workflow have queue node]<at 9:00 am> - [queue 2] - Got task id 02 <done at 9:01>
[request 3] - [workflow have queue node]<at 9:05 am> - [queue 1] - Got task id 03 <done at 9:05>
Could you consider "Delay after queue" node? - #5 by cmdntd987
"Delay after queue" node will solve this, for example by this way:
- Save data of every request first
- Delay and numbered them, ready for queue
- Send one by one request in queue
Although we could create my own database for queue, but it is rather complex in some case
This is very helpful function in zapier, you could see this here:
The Delay After Queue option allows you to create a queue of actions to run. When a Zap is triggered, it adds actions to the queue. The queue then plays the actions one at a time in the order that they were added to the queue. There is a delay between each set of actions for a Zap.
This can be useful if you are running into limits with too many requests to an app, or if you have multiple Zaps that may try to update a record at the same time.
The maximum time a task can be held for is for one month (31 days). Since tasks will be queued, the maximum number of tasks in the queue depends on the Time Delayed For (value) value. For example, if you set the delay to one day, the maximum number of tasks in the queue will be 31. If a 32nd task is created within that period, it will error on the delay step because the scheduled time it will be released is too far away.