Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Retrieve Image from Sharepont to Embed in Outlook email

(0) ShareShare
ReportReport
Posted on by 15

Hello,

 

I am trying to create a Power Automate flow to retrieve an image from Sharepoint and embed the image in an email:

 

Flow.PNG

 

The Parse JSON 2 shows the location of the image but my flow continues to fail on the Get File Content step with 'File not Found:'

 {
"type": "thumbnail",
"fileName": "b0d1d2a7-2dcb-49bb-8bc4-a27854194e6e.jpeg",
"fieldName": "DeskLocation",
"serverUrl": "https://pathward.sharepoint.com",
"serverRelativeUrl": "/sites/companyname/SiteAssets/Lists/031fd855-ab73-4f5c-8220-8c7bffe4e559/b0d1d2a7-2dcb-49bb-8bc4-a27854194e6e.jpeg",
"id": "a54d2df7-9423-4bdc-968e-6e9e8e6ca20f"
}

 

I've also tried to Get File Using Path but no luck there either. Here is an image of the folder location:

Map.PNG

I attempted to create an encodeUriComponent but still a no go:  encodeUriComponent(replace(body('Parse_JSON_2')?['serverRelativeUrl'],'/sites/companyname/SiteAssets/Lists/031fd855-ab73-4f5c-8220-8c7bffe4e559/',''))

 

Can someone please take a look to see why Power Automate is not finding the '031fd855-ab73-4f5c-8220-8c7bffe4e559' reference folder?

 

Thanks

Categories:
  • Verified answer
    David_MA Profile Picture
    10,607 Super User 2025 Season 1 on at
    Re: Retrieve Image from Sharepont to Embed in Outlook email

    I am not sure if it is that or something else, but the error message would seem to indicate that it is. I would check your permissions on the site where you are pulling in the image from. Maybe you only have view access, which would prevent downloading the file.

  • gcorprew Profile Picture
    15 on at
    Re: Retrieve Image from Sharepont to Embed in Outlook email

    Thanks David. I was able to Get File Content using Path to work. Now I'm receiving error message:

     

    Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    clientRequestId: 03dde239-8ac9-44db-89bf-864f47ea6bc5
    serviceRequestId: 03dde239-8ac9-44db-89bf-864f47ea6bc5

     

    Is this a Permissions issue?

  • David_MA Profile Picture
    10,607 Super User 2025 Season 1 on at
    Re: Retrieve Image from Sharepont to Embed in Outlook email

    I would try it by using Get file content using path. You can then use a compose action to generate the html expression for using a base64 image. Note, be sure to specify the correct image type in the string

    David_MA_0-1679687955984.png

    The expression in the above action is, is inserted after the comma and before the quote:

     

     

    base64(outputs('Get_file_content_using_path')?['body'])

     

     

    Then put your e-mail message in HTML mode and put the output of the compose action where you want the image inserted. You can also just put the above in the e-mail where the image needs to go as well.

     

    As a reference: How to Display Base64 Images in HTML (w3docs.com)

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow