Best answer

Uploading more than one file into GoogleDrive using one Trigger

  • 26 March 2020
  • 2 replies
  • 1045 views

Userlevel 1

Dear Community,
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 :-)

icon

Best answer by Danvers 1 April 2020, 18:35

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

Hi @Deniz, thanks for the question and I’m sorry in the delay responding to you!

 

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)’

df612d42d06c5b977726b3153f8df167.png
(View image larger)

 

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:

Zap 1

  1. Trigger from existing sheet
  2. Formatter by Zapier - Text > split text into line items
  3. 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!

 

Zap 2

  1. Trigger - Google Sheets New Spreadsheet row (from your new sheet)
  2. Google Drive - Upload file 

 

I hope that’s all clear - let me know if you have any questions!

Userlevel 1

Hi,
It sounds very clear and logical to me, I’ll try this as soon as possible.

Thank you very much!