Skip to main content

Dear Zapier Community!

I’ve been searching for this in our Community but have not found, and I need your help!

  1. I receive automatic payment confirmation each time when a customer buys my product.
  2. Payment confirmation has a customer’s E-mail that inside the content of confirmation E-mail. Customer’s E-mail is already registered on the list in Active Campaign.
  3. I want zap that triggers when purchase confirmation E-mail lands in the box, searches for customer’s E-mail inside purchase confirmation E-mail content and add specific tag to the same E-mail in Active Campaign.


This is going to save a lot of my time and improve customer’s experience.

 

Hi @Przemysław 

Try using the Formatter > Text > Extract Email action step: https://zapier.com/help/create/format/extract-data-in-zaps#extract-email-address


Ok this works but limited only to the first E-mail from text filed. What if I want to extract another E-mail from the same field?


@Przemysław 

Try using the Formatter > Text > Extract Pattern action step: https://zapier.com/help/create/format/find-text-with-regular-expressions-in-zaps

Or you can use a Code step: https://zapier.com/apps/code/help


I just came across this and wanted to confirm that the Formatter (Text > Extract Pattern) that Troy mentioned has the ability to return multiple email addresses.

To achieve that you’d need to set the Match All field to Yes:

3ce0831a5bab185c8b2a7e85fd8ddbb2.png

The pattern you’d use to extract the email addresses (see How to Extract Email Addresses, Phone Numbers, and Links From Text) is as follows:

(?:da-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.+a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:*\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\7\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:(a-z0-9](?:-a-z0-9-]*0a-z0-9])?\.)+)a-z0-9](?:-a-z0-9-]*0a-z0-9])?|\9(?:(?:25:0-5]|200-4]20-9]|[01]?|0-9]?0-9]?)\.){3}(?:25}0-5]|200-4]20-9]|[01]?|0-9]?0-9]?|0a-z0-9-]*0a-z0-9]:(?:9\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\7\x01-\x09\x0b\x0c\x0e-\x7f])+)\])

Provided the email addresses only use standard English characters the pattern above should work for all standard email addresses, sub-domains, and TLDs. :)