Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Get Email Body in the Notification

(0) ShareShare
ReportReport
Posted on by 8

Need your help here guys, please !

Gtelles_0-1661196416925.png

Gtelles_2-1661196481680.png

{
"type": "AdaptiveCard",
"body": [
{
"type": "Image",
"type": "TextBlock",
"text": "DOW Pager - Duty Manager",
"size": "Large",
"color": "Accent",
"style": "heading",
"wrap": true,
"horizontalAlignment": "Left",
"height": "stretch"
},
{
"type": "TextBlock",
"text": "@{triggerOutputs()?['body/body']}",
"isSubtle": true,
"wrap": true
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}

I've tried every possible way to get the email body, it worked before but stopped, no change.

This is the error:
{
"error": {
"code": "InvalidJsonInBotAdaptiveCard",
"message": "Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: The specified Teams flowbot adaptive card request is missing or invalid. The tracking Id is '{0}'. ---> Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: C. Path 'body[1].text', line 18, position 18.\r\n at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)\r\n at Newtonsoft.Json.JsonTextReader.Read()\r\n at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)\r\n at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)\r\n at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)\r\n at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)\r\n at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions)\r\n --- End of inner exception stack trace ---\r\n at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions)\r\n at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity)"
}
}


 

If i change "Body" for Subject, it works. Idk what to do.

 

  • Gtelles Profile Picture
    8 on at
    Re: Get Email Body in the Notification

    I made it with that ! Sucess!  Result:

    Gtelles_0-1661538173290.png

     

    {
     "type": "AdaptiveCard",
     "body": [
     {
     "type": "Image",
     "type": "TextBlock",
     "text": "DOW Pager - Duty Manager",
     "size": "Large",
     "color": "Accent",
     "style": "heading",
     "wrap": true,
     "horizontalAlignment": "Left",
     "height": "stretch"
     },
     {
     "type": "TextBlock",
     "text": "@{substring(body('html_to_text'),add(lastIndexOf(body('html_to_text'),']'),14),940)}",
     "isSubtle": true,
     "wrap": true
     }
     ],
     "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
     "version": "1.2"
    }

    Normally the Summary and Impact system comes duplicated, is there any chance to remove the field "Impact system" and keep the rest ?

  • Gtelles Profile Picture
    8 on at
    Re: Get Email Body in the Notification

    It works my Friend !! Thank you so much !

    After your recommendation the notification came the way I needed it! One more thing, I can get this information coming the most (Bold in the example)

    Gtelles_1-1661514293343.png

    ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd Please click here to acknowledge receipt of this message ["https://urldefense.proofpoint.com/v2/url?u=https-3A__neconfirm.everbridge.net_email_63035e169b7cce18a69c5bfb-3FinstanceId-3DNE12-26broadcastId-3D63035e1305bc0a33a62fec68-26language-3Den-2DUS&d=DwMFaQ&c=cCoa5WWAB7EEETJScYfkXg&r=LJB9XvASRECUjfqqkS0A0G9k27pKKchznT07WPDLByI&m=G6luy8oC3CaPH5SuDysOWyg1Adh9lSK7uNF_8ZxUK8LuxgILK86Ku5hu9ZNIynv8&s=tTxQm0XzsWec3ZcW41Ex-COV6qdNmRR5DbphhhrEB9Q&e="]

    The IBM Duty Manager attendance is required on a Major Incident conference line.

    Please join the conference call in progress to discuss Incident Ticket INCXXXX.

    Summary of Issue: Users not able to access report Bookmarks

    Impacted Systems: Users not able to access report Bookmarks.

    WebEx Conference Bridge: https://teams.microsoft.com/l/meetup-join/19:meeting_MTBhM2Q5MjAtM2VjYi00MDEwLWI3YTQtOGYxZGNhZDViNjY5@thread.v2/0?context=%7B%22Tid%22:%22c3e32f53-cb7f-4809-968d-1cc4ccc785fe%22,%22Oid%22:%22da8c94f4-1a7e-478e-8880-e771a5535692%22%7D ["https://urldefense.proofpoint.com/v2/url?u=https-3A__teams.microsoft.com_l_meetup-2Djoin_19-3Ameeting-5FMTBhM2Q5MjAtM2VjYi00MDEwLWI3YTQtOGYxZGNhZDViNjY5-40thread.v2_0-3Fcontext-3D-257B-2522Tid-2522-3A-2522c3e32f53-2Dcb7f-2D4809-2D968d-2D1cc4ccc785fe-2522-2C-2522Oid-2522-3A-2522da8c94f4-2D1a7e-2D478e-2D8880-2De771a5535692-2522-257D&d=DwQFaQ&c=cCoa5WWAB7EEETJScYfkXg&r=LJB9XvASRECUjfqqkS0A0G9k27pKKchznT07WPDLByI&m=G6luy8oC3CaPH5SuDysOWyg1Adh9lSK7uNF_8ZxUK8LuxgILK86Ku5hu9ZNIynv8&s=_POlxlaGznL_oG4scE0ekhDVlKNT4No83oty4pIBAl8&e="]

     

     

  • Gtelles Profile Picture
    8 on at
    Re: Get Email Body in the Notification

    I already got this adaptive ready, I didn't develop it, so I was trying to adjust.

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at
    Re: Get Email Body in the Notification

    Hi @Gtelles ,

     

    I found that you used an action 'Html to text'. Why do you still use html(Body) in your adaptive card? I guess that you want to use the output of 'Html to text' action. 

    vxiaochenmsft_0-1661482009985.png

     

    Best Regards,

    Wearsky

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,708 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,030 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow