Best answer

Google Calendar - Extracting Multiple Emails Using Formatting/Code


Hi there!

Need some help on this complex ask -I have two emails listed in the Event Description that I will need to format/extract. I can do the first one easy through formatting action but will this need code to by pass the first email to parse out the second email?

icon

Best answer by SamB 24 June 2021, 11:17

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.

3 replies

Userlevel 1
Badge

Hi there @geeple ,

Thanks for reaching out with your question. I would love to try to help you with this. 

I might not understand your problem fully, so please do let me know if I am off, but I wonder if the Split text feature could help within the Formatter function. 

You can look at it here: https://zapier.com/help/doc/how-use-formatter-functions#using-split-text

Let me know if this helps at all.

Userlevel 7
Badge +12

Hi @geeple 

A code step with Regex can match any email like text in a string. The regex for which can get complicated. Alternatively, you can chain together Zapier actions to find more than 1 email.

As you’ve discovered, you can use the formatter action to retrieve the first one. Unfortunately, Zapier will always retrieve the first match.

However, once you’ve found the first email, you can follow it up with  another formatter action to find and replace the first found email with a blank value. This will return the event description without the first email. 


Now that the first email isn’t there, you can use a final formatter action to match to the next email address.

 

Userlevel 7
Badge +11

Hey @geeple,

Just checking in to see if you managed to extract multiple email addresses using a Formatter (Split Text) or Code step? Or did you find another way?

If not, you may want to try using a Formatter (Text > Extract Pattern) step. It should allow you to extract multiple email addresses - How to Extract Email Addresses, Phone Numbers, and Links From Text 

Hope this helps!