Skip to main content

Howdy! Here’s my dilemma. I have a Zap that takes images submitted via Jotform and uploads them to Microsoft SharePoint. Two of the image fields on the Jotform form allow for multiple uploaded images. For those fields, I have a Loop set up to run through each value until all of the photos are uploaded. Since Zapier only allows one Loop per Zap, I need to put both of these fields into the same Loop as two different values. The problem is that when the amount of submitted images are not the same in each value, the Zap results in an error. For example (see second screenshot below): the “Upload Photos of Location of Failure” has 2 images to upload but the “Upload Photos of Tagged Part” only has one. I believe since the first value processed two iterations, all subsequent values will be processed with that many iterations as well. The third screenshot below shows the error message and the portion on the Zap that failed. As you can see the iteration is “2” but there is no file because there was not a second file in that Jotform field.

The Zap completes fine and the files all end up in the correct place but the error I receive after each submission is getting a little annoying! Any suggestions on how to fix my Zap to keep this from happening?

 

 

 

 

Hi @darvinm 

For us to have more context, post screenshots with how your Zap steps are configured in EDIT mode so we can see field types/descriptions.

 

The data returned from Jotform for the image links is text (not an array of items).

From the screenshot we can’t tell if multiple links are separated by a comma, new line break, or some other values.

Zap action: Looping - Create Loop from Text

Set the Text Delimiter accordingly.

Add a Filter after the Looping step to make sure the loop iteration has a value.

 


Here is a screenshot of the Loop App & event tab.

 

Here is a screenshot of the Loop Action tab.

 

Here is a screen shot of the first SharePoint action inside the Loop action.

 

Here is a screenshot of the second SharePoint action inside the loop action.

 

Let me know if you need anything from me. Thanks!


@darvinm 

The Values to Loop should be 1 input variable instead of 2.

Rename the input variable value to just: Images

Map both of the variables from step 1 into the same input field.

 

For the Folder field, check the field description for the expected value. (needs to be the folder path)

Help link for determining the correct value to use in a dropdown field: https://help.zapier.com/hc/en-us/articles/8496241696141-Add-custom-values-to-dropdown-menu-fields-in-Zaps

 


@Troy Tessalone

Sorry, that it took so long for me to respond. I was finally able to get back on this issue! I was able to figure it out with your suggestions. Thank you for that. I did run into a small snag though that I’ll describe in case someone else runs into it.

As you suggested, I mapped both of the variables from step 1 into the same input field. After doing that, the SharePoint app kept throwing a “Not Found" error message. By inspecting the Looping app’s “Data In”, I discovered that it was stringing all the URLs into one long string, whereas before, they were coming in on separate lines. After a little bit of trial and error, I added a line break (shift + enter) in between the two variables and that solved it. It doesn’t “look” any different in the value field because my Jotform variables are so long that they look like they are on different lines, but the line break needs to be added so it outputs correct data for the SharePoint app to use. Here are some screenshots of the “Data In” of the Loop app.

Before making the suggested changes, I was getting each URL on its own line.

 

After making the suggested changes, I was getting all the URLS on one line.

 

After adding the line break in between the two variables, all URLs on separate lines again.

 

As a side note: the reason that I had them separated into two values is so I had two Loop variables to work with later. I could then name these files “Location of Failure 1, Location of Failure 2” and so on and “Tagged Part 1, Tagged Part 2” etc. Now all the images from both Jotform uploads get named the same. If it’s not possible to do what I was doing with no errors, no big deal. I do not necessarily have to have it that way but it just made it easy to determine which images were what. It seems that allowing us to do another Loop after the first Loop completes would be a solution but that is not possible at this point.


Reply