• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

Upload and rename multiple files to google drive

Ulf

Member
I have a use case, where users upload their name, address and up to 3 audio files with fluent forms on my wordpress site. Since users are usually not very good at naming their files properly, I need to rename them to identify which file came from which user. When a form is submitted, the following automation is triggered: (Please see attached images)

1. Trigger: FluentForms: New form sent

2. Action: Router A: check if audio file is WAV, rename file to {first.name}-{lastname}.wav, upload file to Google drive folder

Router B: check if audio file is MP3, rename file to {first.name}-{lastname}.mp3, upload file to Google drive folder

This is already working very well with a single audio file uploaded! Now here is part where I am lost:
I want to allow users to upload from 1-3 files. So there are 3 different possibilities on how many files arrive. My question is:

1 - Is there a possibility to somehow loop the action until all files are processed and is there a way this works on a changing number of files with each form sent?

2 - Is there a way to insert an increasing count number from 1-3 into the renamed file like {first.name}-{lastname}{count-number}.wav

Thank you very much,
Ulf
 

Attachments

  • pabbly1.jpg
    pabbly1.jpg
    220.6 KB · Views: 138
  • pabbly2.jpg
    pabbly2.jpg
    157.7 KB · Views: 161

Neeraj

Administrator
Staff member
Do they send all the files in an array?

If yes, what you can do is, capture the webhook response by turning ON the advance button.

This will give you the whole array with all the files in that array.

Next use the Iterator module that loops through all the items in the array one by one.

Check the Iterator video here.
 

Ulf

Member
Actually I found a solution! After separating the links with text split, a seqence of upload and filter steps does the trick:

upload file1, then filter: check if text split result 2 starts with "https://" then continue, else stop - and going on like this for file 2 and 3.
So no tasks are wasted for trying to upload files that are not existing :)
 

Neeraj

Administrator
Staff member
Actually I found a solution! After separating the links with text split, a seqence of upload and filter steps does the trick:

upload file1, then filter: check if text split result 2 starts with "https://" then continue, else stop - and going on like this for file 2 and 3.
So no tasks are wasted for trying to upload files that are not existing :)
Wow, a new way to iterate. :)
 
Top