Skip to main content

Notifications

Community site session details

Community site session details

Session Id : HIf2tr7EdYUTFZ0pf4HSO0
Power Automate - General Discussion
Answered

Unable to get the correct email body when using When a new email arrives (V3)

Like (1) ShareShare
ReportReport
Posted on 16 Oct 2023 12:44:24 by 29

Hello, need help to understand why i can't get the correct email body with email address from the email i received in Outlook. This is how the email looks like in Outlook.

Georgia_H_0-1697459463745.png

This is the flow Image A: I need to extract the requestor email address from the email received in Outlook. But when i download the Output in "When a new email arrives V3" the below is what i see. See Image B:

Image A:

Georgia_H_1-1697459566080.png

Image B:This is what i see in the Output of When a new email arrives V3. There's no email being captured. The content changed from what i see in Outlook.

Georgia_H_2-1697459868906.png

Please, can anyone help to enlighten me on this issue? Which step did i do wrongIy. I have been struggling for a week now.

  • Verified answer
    Georgia_H Profile Picture
    29 on 19 Oct 2023 at 01:47:22
    Re: Unable to get the correct email body when using When a new email arrives (V3)

    Yes, you are right. There's no email address at all. That is very strange because from Outlook i could see the email address. See snippet.

    As a workaround, I have tried the first approach by Search for User V2. I managed to resolve the issue for now. Many thanks for your suggestion. Kudos to you 😊

    Georgia_H_0-1697679512332.png

     

  • Verified answer
    VictorIvanidze Profile Picture
    12,216 on 18 Oct 2023 at 15:07:40
    Re: Unable to get the correct email body when using When a new email arrives (V3)

    There is no requestor email address at all. 

    1) (Dirty method) You can retrieve the address by user name from the Active directory

    2) To suggest something else I have to have the whole access request message. Could you send it to test1(at)testivasoft.com ?

  • Georgia_H Profile Picture
    29 on 18 Oct 2023 at 08:26:12
    Re: Unable to get the correct email body when using When a new email arrives (V3)

    Here you go.

  • VictorIvanidze Profile Picture
    12,216 on 17 Oct 2023 at 09:47:55
    Re: Unable to get the correct email body when using When a new email arrives (V3)

    Please show the full body part:

    "body":"<html etc. 

  • Georgia_H Profile Picture
    29 on 17 Oct 2023 at 02:17:57
    Re: Unable to get the correct email body when using When a new email arrives (V3)

    Thanks Tom for the checking. Unfortunately my issue is different.

    What is see in Outlook email is not what is translated in Power Automate using "When a new email arrives (V3)".

     

    This is the email i received in Outlook: There's an email address from the requester Manu.

    Georgia_H_0-1697508765837.png

    This is what i see in the Output of "When a new email arrives V3" in Power Automate. No longer see the email address of Manu. Hence the "get Requester email" step could not find any email.

    Georgia_H_0-1697508991323.png

    I need help to understand why the format changed.

     

     

     

  • trice602 Profile Picture
    13,768 Super User 2025 Season 1 on 16 Oct 2023 at 13:26:47
    Re: Unable to get the correct email body when using When a new email arrives (V3)

    Hi @Georgia_H ,

     

    I modified my flow with an edit in case didn't see the modified version.  The report title may need some help because in testing I didn't have the buttons, but I think the framework will help you keep going; you may need to modify the last indexof().

     

     

     

     

  • trice602 Profile Picture
    13,768 Super User 2025 Season 1 on 16 Oct 2023 at 13:02:54
    Re: Unable to get the correct email body when using When a new email arrives (V3)

    Hi @Georgia_H ,

     

    Here's the flow finding the starting position of characters using indexof() and then using substring() to get the desired text.

     

    trice602_0-1697462173635.png

     

     

    Compose // find the first "(" plus 1

     

    add(indexOf(body('Html_to_text'), '('),1) 

     

    Compose 5 // find the ")"

     

    indexOf(body('Html_to_text'), ')')
     
    Compose 6 // get the email adddress
     
    substring(body('Html_to_text'), outputs('Compose'), sub(outputs('Compose_5'), outputs('Compose')))
     
    Compose 2 // find "Power BI Report" plus 16
     
    add(indexOf(body('Html_to_text'),'Power BI Report'),16)
     
    Compose 3 // find "Manage in Power BI"
     
    indexOf(body('Html_to_text'),'Manage in Power BI')
     
    Compose 4 // get report title
     
    substring(body('Html_to_text'),outputs('Compose_2'),sub(outputs('Compose_3'),outputs('Compose_2')))
     
    trice602_1-1697462455034.png

     

    trice602_2-1697462479177.png

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,786 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard
Loading started