Question

Email Parser template to extract list of repeating items

  • 5 July 2023
  • 3 replies
  • 20 views

Hello!

 

Im trying to correctly output the following email template, it is essentially a list. In this example there are 3 ‘ShotNumbers’ and 3 ‘Vendors’:

Input as shown in email template:

 

SE0_TO_074_408_230613 to Creep

SE0_TO_075_406_230613 to NVIZ

SE0_TO_075_408_230613 to NVIZ

 

Set Template:

{{shotnumber}} to {{vendor}}

{{shotnumber}} to {{vendor}}

{{shotnumber}} to {{vendor}}

 

However, I am just getting a limited output when running Email Parser, it is extracting the first ‘shotnumber’ and the last word as the ‘vendor’, not line by line as requested in my template:

Output:

shotnumber SE4_TO_074_408_230613
vendor NVIZ

 

I actually want the output to contain 3x Shotnumbers and 3x Vendors.

If the output was correct, I would push to Google Sheets with 3 individual rows with two columns, a row and column for each shot number, and the adjacent column would be for the vendor.

Is there a way to do this in the Email Parser template?

Thanks


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +6

Hi @ThomasU100,

It seems like there might be a little mix-up with how your templates are set up. If the template names are too similar, the Email Parser could get a bit confused. If you're dealing with multiple Shotnumbers and Vendors, a good idea could be to give them distinct names. Here's a suggestion on how you could do that:

{{shotnumberOne}} {{vendorOne}}

{{shotnumberTwo}} {{vendorTwo}}

And so on.

Please give that a try, and let me know how it goes. 😊

Hello Ken

 

Sometimes there are 5 shots, sometimes the list is extensive. How many do u write?  Up to {{shotnumber100}}?

 

Thanks 

Userlevel 7
Badge +6

Hi @ThomasU100,

You’re correct. If there are instances where you have more than 5 shots, and sometimes even a very long list, it's a good idea to use an email with 5 or more shots as your sample for creating templates.

You can create a template for each Shot and Vendor. This way, even if an email comes through with just 1 shot/vendor, your Zap will still be able to capture it. This approach ensures your Zap is prepared for all scenarios, whether it's a single shot or an extensive list.

Hopefully, this clears everything up. 😊