How do I manually add a tag to an existing email?


I’m new to Zapier. Tried searching, but could not find and answer to my question. I might not have my terminology sorted out, so that might be part of it. Here’s my first question:

I am extracting info from an email, such as address, phone number etc, and exporting for use in Mail Chimp or

So far, the I’ve been mostly successful extracting info like phone numbers etc by using code such as:

import re

def extract_phone_numbers(email_body):
# Define a regular expression pattern to match phone numbers
phone_pattern = r'\b\d{3}[-.]?\d{3}[-.]?\d{4}\b'
# Search for phone numbers in the email body
phone_numbers = re.findall(phone_pattern, email_body)
# Return the extracted phone numbers
return phone_numbers

# Example email body
email_body = input_data["Body"]

# Call the function to extract phone numbers from the email body
phone_numbers = extract_phone_numbers(email_body)

# Output the extracted phone numbers
output = {"Phone Numbers": phone_numbers}

However, sometimes this extraction method gets phone numbers or addresses incorrect. For example, in someone’s signature there may be too many phone numbers, or alternate addresses.

Is there a way to manually add a tag, signifier, or comments into the body of a (forwarded) email, such that Zapier knows exactly what to with the text?

For example:

<Address> 123 Main St </Address>

So. in the above example the <Address> </Address> notes are added manually by internal users and forwarded to an email address that Zapier is scanning.

I hope this question makes sense. And thank you!



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 @DazedAndCerused 

One option is to use Named Variables:


This looks like a great suggestion. Thanks @Troy Tessalone !