web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / I need to add @ mentio...
Power Apps
Answered

I need to add @ mention to Teams from my powerapps form

(0) ShareShare
ReportReport
Posted on by

Here is my formula to send a message to teams but my Nominee Name, Nominee Manager & Submitter Manager is not getting a notification message on teams or tag.

 

 

 


////Send Message to Teams/////

MicrosoftTeams.PostMessageToChannelV3(
    "c7154dcd-2cb3-4383-b2bd-e45dcd09b205",/// GroupID
    "19:dsLOTCD17xGIDSqGQJlCSYFxELx6tHg-NeAUMob3Y881@thread.tacv2",/// ChannelID
   {
        content: "Nominee Name: " & DataCardValue45.Selected.DisplayName & "<br>" &
                 "Nominee Manager: " & DataCardValue2.Selected.DisplayName & "<br>" &
                 "Submitter Manager: " & DataCardValue4.Selected.DisplayName,
        contentType: "Html"
    }
);


Can someone help make this formula add this function above or show me a better way with the power flow?
Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    on at

    Hi , @Kumar09 

    If you want to pass the @mention to your Teams channel , you need to pass this :

    <at>userid</at>   OR   <at>useremail</at>

     

    This is my test code and the result is as follows:

    vyueyunmsft_0-1718242835126.png

    vyueyunmsft_1-1718242850683.png

     

    MicrosoftTeams.PostMessageToChannelV3("Group ID","Channel ID",
    {content : "Nominee Name: <at>User Email / User ID</at> " ,contentType :"Html"})
     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

  • Kumar09 Profile Picture
    on at

    @v-yueyun-msft  

    Thank you for replying to my request:

    So, this is my current code:

     

    MicrosoftTeams.PostMessageToChannelV3(
    "c7154dcd-2cb3-4383-b2bd-e45dcd09b205",/// GroupID
    "19:dsLOTCD17xGIDSqGQJlCSYFxELx6tHg-NeAUMob3Y881@thread.tacv2",/// ChannelID
    {
    content: "Nominee Name: " & DataCardValue45.Selected.DisplayName & "<br>" &
    "Nominee Manager: " & DataCardValue2.Selected.DisplayName & "<br>" &
    "Submitter Manager: " & DataCardValue4.Selected.DisplayName,
    contentType: "Html"
    }
    );

     

     

    How would I add this part (<at>userid</at>   OR   <at>useremail</at>) without removing anything above from my code? 

     

    Also, my Nominee Name, Nominee Manager, and Submitter Manager will change everything. Someone in my company uses the spot award app, so will the <at>userid</at> OR <at>useremail</at> work?

  • v-yueyun-msft Profile Picture
    on at

    Hi , @Kumar09 

    Thanks for your response! Dose your DataCardValue Control -  items property contains the user email in your side?

    If this , you can directly try to use this code:

     

    MicrosoftTeams.PostMessageToChannelV3(
    "c7154dcd-2cb3-4383-b2bd-e45dcd09b205",/// GroupID
    "19:dsLOTCD17xGIDSqGQJlCSYFxELx6tHg-NeAUMob3Y881@thread.tacv2",/// ChannelID
    {
    content: "Nominee Name: <at>" & DataCardValue45.Selected.Email & "</at><br>" &
    "Nominee Manager: <at>" & DataCardValue2.Selected.Email & "</at><br>" &
    "Submitter Manager: <at>" & DataCardValue4.Selected.Email & "</at>",
    contentType: "Html"
    }
    );

     

    If you don't have an email in your items property, you'll need to add the corresponding email to your data source. Because of DisplayName alone, the backend can't identify who this person really is.

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

  • Kumar09 Profile Picture
    on at

    @v-yueyun-msft  

    Oh, okay, so where do I put my exact information about the email? Can you provide a step-by-step process? 

  • Kumar09 Profile Picture
    on at

    This process exactly: 

     

    If you don't have an email in your items property, you'll need to add the corresponding email to your data source. Because of DisplayName alone, the backend can't identify who this person really is.

     

     

    How do I make that happen on my side?

     

    Can you please help @v-yueyun-msft 

  • Verified answer
    v-yueyun-msft Profile Picture
    on at

    Hi , @Kumar09 

    Thanks for your response!

    I mean, you need to get the email or id of this user. For example, we can use the Person type column of SharePoint to get the corresponding email.

    If your data source only saves the user's DisplayName, then you need to get the user's email through DisplayName.

    For example, you can use Office 365User connector to search the user's email.

    vyueyunmsft_0-1718763603316.png

     

    First( Office365Users.SearchUserV2({searchTerm:"Your DisplayName" , isSearchTermRequired:true } ).value ).Mail
     
     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard