I want to use power automate to send email attachment image (image/png) to Teams chat when new email arrived. I know this is not supported with offical power automate connectors, so I created one.
this is the email I received, and I want to automate get an Teams message with email attached image shown.
It works, but only with one last issue when sending message to Teams chat: image is not shown in the chat.
the API I used is : https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http
In the Power automate Connector, with my own custom connector, I can send message to Teams chat without failure, but image is not shown correctly:
the Body/Body/Content is as:
And contentBytes is base64(items('For_each')?['contentBytes'])
I checked the develop doc, when new email arrive, items('For_each')?['contentBytes'] data type is byte. I'm wondering if this issue has something to do with data type...
I tried with contentBytes is items('For_each')?['contentBytes'], it runs with failure.
I also tried with contentBytes is base64(string(items('For_each')?['contentBytes'])), it runs with failure as well.
Can someone help me what is the root cause, and how to correct this issue?
thank you!
Anyone can help?