How to map Gravity Forms file uploads to Sharepoint attachment columns
I’m trying to connect Gravity Forms to Microsoft so that each Gravity Form entry creates a new line in a Sharepoint list. The issue is file uploads. I’ve figured out how to clean up the URLs and am successfully passing them to Sharepoint as a comma delimited list, but it’s hard to work with.
I’d like to map each file upload (maximum of 2) to a separate “attachment” column in my Shapreoint list so that each file upload URL is clickable. I think the answer is Looping, but I don’t know how to map the the Looping fields to my Sharepoint directory.
When I test the loop, I can see that it’s previewing the 2 URLs correctly, but I can’t figure out the next step. How do I tell Sharepoint to take the first URL and put it in “Attachment 1” column and the second URL to the “Attachment 2” column?
Here’s a screenshot from my Looping Action. Number 1 shows the correct URL. In number 2, there’s no “URL” field, but the preview Loop Value looks correct.
I want to map each of those URLs to the respective columns in Sharepoint. Iteration 1 URL should go to Attachment 1 column, Iteration 2 URL should go to Attachment 2 column.
Thanks for the reply. I tried Paths, but I still don’t understand how to pull the iteration 2 data into a separate column. I can successfully create two paths, but what’s the action to pull the URL from the second iteration? In all my testing and configurations, only the first URL is ever available.
I tried creating a rule in my path so that if Loop Total Iteration = 2, the rule should run. That works. But what’s the step after that? If I create a formatting rule to extract a URL, it still is only pulling the first URL (from iteration 1). I can’t figure out how to bring in the information from Iteration 2 only.
This is my custom rule for the path:
Then I created a formatting rule to pull the URL, but I can only pull the URL from iteration 1:
These are my only outputs from the Looping stage. I don’t understand why there’s not a URL field for iteration 2 that I can reference, there’s only a preview loop values URL that I cannot use in Microsoft. If it was something like URL2, then I could map it to my column, but I’m missing some kind of step here.
Hi @liza,
When you test a loop action, the Zap will only create the first loop. It will not create any other loops during the test. When the Zap runs live, all loops will run and appear in your Zap History.
I recommend publishing the Zap first to see the full Zap in action.
Kindly give it a try and let me know how it goes? I'll keep an eye out for your response!
Hi @ken.a
Thanks for the response. I’ve published the zap and tested. The problem still remains how to map the second iteration loop to a different column.
This is my current setup. I removed the paths, because I couldn’t figure out how to properly use them:
In the Looping set, this is how I’ve set it up:
When I test this, it works. I can see (as in my previous screenshots) that there are two unique URLs being pulled - one from each iteration. The issue is that the field name “URL” isn’t different between iterations, so when I go to map the URL in my last stage, I can’t tell Zapier/Microsoft to pull the different URLs.
Here is the mapping in the last step. For “Attachment 1” column, I’ve pulled the Looping field “7-URL” but for “Attachment 2” which should be iteration 2 of the Loop, I don’t have any other choice for URL except the same field “7-URL”
These are the only dynamic choices that I have from the Looping step to choose from to map “Attachment 2”
In a live test, this is what populates in the two columns, it’s the URL, but it’s only pulling the URL from the first iteration, so it’s a repeat. In my test, I uploaded a sunflower jpeg and a daisy jpeg. Attachment 2 is supposed to pull the daisy.png url.
What’s interesting is if I go into the Zap history and look at the data out from the test, it has the daisy.png URL listed for Attachment 1 and Attachment 2, so not sure what’s going on:
Hi @liza,
Thanks for giving that a try!
Unfortunately, I have exhausted my resources regarding this one. I’d recommend reaching out to our Support Team to take a closer look at this since they have the correct tools to look closer at the Zap.
Have you looked to see if you can transfer the loop count through to your step?
If there are only ever two files you could then filter the path on the loop count equal to the column position and place the first attachment in column 1 and the other in column 2.