Skip to main content

Zap Goal: I want to download files from URLs and email them to myself.

Zap Layout:

  1. Webhooks by Zapier “Catch Hook” trigger to catch the URLs
  2. Google Drive “Create Folder” for zap-specific folder
  3. Google Drive “Find Project Folder” for later reference
  4. Google Drive “Upload File” for each expected file to the zap-specific folder (errors for missing URLs are ignored)
  5. Google Drive “Find Multiple Files” to retrieve the list of file names
  6. Storage by Zapier “Set Value” to initiate file_list key with blank string: “”
  7. Looping by Zapier “Create Loop from Line Items” for each file name
    1. Formatter by Zapier “Numbers” to generate iteration-specific delay times
    2. Delay by Zapier “Delay For” references iteration specific delay time (15 seconds)
    3. Google Drive “Find a File” for each file name to retrieve each File]
    4. Storage by Zapier “Set Value” to append file_list key with file: Value], eFile]
    5. “Filter by Zapier “Filter conditions” to only finish the loop when the last iteration is reached 

Zap Problem: The email only includes the file for the loop iteration where the filter condition is satisfied, and not the files from the preceding loop iterations.

Other:

  • Can the file uploads to Google Drive be done within the loop to prevent errors? They are received as individual values, not a delimited string, and are inconsistently populated. Zap stopping due to errors is turned off so the Zap skips to proceeding actions, but preventing the errors in the first place would be preferable.
  • Can the text file resulting from the blank string in the initial “Set Value” before the loop be removed? I tried using Storage by Zapier “Remove Value” to remove the blank string at the beginning of the set value but it was unsuccessful.

Hi @Robop 

Loop iterations from the Looping app run in parallel unless programmed otherwise.

So try using Delay After Queue instead of Delay For.

OR

Check out this help for doing sequential looping:

 


Hi Troy-

 

Thank you for your comment. I originally designed the Delay For action based on the post you now link, instead with a static denominator so that each iteration would always be the same amount of time.

I revised the Delay For action as a Delay After Queue action as you recommend, but the resulting email still only supplies the file from the last iteration. Screenshots from the Numbers & Delay actions are attached for your reference.

Is there other information from the Zap I can provide to help inform your answer?

 

Thank you


@Robop 

Try this…

Within the Looping, you need to find the Storage Key again and append to the current value.

For step 32, with the Value using a variable from Step 27, that means you are always appending to the original Key value, instead of the most updated Key value that is an aggregate of previous Loop iterations.

 


Hi Troy-

 

I see where you’re coming from but unfortunately this also did not work.

Rather than move the 1st Set Value to within the loop, I added a 3rd Set Value to reference the the one with the configuration you showed above. I actually expected this output to at least include a duplicate file but the resulting email is unchanged.

I also tried referencing the key from 27 and the value from 32, but this also made no difference. I thought referencing the key outside the loop might allow it to store “better” between iterations. I also tried using the FileList variable rather than the Value, but I’m kind of shooting in the dark at this point. Each email arrives identical.

Do I need to be using a different Storage action other than Set Value?

 

Thank you again


@Robop 

The Zap steps are still not configured correctly.

Within the Looping you need to use this Zap action: Storage - Get Value

This should come after the Delay step.

Then you can use the output from that step to include as part of the Zap action: Storage - Set Value

 

EXAMPLE

  1. Loop Iteration 1 find an empty key so it appends the data from Loop Iteration 1
  2. Loop Iteration 1 find a key with data from Loop Iteration 1, then it appends the data from Loop Iteration 2
  3. Loop Iteration 3 find a key with data from Loop Iteration 1-2, then it appends the data from Loop Iteration 3
  4. and so on

 


@Robop 

The other approach would be to use this Zap action: Storage - Push Value onto List

 


@Robop 

Yet another options is to use the Digest Zap app: https://zapier.com/apps/digest/help

 


@Robop

The Zap steps are still not configured correctly.

Within the Looping you need to use this Zap action: Storage - Get Value

This should come after the Delay step.

Then you can use the output from that step to include as part of the Zap action: Storage - Set Value

 

EXAMPLE

  1. Loop Iteration 1 find an empty key so it appends the data from Loop Iteration 1
  2. Loop Iteration 1 find a key with data from Loop Iteration 1, then it appends the data from Loop Iteration 2
  3. Loop Iteration 3 find a key with data from Loop Iteration 1-2, then it appends the data from Loop Iteration 3
  4. and so on

 

Thank you Troy - this was the closest to what worked. The critical setting was using the named key “File List” rather than the value itself (circled in the attached image).

 

Cheers-


Reply