
I am attempting to use the Microsoft Teams connector directly in PowerApps rather than using a Power Automate as there is a requirements to keep flow runs to a minimum in the environment.
I can post a message to a channel using the PostMessageToChannelV3 but I can't find a way to mention the channel so that everyone is informed that there is a new message. I attempted to use Shane Young's video: https://www.youtube.com/watch?v=KONkjjSYvMI to link a single user and use the email address for the channel instead but am getting the below error:
Code getting this error is as follows:
MicrosoftTeams.PostMessageToChannelV3(groupID,ChannelID,{content:"<p>Test<at>Team Email Address</at>", contentType: "html"})
I then tried to use PostChannelNotification but documentation says this has been deprecated.
Can anyone help to give me a way to post a message in a channel and tag everyone in the group without using Power Automate?
I had a similar issue and managed to get around it with these steps:
Office365Users.UserProfileV2("YourEmailAddressHere").id
MicrosoftTeams.PostMessageToChannelV3(
//EnterTeamGroupID
"GroupIDHere",
//EnterTeamChannelID
"TeamChannelIDHere",
{
content:
MicrosoftTeams.AtMentionUser("EnterGeneratedLabelIDHere").atMention & "Enter content of message",
contentType:"Html",
isImportant: true // Add this line for creating an announcement
},
{subject: "Enter Subject Text Here"}
);