cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DonV
Level: Powered On

Post an image to Teams using Automate action "Post a message (V3)"

(Apologies ahead of time for the post formatting. I entered all the code examples in the Code Sample area but it spit them back as invalid HTML ¯_(ツ)_/¯ If anyone has suggestions on how to reformat for the forum, let me know )

 

I'm trying to post an image to Teams using the "Post a message (V3)" action. I've structured the message as

 

<html>

<body>

<h2> {{Text Message}} </h2>

<img alt='Picture from Text' src='{{Picture URL}}' />

</body>

</html>

 

When running, the step shows the following as the Message under Inputs:

<html>

<body>

<h2>Test</h2>

<img alt='Picture from Text' src='https://api.twilio.com/2010-04-01/Accounts/AC54d4bd98f56d56335971a8348021837b/Messages/MM8d674476560...' />

</body> 

</html>

 

The Outputs show the following under Body->Content:

<h2>Test</h2>\n\n<img alt=\"Picture from Text\" src=\"https://api.twilio.com/2010-04-01/Accounts/AC54d4bd98f56d56335971a8348021837b/Messages/MM8d674476560...

 

When the message displays in Teams, it looks like 

https://imgur.com/B4wDvAA(sorry if the image isn't coming through, I couldn't figure it out - the imgur link works)

 

I'm not sure how to get it to display the image. The URL (which does not work on its own, because of the encoding) for the image in Teams is https://urlp.asm.skype.com/v1/url/content?url=https%3a%2f%2fapi.twilio.com%2f2010-04-01%2fAccounts%2...

 

If I take the html above in the Inputs section and save it to an html file, it shows just fine in my browser. If I take the html above in the Outputs section and save it to an html file, it has the same problem and does not display the image. I've tried it with single quotes, double quotes, with <!DOCTYPE html> at the start of the message, and without <html> and <body>. None of them change the result,

Anyone have any other ideas?

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
DonV
Level: Powered On

Re: Post an image to Teams using Automate action "Post a message (V3)"

Upon further research and asking Twitter, the correct answer is to use an Adaptive Card, not that it's not solved.

 

Thanks to Brian Dang for the correct answer.

 

https://twitter.com/8bitclassroom/status/1195224646330671104

View solution in original post

2 REPLIES 2
Highlighted
Community Support Team
Community Support Team

Re: Post an image to Teams using Automate action "Post a message (V3)"

Hi @DonV,

 

Unfortunately, post a message to Microsoft Teams with an image is not supported in Flow by now, there is an idea of it already created in the IDEA forum, you can head to vote it, collect votes to make it come true in the future:

https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Post-a-message-with-a-photo-to-Microsoft-Te...

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

DonV
Level: Powered On

Re: Post an image to Teams using Automate action "Post a message (V3)"

Upon further research and asking Twitter, the correct answer is to use an Adaptive Card, not that it's not solved.

 

Thanks to Brian Dang for the correct answer.

 

https://twitter.com/8bitclassroom/status/1195224646330671104

View solution in original post

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,427)