Skip to main content
Community site session details

Community site session details

Session Id : 8pOfiIpwTGo6XBd6mD/yOm
Power Automate - General Discussion
Unanswered

Base64 Image to Teams

Like (0) ShareShare
ReportReport
Posted on 19 Jul 2019 05:19:58 by

I was able to get this work in email perfectly, but I can't when posting to Teams. I have an output using HTML and the image coded in Base64 which does not seem to work in a Teams post. Everything else in the HTML does such as tables and formating. Is Base64 not supported in Teams maybe?

  • almardelacruz Profile Picture
    8 on 15 Mar 2024 at 02:09:42
    Re: Base64 Image to Teams

    What I did was create an action to create file then create a link to file, then use that link as output then add the output to your URL part in Adaptive card. 

     

    You can skip the create file if you already have the image link uploaded into sharepoint.

  • send2mark Profile Picture
    505 on 14 Aug 2020 at 18:00:05
    Re: Base64 Image to Teams

    I think there is a limit, but it isn't because of the card. I think there is a limit when using Base64. Does it work in an email?

  • anonymous7 Profile Picture
    7 on 14 Aug 2020 at 07:29:06
    Re: Base64 Image to Teams

    is there a limit for the size of the Image that is used in Adaptiv Cards? I'm using the Base64 in the Adaptive Card and with some Images I get the error message (285x254, 29,95KB) "HTTP request error: The content is not a valid JSON". 

    The Flow itself works and the JSON seems correct since it works with another image (1,45KB, 96x96).

  • CFernandes Profile Picture
    8,295 Most Valuable Professional on 10 Aug 2020 at 05:19:37
    Re: Base64 Image to Teams

    I am glad it is working with adaptive card. As this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. CHEERS!

  • send2mark Profile Picture
    505 on 10 Aug 2020 at 01:30:21
    Re: Base64 Image to Teams

    I got it working in another Tenant using the Adaptive card. Very cool!

  • send2mark Profile Picture
    505 on 10 Aug 2020 at 00:34:42
    Re: Base64 Image to Teams

    Looks like my copy blocked access to MS Graph, so I will have to try some other testing. Hopefully, I can get this to work. Thanks again for the idea.

  • send2mark Profile Picture
    505 on 10 Aug 2020 at 00:13:49
    Re: Base64 Image to Teams

    I really like this idea, but I don't think I can use Azure Blob Storage. It would be an additional cost and I don't think I could get it approved.

  • send2mark Profile Picture
    505 on 09 Aug 2020 at 23:58:23
    Re: Base64 Image to Teams

    I did a copy-paste of what you had and it is failing. Looks like a permissions issue to MS Graph? I have not worked with Adaptive cards yet, so I am really interested in what you are saying here.

  • CFernandes Profile Picture
    8,295 Most Valuable Professional on 08 Aug 2020 at 19:19:08
    Re: Base64 Image to Teams

    If you use Base64 directly in the Post message action the flow would not complain but in Teams you will have a broken image.

     

    The below will not work.

    CFernandes_1-1596914152457.png

     

    Workarounds:

     

    Use an image URL instead of Base64:

     

    CFernandes_2-1596914205151.png

     

    If you want use Base64 no matter what then you post an Adaptive card.

    CFernandes_3-1596914294597.png

     

     

    Sample below:

     

    {
    "type": "AdaptiveCard",
    "body": [
    {
    "type": "Image",
    "style": "Person",
    "url": "data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX9gUNKlj8wZAKUsAOzZz+UMAOsJAP/Z2ccMDA8PD/95eX5NWvsJCOVNQPtfX/8zM8+QePLl38MGBr8JCP+zs9myn/8GBqwpAP/GxgwJCPny78lzYLgjAJ8vAP9fX/+MjMUcAN8zM/9wcM8ZGcATEL+QePdZWf/29uc/P9cmJu9MTDImIN+/r7+/vz8/P8VNQGNugV8AAF9fX8swMNgTAFlDOICAgPNSUnNWSMQ5MBAQEJE3QPIGAM9AQMqGcG9vb6MhJsEdGM8vLx8fH98AANIWAMuQeL8fABkTEPPQ0OM5OSYdGFl5jo+Pj/+pqcsTE78wMFNGQLYmID4dGPvd3UBAQJmTkP+8vH9QUK+vr8ZWSHpzcJMmILdwcLOGcHRQUHxwcK9PT9DQ0O/v70w5MLypoG8wKOuwsP/g4P/Q0IcwKEswKMl8aJ9fX2xjdOtGRs/Pz+Dg4GImIP8gIH0sKEAwKKmTiKZ8aB/f39Ws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xaZwYA+JaoKQwswGijBV4C6SiTUmpphMspJx9unX4KaimjDv9aaXOEBteBqmuuxgEHoLX6Kqx+yXqqBANsgCtit4FWQAEkrNbpq7HSOmtwag5w57GrmlJBASEU18ADjUYb3ADTinIttsgSB1oJFfA63bduimuqKB1keqwUhoCSK374wbujvOSu4QG6UvxBRydcpKsav++Ca6G8A6Pr1x2kVMyHwsVxUALDq/krnrhPSOzXG1lUTIoffqGR7Goi2MAxbv6O2kEG56I7CSlRsEFKFVyovDJoIRTg7sugNRDGqCJzJgcKE0ywc0ELm6KBCCJo8DIPFeCWNGcyqNFE06ToAfV0HBRgxsvLThHn1oddQMrXj5DyAQgjEHSAJMWZwS3HPxT/QMbabI/iBCliMLEJKX2EEkomBAUCxRi42VDADxyTYDVogV+wSChqmKxEKCDAYFDFj4OmwbY7bDGdBhtrnTQYOigeChUmc1K3QTnAUfEgGFgAWt88hKA6aCRIXhxnQ1yg3BCayK44EWdkUQcBByEQChFXfCB776aQsG0BIlQgQgE8qO26X1h8cEUep8ngRBnOy74E9QgRgEAC8SvOfQkh7FDBDmS43PmGoIiKUUEGkMEC/PJHgxw0xH74yx/3XnaYRJgMB8obxQW6kL9QYEJ0FIFgByfIL7/IQAlvQwEpnAC7DtLNJCKUoO/w45c44GwCXiAFB/OXAATQryUxdN4LfFiwgjCNYg+kYMIEFkCKDs6PKAIJouyGWMS1FSKJOMRB/BoIxYJIUXFUxNwoIkEKPAgCBZSQHQ1A2EWDfDEUVLyADj5AChSIQW6gu10bE/JG2VnCZGfo4R4d0sdQoBAHhPjhIB94v/wRoRKQWGRHgrhGSQJxCS+0pCZbEhAAOw==",
    "size": "Small"
    }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
    }

     

     

     

     

     

     

     

     

  • Anupam.khasia Profile Picture
    362 on 08 Aug 2020 at 05:27:36
    Re: Base64 Image to Teams

    Hi @Anonymous ,

     

    I would suggest you to create a file from Base64 and store it Blob and get its URL . Use this URL in your message in teams like as following : 

     

    image.png

     

    Thanks

    Anupam

    (Please mark it resolved if it helps you)

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2