Best answer

Where to place Looping action in a Zap?

  • 9 February 2022
  • 8 replies
  • 163 views

I have asked this before, and I am still trying to figure it out, so let me give my scenario…

Original Zap:

Trigger: New Entry Cognito Form > Action: Create a folder in google drive > Action: Upload Entry Form from new entry into that new created folder > Action: Upload reference materials from new entry into same folder.

Needless to say this zap failed. It uploaded the document into the test folder from the original zap test set up.

What I need zapier to do is create a new folder for a custom order in google drive. Then, in the same zap, pull the documentation from that form (Order form and reference materials uploaded by customer) and place it in the SAME folder that was created from that new entry. Im not sure how this will work or where I should place the Looping action, after the folder creation? 

icon

Best answer by jesse 19 July 2022, 23:03

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.

8 replies

Userlevel 7
Badge +14

Hi @ChrisScudz 

Please post screenshots with how each of your Zap steps are configured to give context, thanks.

The Looping step would come after the Zap action for GDrive Create Folder.

Thanks @Troy Tessalone… Here some screenshots:

 

Userlevel 7
Badge +12

Hi @ChrisScudz 

You need to dynamically map the folder id from step 2 into step 3 & 4.. Use the custom option in the Folder dropdown as opposed to picking one from the list. 

Userlevel 7
Badge +14

Hi @ChrisScudz 

If you only allow 1 file upload per field in your Cognito Form, then you won’t need Looping, but if there is a variable number of files that can be uploaded to your Cognito Form, then you will need to use Looping.

I appreciate all your assistance. I am a noob and not the best at this so I do apologize for the questions and clarifications I need. Im trying to better a “deranged” workflow that was previously there. I am basically cleaning up someone else's mess so to speak. 

 

@GetUWired So you are saying that I need to set the folder options in 3 and 4 to Custom>Google Drive Folder>ID?

 

@Troy Tessalone yes there can be a variable amount. So the initial document to be uploaded is the Cognito Form PDF, then the reference art files, and that can be 1 or more. 

Userlevel 7
Badge +14

@ChrisScudz

Yes, you will need to map the GDrive Folder ID from Step 2 to the other GDrive Upload File steps using the ‘Custom’ variable mapping option.

The Looping step will need to come before the second GDrive Upload File step, which will be used to loop thru 1+ art files.

Looping help article: https://zapier.com/help/create/other-functions/loop-your-zap-actions

Userlevel 7
Badge +12

@ChrisScudz 

Yep! As troy confirmed you will need to map the id returned after you create the folder to the upload file step. 

Then you can enter into a loop.. One thing to keep in mind… if each file outputted from Cognito forms is in it’s own field (i.e Entry Document1, Entry Document2, Entry Document3, etc) then you will need to add each of these fields into your loop essentially programming your loop to look at all possible places a file would exist. 

Userlevel 7
Badge +9

Hey folks! Just coming in to summarize the advice/answers from this thread for anyone else following along. It sounds like to get this working, you’ll need to do the following:

  • Dynamically map the Google Drive Folder ID (returned from step 2) into steps 3 & 4 using the ‘Custom’ variable mapping option (as opposed to picking one from the drop-down list). 
  • If you only allow 1 file upload per field in your Cognito Form, then you won’t need Looping, but if there is a variable number of files that can be uploaded to your Cognito Form, then you will need to use Looping. For example, if each file outputted from Cognito forms is in it’s own field (i.e Entry Document1, Entry Document2, Entry Document3, etc) then you will need to add each of these fields into your loop essentially programming your loop to look at all possible places a file would exist. 
  • The Looping step will need to come before the second GDrive Upload File step, which will be used to loop thru 1+ art files.

If it’s helpful, we have a Community article that breaks down Looping, here: