In my previous post, I described how to integrate Power Apps with Microsoft Teams using the Microsoft Teams connector. This included tasks such as how to send messages, and how to send meeting invites.
The Teams connector can be complicated to use so in cases where we just want to add a message to a channel, there's a simple way to accomplish this without needing to resort to the Microsoft Teams connector.
To trick is to email enable the channel by clicking the right click context menu of a channel, and clicking the 'Get email address' option.
Once we email enable the channel, we can simply send an email message to the associated email address to create a channel message.
This provides a quick and simple method to create a teams channel message, without resorting to the effort of adding the Teams connector and writing code to retrieve team and channel IDs.
From within Power Apps, we can use the Office365Outlook connector to send the email that is associated with the Teams channel. My post here describes how to use this connector.
One thing to note is that any message that we send by email appears in Teams with an email icon and the sender email address. The appearance of this message will not be as clean, compared to if we were to send it with the Teams connector.
However, the benefit of sending messages to a channel by email is that we can easily include attachments, and other content that would be more difficult to include if we were using the Teams connector.