cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vradley
Frequent Visitor

Getting original email address from an email that has been forwarded

Hello,

 

I am creating a flow where the trigger is "When an email arrives". The email which arrives will be a "forward" from a shared mailbox. What I am trying to do is creating a New Bucket on Planner which has as a name the original email address of the email which is being forwarded. 

 

To clarify, I am not able to use the  "from" of the dynamic content because this will always be the address of the Shared Mailbox I am forwarding the email from. The address I would like to obtain is actually in the body of the forwarded email and it is straight after the "From:" in the email being forwarded.  Is there anyway of purely extracting this?

 

Thank you.  

1 ACCEPTED SOLUTION

Accepted Solutions
manuelstgomes
Community Champion
Community Champion

Hi @vradley 

 

Yes, but since we don't have any Regular Expressions, we need to improvise.

 

We can split the text in 2. What comes before the "from: " and what comes after the first space after. For example:

 

afsdfasdfasd from: email@gmail.com asdfasd fasdfa sdfas dfasd f

 

if you do a split:

 

split(variable, "from: ")

 

You'll get an array with 2 parts

 

afsdfasdfasd from:

 

 

email@gmail.com asdfasd fasdfa sdfas dfasd f

 

Now let's ignore the first part and check the second:

split(split(variable?[1], 'from: '), ' ')

 

Now you'll get:

email@gmail.com
 asdfasd fasdfa sdfas dfasd f

 

Now let's ignore the second part.

split(split(variable?[1], 'from: '), ' ')?[0]

 

If all goes well you should find an email there.

 

Do all the steps in individual "Compose" actions to see what comes out from each step and correct accordignly.

 

Can you please check if and let me know if you have any questions?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

 

View solution in original post

1 REPLY 1
manuelstgomes
Community Champion
Community Champion

Hi @vradley 

 

Yes, but since we don't have any Regular Expressions, we need to improvise.

 

We can split the text in 2. What comes before the "from: " and what comes after the first space after. For example:

 

afsdfasdfasd from: email@gmail.com asdfasd fasdfa sdfas dfasd f

 

if you do a split:

 

split(variable, "from: ")

 

You'll get an array with 2 parts

 

afsdfasdfasd from:

 

 

email@gmail.com asdfasd fasdfa sdfas dfasd f

 

Now let's ignore the first part and check the second:

split(split(variable?[1], 'from: '), ' ')

 

Now you'll get:

email@gmail.com
 asdfasd fasdfa sdfas dfasd f

 

Now let's ignore the second part.

split(split(variable?[1], 'from: '), ' ')?[0]

 

If all goes well you should find an email there.

 

Do all the steps in individual "Compose" actions to see what comes out from each step and correct accordignly.

 

Can you please check if and let me know if you have any questions?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,996)