# Finding an email address within an email

**URL:** https://community.make.com/t/finding-an-email-address-within-an-email/38133
**Category:** Questions
**Tags:** email, text-parser
**Created:** [May 20, 2024, 3:26pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133 "2024-05-20T15:26:33Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Ian\_Kerry](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/ian_kerry/32/9096_2.png) [@Ian\_Kerry](https://community.make.com/u/Ian_Kerry)
#### Post date: [May 20, 2024, 3:26pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/1 "2024-05-20T15:26:33Z")

</div>

Hi there,

We get a lot of theatre companies emailing us with details of their new show. It takes a lot of time to personally reply to these, and we now have a system whereby they can “apply” to us by filling in some forms.

So I want to be able to email each company and tell them what they need to do.

Trouble is, that they often email someone in our small organisation, so what I would like to be able to do is:

For anyone in our organisation to be able to send any email they receive from a company to an email address [tourto@ouremail.com](mailto:tourto@ouremail.com)

I would like my scenario to monitor this address and for each new email to find who the original sender was (so NOT the person who forwarded it.

So typically the email arrives at the tourto email address like this:

---------- Forwarded message ---------  
From: **Gemma XXX** \<[yyyy@gmail.com](mailto:yyyy@gmail.com)\>  
Date: Thu, 25 Jan 2024 at 11:24  
Subject: 2024 tour: miniature puppet & folk music show! Ideal for festivals and small settings!

I would like to capture that [yyyy@gmail.com](mailto:yyyy@gmail.com) and get my scenario to send the email from us, to that address.

I am trying to use the Text Parser to achieve this, but it isn’t working.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/a/1/a1d0e880038b43f2e912c6a9399cb90f9d8b873a.png)

Can anyone offer some guidance please?

Thanks  
Ian

---

<div class="post-metadata">

### Author: ![Ian\_Kerry](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/ian_kerry/32/9096_2.png) [@Ian\_Kerry](https://community.make.com/u/Ian_Kerry)
#### Post date: [May 20, 2024, 3:45pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/2 "2024-05-20T15:45:09Z")

</div>

I have also tried the text parser:

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

but it doesnt return any email address.

Ian

---

<div class="post-metadata">

### Author: ![Donald\_Mitchell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/donald_mitchell/32/8749_2.png) [@Donald\_Mitchell](https://community.make.com/u/Donald_Mitchell)
#### Post date: [May 20, 2024, 6:08pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/3 "2024-05-20T18:08:54Z")

</div>

Hello @Ian_Kerry,  
You could try Text Parser Match Pattern with settings something like this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/9/f9e3ff5caa6a66c87903c1db622031d324e0e825.png)

I’m not the best at RegEx, but the pattern is:

```auto
^From: [\w\s]*<((?:[\w\d]*)@ouremail\.com)>$

```

You would run this on the Gmail’s `text` output.

Edit: Disregard all that, I read this wrong.

Edit2: Maybe you can use that, just with a slightly different RegEx:  
`^From: .* <([\w\.-]+@[\w\.-]+\.[\w]+)>$`

---

<div class="post-metadata">

### Author: ![Ian\_Kerry](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/ian_kerry/32/9096_2.png) [@Ian\_Kerry](https://community.make.com/u/Ian_Kerry)
#### Post date: [May 22, 2024, 2:26pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/4 "2024-05-22T14:26:12Z")

</div>

Hi Donald, many thanks for replying and sorry for the delay in replying.

I can’t seem to get that to work. This is what I hav eput in:

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

and this is the result

![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/3/73412101ddfc39d3ffebbb055ee7108489019f0f.png)

and just checking but i am of course not after who this email is from, but whose email is in the text of the email - the original sender.

Any thoughts?

thanks

ian

---

<div class="post-metadata">

### Author: ![Donald\_Mitchell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/donald_mitchell/32/8749_2.png) [@Donald\_Mitchell](https://community.make.com/u/Donald_Mitchell)
#### Post date: [May 22, 2024, 10:36pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/5 "2024-05-22T22:36:56Z")

</div>

Hello @Ian_Kerry,

From your Gmail module #1, you’ll need to locate the “text content” object and click and drag that into the Text field in your Text parser module. The Text field should not contain static text, it should contain the object which contains the text you’re searching.  
The regular expression/pattern is designed to pull out the from the first line that starts with “From:”.

---

<div class="post-metadata">

### Author: ![Ian\_Kerry](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/ian_kerry/32/9096_2.png) [@Ian\_Kerry](https://community.make.com/u/Ian_Kerry)
#### Post date: [May 23, 2024, 8:36am UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/6 "2024-05-23T08:36:15Z")

</div>

Hi Donald, I don’t know if I am being thick, but this is all i see in the Gmail Module 1#

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

No text content field.

I am beginning to feel I am out of my depth with this scenario.

Ian

---

<div class="post-metadata">

### Author: ![Donald\_Mitchell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/donald_mitchell/32/8749_2.png) [@Donald\_Mitchell](https://community.make.com/u/Donald_Mitchell)
#### Post date: [May 23, 2024, 7:24pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/7 "2024-05-23T19:24:01Z")

</div>

Hi @Ian_Kerry,

I’m sorry, maybe I just was not clear.  
It’s the output of the Gmail module after it runs, that contains the Text Content amongst all the other information, like who the email is From, etc…

The “Text Content” output needs to be mapped in to the Text field of the Text Parser module. Once mapped it should look like “1.text” (text is the underlying name of that output field) and will be colored.

---

<div class="post-metadata">

### Author: ![Ian\_Kerry](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/ian_kerry/32/9096_2.png) [@Ian\_Kerry](https://community.make.com/u/Ian_Kerry)
#### Post date: [May 24, 2024, 3:35pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/8 "2024-05-24T15:35:28Z")

</div>

Ah I think I see:

 ![Untitled](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/4/1/41274abc06bb03d33f7047807897bf0cc04c298f.png)

So in my text parsar I now have this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/4/4/446d6c07da8479813e54930930931768614fc954.png)

but i get an error

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

Am I getting close? I am not really good at this so feel free to spell it out as if talking to a child!

Thanks again,

Ian

---

<div class="post-metadata">

### Author: ![Ian\_Kerry](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/ian_kerry/32/9096_2.png) [@Ian\_Kerry](https://community.make.com/u/Ian_Kerry)
#### Post date: [May 24, 2024, 3:51pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/9 "2024-05-24T15:51:48Z")

</div>

Ah I have made some headway!

I used the same parsar as you said in the beginning.

i put the 1.TextContent from the first gmail module in the Text field of the Text parsar and the pattern you suggested (^From: .\* \<([\w.-]+@[\w.-]+.[\w]+)\>$) into the pattern field.

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

and it worked!

Thanks for all your help, Donald

Ian

---

<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: [June 7, 2024, 4:04pm UTC](https://community.make.com/t/finding-an-email-address-within-an-email/38133/10 "2024-06-07T16:04:03Z")

</div>


