Question

How do I extract and store email recipients from multiple lines using Zapier Table or email Parser?

  • 1 July 2023
  • 2 replies
  • 172 views

Hello there!  Pretty new to Zapier.  I have a Zap that takes a new email message, pulls the sender, recipient, subject, etc, and inserts that info into a spreadsheet (Smartsheet).  The mailbox that it is pulling from has multiple SMTP addresses assigned, so the recipient part is important.  I have stored all of these SMTP addresses in a Zapier table along with the “Pretty” name of the recipient.  For example, “sales-sandiego@contoso.com” would be in the Table with the “Pretty” name of “San Diego Sales”.  I’m using a Lookup to get the Pretty name and insert that into the Smartsheet.  Here’s my challenge. I’ve found that actual SMTP address might end up in the CC line, or even in the BCC.  So my v1 Zap has a lot of Paths.  If the Lookup for the recipients in the To: line returns false, then it does another lookup for the CC: line, etc.  It’s working, but it seems I could clean it up.  

My thought for to make this a little more elegant would be to store all recipients in the TO: and CC: lines somewhere (a Zapier Table?) and THEN do the lookup.  I’m not sure how to do this.  Is it using Looping to go through all email addresses in the TO: line, and then the CC: line?  Seems like a Zapier Table isn’t really meant for storing temporary data.  What can I use instead?  Is Zapier Email Parser a better solution than reaching into the Exchange mailbox?


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

Hi @dandotson 

Good question.

Some options:

  • Formatter > Text > Extract Pattern
    • Used to isolate just the email address with the desired domain
  • Code
    • Used to isolate just the email address with the desired domain
Userlevel 7
Badge +11

Hi @dandotson! 👋

Just reaching out here to make sure you’re all set with this. Were you able to get things up and running using a Formatter or Code action as Troy suggested? Let us know if you’re still in need of some help on here!