Hello Dhanlaxmi Jayapal (Tata Consultancy Services Limi) ,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to tag a user in the email body using Azure Logic Apps instead of using Team, by using the "@" symbol to mention users.
There are couples of a few steps to take:
- You can use a Variable or a Compose action to build your HTML and create the well-formatted HTML content template that includes the user mentions, like this:
<p>Hello <span style="color: #0078D4;">@Jayapal</span>, please review the document.</p>
- In the same Compose action, use the Expression tab to replace the
{User}
placeholder with the actual user's name. For example:
Replace"<p>Hello, <b>@{triggerOutputs()?['headers']['x-ms-file-name']}</b>!</p>"
triggerOutputs()?['headers']['x-ms-file-name']
with the appropriate expression or variable containing the user's name. - The you will use Send Mail V2
For more detail steps, kindly use the links:
- https://blog.sandro-pereira.com/2020/01/26/logic-apps-how-to-send-a-well-formatted-html-email-notification-with-office-365-outlook-connector/
- https://cloudcustodian.io/docs/azure/examples/logicappnotifications/logicappnotification.html
- https://turbo360.com/blog/how-to-send-a-well-formatted-custom-html-email-in-logic-apps
Accept Answer
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.
Best Regards,
Sina Salam