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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extract images embebed...
Power Automate
Unanswered

Extract images embebed in body mail - transform to base64

(0) ShareShare
ReportReport
Posted on by

Hello, 

 

I'm facing the next issue:

 

A Power Automate flow creates records when an email arrives. The body of that email is saved as HTML text in a Dataverse table. After that, I need to show that email in a canvas app, using a RichTextEditor. If the body has an screenshot or an icon (not attached, in the body of the email) is not display in the control. 

 

I thought that a solution could be to extract the text image from the body and transform it to base64. My problem is that the images are randomly placed into the body. Does anybody know how I could do that in Power Automate?

 

One outoput example is: 

 

{

    "headers": {

      "Cache-Control": "no-store, no-cache",

      "Pragma": "no-cache",

      "Transfer-Encoding": "chunked",

      "Location": "https://flow-apim-europe-002-westeurope-01.azure-apim.net/",

      "Retry-After": "15",

      "Vary": "Accept-Encoding",

      "Set-Cookie": "",

      "Strict-Transport-Security": "max-age=; includeSubDomains",

      "x-ms-request-id": "",

      "X-Content-Type-Options": "nosniff",

      "X-Frame-Options": "DENY",

      "x-ms-environment-id": "",

      "Timing-Allow-Origin": "*",

      "x-ms-apihub-cached-response": "true",

      "x-ms-apihub-obo": "false",

      "Date": "Tue, 03 Oct 2023 15:29:54 GMT",

      "Content-Type": "application/json; charset=utf-8",

      "Expires": "-1"

    },

    "body": {

      "id": "",

      "receivedDateTime": "2023-10-03T15:29:12+00:00",

      "hasAttachments": false,

      "internetMessageId": "<.eurprd04.prod.outlook.com>",

      "subject": "Example screenshot body mail",

      "bodyPreview": "This is an example of how the pics in the body are not shown.",

      "importance": "normal",

      "conversationId": "",

      "isRead": false,

      "isHtml": true,

      "body": "<html><head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><style type=\"text/css\" style=\"display:none\">\r\n<!--\r\np\r\n\t{margin-top:0;\r\n\tmargin-bottom:0}\r\n-->\r\n</style></head><body dir=\"ltr\"><div class=\"elementToProof\" style=\"font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)\"><span style=\"font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)\">This is an example of how the pics in the body are not shown.&nbsp;</span><br></div><div class=\"elementToProof\" style=\"font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)\"><br></div><div class=\"elementToProof\" style=\"font-family:Arial,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)\"><img class=\"ContentPasted0 w-175 h-58\" size=\"2881\" data-outlook-trace=\"F:1|T:1\" src=\"cid:830b8fd6-aead-4bf2-b781-fd5106a35253\" style=\"max-width:100%\"><br></div></body></html>",

      "from": "",

      "toRecipients": "",

      "attachments": [

        {

          "@odata.type": "#microsoft.graph.fileAttachment",

          "id": "",

          "lastModifiedDateTime": "2023-10-03T15:29:11+00:00",

          "name": "image.png",

          "contentType": "image/png",

          "size": 3124,

          "isInline": true,

          "contentId": "",

          "contentBytes": "iVBORw0KGgoAAAANSUhEUgAAAK8AAAA6CAYAAADGOQmFAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABfaVRYdFNuaXBNZXRhZGF0YQAAAAAAeyJjbGlwUG9pbnRzIjpbeyJ4IjowLCJ5IjowfSx7IngiOjE3NSwieSI6MH0seyJ4IjoxNzUsInkiOjU4fSx7IngiOjAsInkiOjU4fV19iyrjMwAACmtJREFUeF7tmlWMFU0Wxw8yuLt+uHtw9wQSSEggPGCPOAs8wAMQAksIFiBIsCUEEhJsseAssri7u7u7s8vvcM98PZexyzADfad+Sed2962urq7616lzTneK/31DHA4fkjLw63D4Dideh29x4nX4Fideh29x4nX4Fideh29x4nX4Fideh29x4nX4Fideh29x4nX4Fideh29x4nX4lgR9Vfa6Q+nAXvxJkT2PZPzXbvnn1rSBM/EnY0Qu+Ufd0xIRkT1wxhGOpEiRQn/jkqazvA7f4sTr8C1OvA7f4sTriDfv3r2Ts2fPys6dO2X//v3y5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BeVQAAAABJRU5ErkJggg=="

        }

      ]

    }

  }

 Thank you

Categories:
I have the same question (0)
  • AlexEncodian Profile Picture
    4,409 Moderator on at

    @aorro933 

    You can put a condition for inline attachments to use them in the flow. Basically the opposite to this:

    Solved: Prevent flow to include inline attachments from em... - Power Platform Community (microsoft.com)

  • aorro933 Profile Picture
    on at

    Thank you so much. I wasn't aware of the "inline attachment" output. So I did a conditional for that and the pictures still not shown in the RichTextEditor of Power Apps. Do you know if I have to convert them to other format?

     

    Thanks 

  • VictorIvanidze Profile Picture
    13,079 on at

    Can you use another control (web browser? HTML viewer?) instead of RichTextEditor?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 612

#2
Valantis Profile Picture

Valantis 344

#3
11manish Profile Picture

11manish 326

Last 30 days Overall leaderboard