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 / Power Automate: Insert...
Power Automate
Answered

Power Automate: Insert image from a SharePoint list into a field for a Microsoft template

(0) ShareShare
ReportReport
Posted on by 81

Every day several people will walk a process line at our site and complete audits.  The results of these audits are saved to a SharePoint list and then with a Power Automate flow that triggers on item (Audit) created/update.  If the audit is complete the information is copied into a word template and emailed out to the necessary parties.

 

The issue I am having is including the SharePoint list image into the word template.  The error I continue to see is the file is not of type jpeg or png.  The forum I found on this is here:

How to: Add images to a Word Template using MS Flow (bythedevs.com)

It seems to align with what is said on Microsoft's Documentation. Word Online (Business) - Connectors | Microsoft Learn

 

The only difference I can see is that my file content comes from the SharePoint "get file content" rather than the one drive "get file content". I can successfully embed the image in an email so I can at least verify that the SharePoint "get file content" is successful, but I can't put it in the word template.

 

Does anyone know the method to do this?  

Categories:
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @ce_PowerPlay 

    Construct a compose and add the below mapping

     

    {
    "$content-type": "image/jpeg",
    "$content": " SharePoint Image encoded blob"
    }

     

    Finally map the output compose to your word template.

     

  • CE-16101943-0 Profile Picture
    81 on at

    I created an object variable and set the value, but no change.  One thing I do notice is that for the word template field under dynamic options the object variable is not present.  

    ce_PowerPlay_0-1691838241413.png

    ce_PowerPlay_1-1691838585742.png

     

     

  • Verified answer
    CE-16101943-0 Profile Picture
    81 on at

    I was able to work out the solution.  As you said I had to construct a "compose" not "set variable".  The only additional action I had to do was convert the file content to a base64 encoded string.  To summarize the full solution of taking a SharePoint list image and using it in a Microsoft word template:

    1. Review this forums step by step instructions on how to get an image from a SharePoint list: Get SharePoint List Image in Power Automate - Torben Pedersen

    2. Once you have the image file content construct a compose as SudeepGhatakNZ said. The base64 function looks like this-> base64(body('Get_file_content'))

    ce_PowerPlay_0-1691848306460.png

    3. Put the compose output into the Microsoft Image Field.

    ce_PowerPlay_1-1691848487788.png

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 237 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 194

Last 30 days Overall leaderboard