Use Microsoft Teams to send out message include image

Dear All

I had a flow to take a screenshot and then send it out via outlook and teams.

It work prefect with outlook
image

But the image cannot load at teams. At first outlook also have this issue, but i found out that using attach files can solve this issue. Is there any way also fix at teams?
image

1 Like

Hi @bschk,

Hopefully, the same issue as below.

Thanks :slight_smile:

ok, i will try this, thx for help

1 Like

Hi @bschk

I’m running into the same issue, were you able to solve it?

Not yet. Now are using outlook instead teams.

In the beginning I tried to use a OneDrive hosted image which didn’t work. It worked when I switched it over to a web hosted image.
My other thought would have been to send the file or use webhooks.

You means using web hosted image can be show in Teams message body with using html code?
I had tried using my local file server smb path but failed.

Hello,
This video will help you:

Thanks,
Cristian

Hi @Cristian_Negulescu , This is urgent I have tried the same way to send image to teams channel using Webhooks but getting errors. can you please share the code xaml file so that I can check what’s wrong with my code.

Hello,
I attach my URL version.
But to build correct the JSON and much fast please do this with VB.NET
How to create JSON in VB.NET very fast (UiPath) - YouTube
Thanks,
Cristian
withURL.xaml (12.4 KB)

HI @Cristian_Negulescu , I Opened above withURL xaml file getting this error


It seems you have used preview version of WebAPi package. Also, I wanted to send image on Teams stored on my local machine project folder.

If you Upload from your PC you are limited to very small files 128K I think I say on movie the limitation. Please follow the movie you have all steps there if I will give you the file you are not able to open. That’s why I don’t share XAML files I show all the steps in the movie.

Is there no other option apart from the webhooks one to send image in Teams ?

There is the option to use Graph API either with invoke code activities or HTTP requests. Check here for an example: Send inline images along with the message - Microsoft Graph beta | Microsoft Learn - https://learn.microsoft.com/

If you’re using Office 365 activities in the same project, the invoke code option might not be viable (I’ve tried it, but couldn’t get it working because of conflicting versions of Graph used in O365/Teams packages).