# Get text parts from received emails and use them as a mappable answers

**URL:** https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396
**Category:** Questions
**Tags:** gmail
**Created:** [April 19, 2024, 2:38pm UTC](https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396 "2024-04-19T14:38:48Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![valeribendo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/valeribendo/32/26192_2.png) [@valeribendo](https://community.make.com/u/valeribendo)
#### Post date: [April 19, 2024, 2:38pm UTC](https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396/1 "2024-04-19T14:38:48Z")

</div>

Hello Guys and thank you for the help in advance.

I use the Mailhook module as my automation trigger, in the email message body I have some info that I want to extra and use separately in the next modules.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/b/2b14cf8ec1563b61e54bc971ed5fa0a52d05fd20.png)

Here in this image, pointed in red are the data I want to use as separate answers or mappable fields, I tried with the text parsers, etc, but cant come up with the idea. any help will be much appreciated

Thanks again

---

<div class="post-metadata">

### Author: ![alex.newpath](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/alex.newpath/32/84_2.png) [@alex.newpath](https://community.make.com/u/alex.newpath)
#### Post date: [April 19, 2024, 2:42pm UTC](https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396/2 "2024-04-19T14:42:50Z")

</div>

Use the [Text Parser](https://community.make.com/t/how-to-use-regex-in-make/202) module inside Make. There is lots on this forum on this handy dandy module.

---

<div class="post-metadata">

### Author: ![Princy](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/princy/32/345_2.png) [@Princy](https://community.make.com/u/Princy)
#### Post date: [April 19, 2024, 2:45pm UTC](https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396/3 "2024-04-19T14:45:29Z")

</div>

@valeribendo you need to use regex with “match pattern” module to extract the information.

Many of my client gets lead on email so i use regex for this. It works best.

[Princy Jain](https://www.facebook.com/princy.jain.followup.automated/)  
Make consultant,  
For consulting support: [Follow up Automated](https://www.followup-automated.com/make-error-support/)

---

<div class="post-metadata">

### Author: ![valeribendo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/valeribendo/32/26192_2.png) [@valeribendo](https://community.make.com/u/valeribendo)
#### Post date: [April 19, 2024, 2:54pm UTC](https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396/4 "2024-04-19T14:54:32Z")

</div>

@alex.newpath thank you

---

<div class="post-metadata">

### Author: ![valeribendo](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/valeribendo/32/26192_2.png) [@valeribendo](https://community.make.com/u/valeribendo)
#### Post date: [April 19, 2024, 2:54pm UTC](https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396/5 "2024-04-19T14:54:50Z")

</div>

@Princy thank you very much

---

<div class="post-metadata">

### Author: ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)
#### Post date: [April 19, 2024, 3:52pm UTC](https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396/6 "2024-04-19T15:52:19Z")

</div>

Welcome to the Make community!

 ![Screenshot_2024-02-20_151445](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/3/a/3a0c58927f26b0aa42ae058e92d98af878686a3a.png)

Assuming the email structure will always roughly be the same, you can use a Text Parser “[Match Pattern](https://www.make.com/en/help/tools/text-parser)” module with this Pattern (regular expression):

`Hello (?<recipient>[^,]+),\s+\*(?<action>[^*]+?)\*\s+Name(?:[^:]+?): (?<name>[^\n]+)\s+Email: (?<email>[^\n]+)\s+Date: (?<date>[^\n]+)\s+Sub-Account record ID: (?<id>[^\n]+)(?:\s*|$)`

### Proof

[https://regex101.com/r/QHA2Ze](https://regex101.com/r/QHA2Ze)

### Important Info

- ⚠ **Global match** must be set to **NO**!

# Screenshot

 ![Screenshot_2024-04-19_230458 (2)](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/4/0/4039657c6085645c8355898f005903558d04f0ec.png)

# Output

 ![Screenshot_2024-04-19_230441](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/d/2d8ccddb7e173b112fcfc7e0f2055d78d3ea31db.png)

* * *

For more information, see [Text Parser](https://www.make.com/en/help/tools/text-parser) in the Make Help Center:

> **Match Pattern**  
> The **Match pattern** module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.
> 
> - The complete list of metacharacters can be found on the [MDN web docs website](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).
> - For a tutorial on how to create regular expressions, we recommend the [RegexOne website](https://regexone.com/).
> - For an easy, quick regex generator, try the [Regular Expressions generator](https://regex-generator.olafneumann.org/).
> - For experimenting with regular expressions, we recommend the [regular expressions 101 website](https://regex101.com/). Just make sure to tick the ECMAScript (JavaScript) FLAVOR in the left panel.

Hope this helps!

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

---

<div class="post-metadata">

### Author: ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)
#### Post date: [May 3, 2024, 5:04pm UTC](https://community.make.com/t/get-text-parts-from-received-emails-and-use-them-as-a-mappable-answers/34396/7 "2024-05-03T17:04:04Z")

</div>


