cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Insert images on Outlook email through OneDrive

Hello All,

 

I'm trying to email reports to clients using charts as images. The images are hosted in OneDrive and I have tried to insert them by two different methods listed below. For retrieving the content I'm using Get File content using path 

 

 

1. base64 encoding: 

 

<img src=concat('data&colon;image/png;charset=utf-8;base64,',base64(body('Get_file_content_using_path'))) />
 
Notes: Works well in Outlook mobile and app but it doesn't work in Outlook desktop.Gmail as well doesn't support very well.
 

 

2. Attachment link:

Using the attachment as a source of the image.

 

 

<img width="80%" src=1234.png />

 

 

In the email configuration:

 i1.png

Notes: Works well in Outlook desktop, doesn't work well in Outlook mobile, app or gmail.

 

------------------------------------------------------------------------------------------------------------------------

 

As a side note, I don't want to use URL images, because it makes the process more prone to errors. At the time I'm generating images through R and placing in OneDrive folder, called images.

 

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Insert images on Outlook email through OneDrive

Hi @ acanepa,

 

Could you please share a screenshot of the configuration of your flow?

 

 

I have made a test on my side,and I have made a test use the base64 encoding to send the email with images, however, the images in the my outlook in computer would be a red "x" as screenshot below:

 

Capture.PNG

I couldn't install the outlook in my mobile so I couldn't test it on my mobile.

 

Please share more screenshot and details so we could provide a proper workaround for you.

 

 

Regards,
Alice Zhang

Anonymous
Not applicable

Re: Insert images on Outlook email through OneDrive

Hello @v-yuazh-msft

 

Thanks for your response. Here is my flow:

 

  • Get rows: Retrieving site list
    • Loop
      • Get file content from Onedrive using the name of the site. (There two because I'm pulling two images).
      • Send the email: I'm testing the two ways of showing the image, as I said earlier the first IMG tag shows the image for Outlook desktop users.  The second method only works for Outlook mobile, doesn't work in Gmail (any platform) or Outlook Desktop.

flow1.png

Note: The attachment only works for the first link (<img src=sitename.png>)

 

The code generated by the email, copied into an HTML previewer works well for base64 code.

 

flow2.png

 

I start to wonder that none of this two methods are good to display images.

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,848)