• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

How can I use up fewer tasks in this workflow?

Luis PW

Member
I have a looooong workflow that looks like this:
1. Users submit a Paperform and they can upload between 10 and 30 files.
2. Pabbly catches the data via webhook (free step)
3. Pabbly uploads the files to a Google Drive folder. Since it's like 30 possible files, there are 30 similar steps, each consuming 1 task every time the form is submitted.

The problem is that the workflow has one step per upload field on the form, to upload the files to GDrive, which makes it long and consuming. The thing is that users don't always submit all 30 files. Some upload 10, others 15. But at the moment, I'm wasting 30 tasks every time someone submits the form, even if some questions have no files. Some steps don't do anything, because there's no file to upload.

So how can I trigger a step ONLY IF the user has uploaded a file to that Paperform field? So if the user has uploaded a file for question 5, the file is uploaded; else, that step is skipped without wasting 1 empty task. Is it possible?

I was thinking that a solution could be to use routers, but I've been testing and it doesn't work like that, because routes are exclusive and do not run in parallel, do they?

Please, help. I'm wasting tasks like crazy, lol.
 

Luis PW

Member
Hi @Luis PW,

Please try using an Iterator for this use case, as shown in the video shared below.
As far as I know, the iterator isn't the solution. I have different questions for each file upload and each file has a unique URL which I can map into any field. The automation is okay, the problem is that it's consuming tasks even when files are not uploaded, because the step still executes, even if for some questions the user hasn't uploaded any file.

My question is: is there a way to have a filter or something that performs something like: if there if a file, upload, else skip the step and move on to the next? Because I don't think there's a way. The router isn't the way. The iterator isn't the way, if I understand it correctly.

So I believe the only way is to have, instead of 1 workflow with 30 steps, have 30 workflows with one step, and then have a filter to either do the upload or not, based on whether the user submitted a file or not.

Any other ideas?
 

ArshilAhmad

Moderator
Staff member
If the Iterator doesn't solve your issue, then the way you suggested is the only way you can achieve your use case. You would need to create a separate route for each upload because adding a filter directly to your workflow will result in your workflow stopping at a failed step in the filter.
 

Luis PW

Member
If the Iterator doesn't solve your issue, then the way you suggested is the only way you can achieve your use case. You would need to create a separate route for each upload because adding a filter directly to your workflow will result in your workflow stopping at a failed step in the filter.
But I think that won't work either. I made a test with another workflow, a simple one with only 4 file upload questions on Paperform, but the result wasn't successful. I'll need to do more testing, but let me get this straight first...

Imagine I have 4 file upload questions: file 1, file 2, file 3 and file 4

I set up a router for each one and a filter inside each router. This way, if user uploads file 1, for example, it will be uploaded to GDrive. If not, it won't execute the upload and won't count that task.

My question is: Will every route execute simultaneously regardless of which files are uploaded? For example, if a user uploads files 1 and 3, or 2 and 4, or whatever, will all "routes" execute or stop (filter) successfully? Because I did a quick test with 4 questions and it wasn't happening. I might've done something wrong, but I didn't think it was possible.

Thanks a lot for responding to my questions.
 

ArshilAhmad

Moderator
Staff member
The router does not execute all its routes simultaneously. The routes are executed from top to bottom. Route 1 will be executed first, and if the file set as a Filter Label exists in your trigger, the file will be uploaded. Then, Route 2 will be executed, and the process will repeat itself. Similarly, all other routes of your router will be executed. Although it could work, we don't usually suggest using the router in the manner you are using it. Make sure you test it a bit before implementing it in your original workflow.

Additionally, I noticed that you used the same label, 'Data 2 Value Url,' in both of your routes. I recommend selecting a label that corresponds to the URL you are attempting to upload.
1694384330525.png
 
Top