web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Forwarding an email attachment to a recipient from text string

(0) ShareShare
ReportReport
Posted on by

Hello,

 

TLDR: Can't figure out how to forward email attachment to a new recipient. I only have 1 day of experience using MS Flow. 


I am trying to create an automated flow which extracts an email address from the body of an email, and then forwards the attachment on the original email to said person. I am having two issues: 

 

Issue#1 - I am using the "SPLIT" expression to locate the email address that is in the body of my email (see HTML code below).

After several expressions that should leave me with only the email address

 

  • last(split(variables('Email Body'),'<td colspan="2">SID - Submitter ID </td>'))
  • split(variables('EmailStep1'),'<td colspan="2">')
  • first(split(variables('EmailStep2'),'&nbsp;'))

"<tr>

<td colspan="2">SID - Submitter ID </td>

<td colspan="2">connor.riley@123.com &nbsp; </td>

</tr>"

 

Eventually, (no matter what i do) i end up with something similar to this screenshot below.
Any recommendations? - Am i using the wrong method to extract the email? 
 

Annotation 2019-10-20 202932.jpg

 

Issue#2 - I'm not sure what function i can use to get my attachment from the original email.

I see a funciton to "get attachment" from an email, but it requires an Email ID which i am not sure how to find. 

 

MS Flow Overview.png

I have the same question (0)
  • Gristy Profile Picture
    2,429 on at
    Re: Forwarding an email attachment to a recipient from text string

    Look at the dynamic data returned from the trigger.

     

    It will hav ethe ID you need for the attachment action.

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Forwarding an email attachment to a recipient from text string

    Hi @jujernigan,

     

    Please refer to these steps to process your HTML content into an Email Address array:

    1. Initialize an array variable named EmailAddress.

    2. Convert the HTML content into text.

    3. Use Split function to create array, I choose blank character as a delimiter in there.

    4. Put the output of the Split function (it is an array) into the Apply to each action, then create a condition to determine the member whether having "@123.com", if it has, append it into the EmailAddress array.

    5. You can use the compose in the end to check the array, hope it helps.

    Annotation 2019-10-22 162132.png

     

    Annotation 2019-10-22 162152.png

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-litu-msft Profile Picture
    on at
    Re: Forwarding an email attachment to a recipient from text string

    Hi @jujernigan,

     

    Has your problem been solved?
    If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

    Best Regards,
    Community Support Team _ Lin Tu

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard