web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power automate to team...
Power Automate
Answered

Power automate to teams channel (base 64 is not readable by teams) any alternative ?

(0) ShareShare
ReportReport
Posted on by 4

My users are filling an escalation form which triggers my flow to post to teams channel.

I am trying both sending an email to the channel em address or posting directly.

The only way I got attachments to be embedded is via base 64. however it seems that teams can't read base 64 and display my image in the post directly (not as attachment).

Can Anyone assist ??

Zidan_0-1657382234504.png

 

both displayed as follows in teams channel 



Zidan_1-1657382383271.png

 



Categories:
I have the same question (0)
  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Hi @Zidan 

    can you validate two things, please

    1. image syntax to be
    2. <img src="data&colon;image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA
       AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
       9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />

    2. and also if  you're having bytes as content, please try to convert to base64

     

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

     

     

    Thanks
    Please click Accept as Solution on this reply if it helped to solve your issue, and thumbs-up if you feel this is useful or important in other ways as a boost.

  • Zidan Profile Picture
    4 on at

    @Shujaath_Khan CAn you please clarify a little bit ?

    I am sharing my flow exactly in details, different images can be uploaded, as I am capturing the image from a form submitted by numerous people.

    after calling this attachment (whatever it is) I am trying to paste it to the teams channel using the steps you see above.

    Which is working if I am posting to an email, however seems that teams doesn't accept base64 and not able to display the image hence it shows as broken as you can see.

    So I am asking if there is an alternative I can do other than base64 in this case ..

    I am using this FYI : <img src="data:@{outputs('Apply_to_each')?['body']['$content-type']};base64,@{outputs('Apply_to_each')?['body']['$content']}" />

  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    Hi @Zidan ,

     

    Maybe you could try to use String variable instead of Array variable.

    vyujincuimsft_0-1657694740443.png

    I have made a simple test for your reference.

    <img src="data&colon;image/jpg;base64,@{body('Get_attachment_content')?['$content']}" alt=""><br />
    body('Get_attachment_content')?['$content']
    variables('variablename')

    vyujincuimsft_1-1657694873346.png

    vyujincuimsft_2-1657694904077.png

    vyujincuimsft_3-1657694967043.png

    Result Screenshot:

    vyujincuimsft_4-1657695116597.png

    In addition, here is a link for your reference.

    https://powerusers.microsoft.com/t5/Building-Flows/Posting-an-Image-on-an-HTML-Table-for-an-E-mail-update/m-p/1651076#M183461

     

     

     

    Best Regards,
    Charlie Choi

     

     

  • Zidan Profile Picture
    4 on at

    @v-yujincui-msft 

    Seems like it is about to work, however I am getting this error from the last step 
    "{"error":"The payload is too large. Please make sure the size is less than 28KB."}" 

    even when I tried with 23 kb picture.


    Zidan_0-1657702179177.png

     

  • v-yujincui-msft Profile Picture
    on at

    Hi @Zidan ,

     

    It's a known limitation.

    When posting a message, the message has a size limit of approximately 28KB. This encompasses all HTML elements like text, images, links, tables, mentions and so on. If the message exceeds 28KB the action will fail with an error stating: "Request Entity too large".

    https://docs.microsoft.com/en-us/connectors/teams/#known-issues-and-limitations

    vyujincuimsft_0-1657777243332.png

    https://docs.microsoft.com/en-us/microsoftteams/limits-specifications-teams#teams-and-channels

    https://github.com/microsoft/BotFramework-Services/issues/228

     

    In addition, one approach we could try is to send each image separately. It should work if the message size is less than the limit.

    vyujincuimsft_1-1657777875255.png

    Result Screenshot:

    vyujincuimsft_2-1657777911008.png

     

     

    Best Regards,
    Charlie Choi

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard