Best answer

Want to creat a zap that can action a list of items and loop until it meets the set number

  • 17 March 2020
  • 2 replies
  • 238 views

Hi all,

I wish to achieve the following, not sure how to as I have no coding background

The apps involved are jotforms and infusionsoft

Trigger --> JotForm filled (Fields: {{Infusionsoft_ID_first}}, {{Infusionsoft_ID_last}}, {{Email_Body_Text}})

Action --> Send emails by using Infusionsoft one by one, loop action is needed as below:

Begin Loop

  • 1. find and match {{Infusionsoft_ID_first}} with actual infusionsoft ID in infusionsoft
  • 2. find the email address I wish to send the email to (each infusionsoft ID may have 3-5 email address fields)
  • 3. send the email to the email address with the text in {{Email_Body_Text}} and other fields in the correlated infusionsoft fields
  • 4. Delay for 1 minute
  • 5. increase the {{Infusionsoft_ID_first}} by 1 (assume the ID is numerically sequential)

End Loop until the ID number equals {{Infusionsoft_ID_last}}

 

Any assistance is greatly appreciated. Thanks

icon

Best answer by Liz_Roberts 30 March 2020, 16:45

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 +8

Hi @Dong ,

Thanks for reaching out- interesting workflow!

I can see that Support is helping you but please let us know if you have any further questions!

Userlevel 7
Badge +8

Hi Dong,

So that others may know what the solution that you received from Arvind from Support was, I’ll share it here: 

If you are able to run a for loop along the lines of

for (i={{Infusionsoft_ID_first}}, i<{{Infusionsoft_ID_first}}, i++)

and inside of the loop, append the IDs to an array like this:

output.push({
id: array[i]
});

then that should cause the Zap to loop for the remaining steps which are:

  1. find and match {{Infusionsoft_ID_first}} with actual infusionsoft ID in infusionsoft
  2. find the email address I wish to send the email to (each infusionsoft ID may have 3-5 email address fields)
  3. send the email to the email address with the text in {{Email_Body_Text}} and other fields in the correlated infusionsoft fields
  4. Delay for 1 minute