Question

Extract email adresses from Line Items

  • 2 September 2022
  • 4 replies
  • 57 views

properties:
1:
name: _evey:attendee:1:1:firstname
value: John
2:
name: _evey:attendee:1:1:lastname
value: Doe
3:
name: _evey:attendee:1:1:email
value: johndoe@gmail.com
4:
name: _evey:attendee:2:1:firstname
value: Jane
5:
name: _evey:attendee:2:1:lastname
value: Dough
6:
name: _evey:attendee:2:1:email
value: janedough@gmail.com

I’m getting this structured data from a shopify order. 

I want to create an account for each of the attendees in another service. 

Is there a way to extract the data in a way so that I can loop through the attendees?

 

Thanks for any help!


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

4 replies

Userlevel 7
Badge +12

Hi @tomtomtom!

This sounds like a job for Looping! 

Looping by Zapier allows you to loop through a series of actions based either on the number of items in a series of line items, or you can tell the Zap to loop a certain number of times. In this case, you can use it to take the email address of each participant and perform an action/actions with that information. 

 

You can learn more about using Looping in this help guide. That should get you started, and let us know if you have any questions!

Thanks @Danvers 

I did try the Looping Action, but I couldn’t extract the emails because of the weird structure of the data: The email is in every third property. 

Any pointers on how I would set up the loop on this specific dataset?

Userlevel 7
Badge +8

Hi @tomtomtom 

 

In order to do that you need to add a filter inside the Loop. The filter would be Email in this case. Now the Loop will only work on the Email line items and ignore the other items. 

 

Can you try that and let me know if it works? 

Userlevel 7
Badge +9

Hey @tomtomtom! Just wanted to check in here to see if you were able to try out the suggestion @MohSwellam provided. Were you able to try out the filter and get things working the way you want them to? Let us know!