Best answer

How can I extract a value from an email?


Userlevel 1

Hi,
I always receive the same email, I can extract the email, but I would like to extract the first value.

Could someone help me how to extract this value?

 

 

icon

Best answer by christina.d 8 June 2022, 21:46

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.

15 replies

Userlevel 7
Badge +14

Hi @tammy

Good question.

What you’re seeking is email parsing.

Check out this email parsing app: Mailparser

Userlevel 1

this is a paid app, right?, I already spend a lot with several apps, I'm looking for something that is direct on zapier, because I already paid for it.

Userlevel 7
Badge +14

@tammy

In Zapier, you can use Formatter steps or Code steps to do email parsing.

Mailparser has a free tier, but may depend on your volume.

Userlevel 1

@Troy Tessalone I did it, extracted the data that I'd like, but to extract 3 values, there will be 6 actions, is there a way to reduce this? at least 1 action for each value?

 

i'll put here what I made.

 

Userlevel 1

a test...

the problem is that there are too many actions 😫😳

 

Userlevel 7
Badge +14

@tammy

A Code step can be used to replace multiple Formatter steps.

Or an email parsing app such as Parser by Zapier or Mailparser can be used.

Userlevel 7
Badge +9

@tammy To build on what Troy has suggested, the Email Parser by Zapier is a free parsing solution that may help eliminate a LOT of those steps as you may not need to utilize the formatter. 😉 Would you be willing to give that a try as an alternate solution?

Userlevel 1

@jesse @Troy Tessalone I did and it worked very well.😄


I just have one question, to make the template, do I put only the information I need and remove everything else or do I have to put the original email?

 

 

Userlevel 7
Badge +9

@tammy glad to hear that! Your template should match your email, exactly. If you remove lines from the template (even though it looks better) the parser won’t be able to match it against the emails that are coming in to be able to parse it correctly. Does that make sense?

I also wanted to pass along this help article on setting up your template correctly: https://zapier.com/help/create/email-and-text-messages/set-up-your-email-parser-account-in-zapier#tips-for-improving-parsing

Keep us posted with how things go, here!

Userlevel 1

and another thing, it seems I read it somewhere but I don't remember where.

when I put a TAG, but there are several identical words in the same email, is there a problem with this, is there a way to restrict just where I put the TAG?

 

Userlevel 7
Badge +12

Hi @tammy!

There’s not a way to tell the Email Parser to only get the first ‘tag’, but we might be able to find a way to make this a little more accurate. 

 

In the example you gave, I can see that there are three examples of ‘Renovación Tribu G4’ and each one has different punctuation on after it. There’s:

Renovación Tribu G4!

Renovación Tribu G4

Renovación Tribu G4.

 

You might be able to improve the accuracy of the template if you choose only one of those ie add an exclamation mark, new line, or full stop after the phrase. 

 

That might help, but one thing to remember is that Email Parser by Zapier works better for emails where the information you need is on different lines. If you need a more accurate parser you may need to use an app that is specifically designed for that, like MailParser, Parsuer, or Parserr.

 

I hope that helps!

Userlevel 1

Hi @tammy!

There’s not a way to tell the Email Parser to only get the first ‘tag’, but we might be able to find a way to make this a little more accurate. 

 

In the example you gave, I can see that there are three examples of ‘Renovación Tribu G4’ and each one has different punctuation on after it. There’s:

Renovación Tribu G4!

Renovación Tribu G4

Renovación Tribu G4.

 

You might be able to improve the accuracy of the template if you choose only one of those ie add an exclamation mark, new line, or full stop after the phrase. 

 

That might help, but one thing to remember is that Email Parser by Zapier works better for emails where the information you need is on different lines. If you need a more accurate parser you may need to use an app that is specifically designed for that, like MailParser, Parsuer, or Parserr.

 

I hope that helps!

thanks, it's helped a lot

Userlevel 1

I'm testing it, it's almost right.

emails always arrive in the same format, what changes is the name, email and date. each information is in different lines, it's not getting the right data.

The image below as it's happening.

 

 

Userlevel 7
Badge +9

Hey there, @tammy! Thanks so much for sharing your progress! It looks awesome so far. 

It looks like the formatting is a little wonk due to character count pushing some input into the next line - which makes sense! It looks like Danvers mentions this in their response but Email Parser by Zapier works better for emails where the information needed is on different lines.

I know you mentioned you would prefer not to use another tool, which I absolutely understand! That said, it may make sense at this point to consider a more robust parsing tool to achieve the results you’re looking for.

If you’re curious about testing them it does looks like MailParser and Parserr both have free plans, depending on your volume!

 

To summarize so far:

...the Email Parser by Zapier is a free parsing solution that may help eliminate a LOT of those steps as you may not need to utilize the formatter. 😉 

They also shared this resource on creating a template for parsing: https://zapier.com/help/create/email-and-text-messages/set-up-your-email-parser-account-in-zapier#tips-for-improving-parsing

And a great call out to consider about using Email Parser by Zapier:

… one thing to remember is that Email Parser by Zapier works better for emails where the information you need is on different lines. If you need a more accurate parser you may need to use an app that is specifically designed for that, like MailParser, Parsuer, or Parserr.

 

I hope this helps!

Userlevel 1

Thank you all, I've managed to solve the problem that was happening.

I was getting two variations of email.
1 - with phone
2 - without phone

and it was right under the person's name.

and that's why the error happened.

 

so I made an extra template, and the problem is over 😁😀