Jun 22, 2020

Power Automate Get File Content - Displaying Images in flow email body from SharePoint though users dont have access to them

Hi,

Recently I got a requirement to build a scheduled flow (Power Automate) which sends emails to users to work on some tasks before they attend a training. That email body contains few images which were stored in a SharePoint Picture Library.

Issue : Images are not displayed to end users as they were not having access on the SharePoint site. One solution for this problem is, giving read access to all users (every one) on the site or at least on the picture library by breaking the permissions from parent. But due to some policy issues, we are not allowed to do that.

 So because of that when i am referring them with complete image path,  users are unable to see the images in the email .
<img src="https://mysharepointsite.com/TrainingMedia/PreworkSchedule.png" alt="img_training" / >
To overcome this issue, do the following
Resolution : Get the file content in flow and use it in email body.
Here are the steps to do that.
Using Get File Content Activity, browse the image

Then use this File Content in Send Email Activity ( To view the Attachment option, Click on "Show Advanced  Options" )
 [Updated Note ] : This is tested in M365 Desktop outlook client ( 16.0.xxxxx) and Mobile outlook client. But few users complained that, images are rendering as attachments instead in body. So it seems, this functionality depends on settings of how your outlook is configured.

No comments:

Post a Comment