I try to automate a file(s) upload to a given GoogleDrive folder. My trigger (Google-Sheets from a existing Survey) only delivers all file-URLs in one cell, seperated by commas. I know that the GoogleDrive-App only uploads one file at a time and turns any other thing, including a list of more URLs into a list.
Does anyone have an idea for a clever workaround? Maybe triggering the list to be broken up into single entrys and then downloaded one after another? Or something else?
Since there is no way to edit the format I’m getting the data any help would be very appriciated!
Thanks a lot :-)
Best answer by Danvers
This should be possible using the Formatter app and a separate Google Sheet, and you’ll need two Zaps.
Before you make your Zaps, create a new Google Sheet that we’ll be using just for the files - it can be a new worksheet in the same overall sheet as the one you’re currently using.
Your first Zap will take the input coming from the survey (the first sheet) and will split it into line items and paste it into your second sheet. The Google Sheet action Create New Spreadsheet Row(s) can work with line items and will create a new row for each item. The second Zap will then trigger from the new rows in the new sheet.
In the first Zap, you need to use the Formatter by Zapier app to split the list of files into line items. To do that select the text option and the Transform ‘Split text’. For the separator, use a comma and for the Segment index (the output of the step) choose ‘All (as Line Items)’
One thing to note is that when you add the output of this step to another action, it will look like a comma separate list again, don’t worry! That’s just how it looks, it will be in line items
So, both Zaps together will look like this:
- Trigger from existing sheet
- Formatter by Zapier - Text > split text into line items
- Google Sheets Create New Spreadsheet Row(s) - add the rows to your new sheet
Note - the ‘(s)’ in Create New Spreadsheet Row(s) is important, it means that the Zap will create a new row for each line item!
- Trigger - Google Sheets New Spreadsheet row (from your new sheet)
- Google Drive - Upload file
I hope that’s all clear - let me know if you have any questions!