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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract email address ...
Power Automate
Answered

Extract email address from body of an ShareCenter Notification email body

(1) ShareShare
ReportReport
Posted on by 29
Good day,
I am trying to build a cloud flow so what I am trying to achieve is to:
 
 
1. ShareCenter Notification Email arrives to your mailbox > Flow reads an email and look for email address inside an email body > send a MS Teams Reminder to the person mentioned in the email body including some details mentioned in the email body. 

An example of an email:

From: notifications@mail.XXXeim.com
Subject: H00000-AST-0001 - COMPLETED - H00000 - Document Name

 

Assist Details

Title

Document Name

Number of Documents

1

Number

H00000-AST-0001

Support Coordinator

xxxxxx

 

Assist Links

Assist Workflow Link (hyperlink in the email)

Access the Assist Workflow

Document Set Link 

Access the Document Set

Support Link 

Access Support Materials for the Assist Workflow


I assume it would be 'Html to Text' which I should use however I am not sure how. 

Once the email address is extracted, I believe can then use the action 'Create a Chat' to add the person's email address in there as a dynamic content, then use the action 'Post message in a chat or channel' to add the conversation ID from the 'create a chat' in the group chat accordingly.

I have included the steps of the flow for your brief information. 

Thank you for your attention and help in advance!
Categories:
I have the same question (0)
  • HG123 Profile Picture
    29 on at

    Sorry the email body did not show the workflow initiator please refer to the following email body instead:

    From: notifications@mail.XXXeim.com
    Subject: H00000-AST-0001 - COMPLETED - H00000 - Sample Document Name

    ASSIST

    Assist Number

    H00000-AST-0001

    Assist Title

    Sample Document Name

    Workflow Action

    Approved by Rose, Sandra

    Due Date

    2024-04-10

    Workflow Initiator

    Smith, John

     <john.smith@companyname.com>

     

    Assist Type

    DM Assistance Required

     

     

     

    Assist Details

    Title

    Sample Document Name

    Number of Documents

    1

    Number

    H00000-AST-0001

     

    Support Coordinator

    xxxxxx

     

    Assist Links

    Assist Workflow Link

    Access the Assist Workflow

    Document Set Link

    Access the Document Set

    Support Link

    Access Support Materials for the Assist Workflow

     

    Thanks again for your attention and help in advance!

     

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @HG123 

     

    SudeepGhatakNZ_0-1712547465215.png

     

    SudeepGhatakNZ_1-1712547561918.png

     

  • HG123 Profile Picture
    29 on at

    Good day Sudeep,

     

    Many apologies that I might not have clearly explained in my previous posts that, the "Workflow Initiator"'s name, hence the workflow initiator's email address on the ShareCenter Notification email is different for each email, so john.smith@companyemail.com is just a sample and this field changes all the time. 

     

    If we are still using the 'initialise variable', would it be possible if can please advise the 'type' and 'value' for that?

     

    Thank you!

     

     

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Hi @HG123 ,

    The variable type is String and it is initially blank.

    The email is extracted using expressions, so it should work for other emails too

     

  • HG123 Profile Picture
    29 on at

    Would you mind to also share the detailed screenshot of the following steps:

     

    'Set Variable'

    'Compose' (second last step)

    & 'Compose Copy'?

     

    Thank you very much!

  • HG123 Profile Picture
    29 on at

    I also tried to do the apply to each step as shown in the screenshot for some reason it shows the above error. 

     

    Thanks. 

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Provide the output of HTML to text action inside the Set variable action

     

  • Verified answer
    HG123 Profile Picture
    29 on at

    As a solution I searched some more posts on this forum and tried using the following Expression to strip the email address with hyperlink and it worked: 

    trim(first(split(last(split(body('Html_to_text'),'<')),'[https://can01.safelinks.protection.outlook.com')))
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard