cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DonV
Frequent Visitor

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
Frequent Visitor

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

3 REPLIES 3
v-litu-msft
Community Support
Community Support

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
Frequent Visitor

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

104
New Member

helpful

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,618)