I would like to know that how can I change fixed value of “id” and "Name in “mentioned” to variable. I tried to replace them with variable which I got form power automate and will reply message from UiPath to MS Team via webhook but I still not get response message to MsTeam. Example Code below is work that I can use to reply message to MS team with mention but still specific user.
{
“type”:“message”,
“attachments”:[
{
“contentType”:“application/vnd.microsoft.card.adaptive”,
“contentUrl”:null,
“content”:{
“$schema”: “https://adaptivecards.io/schemas/adaptive-card.json ”,
“type”: “AdaptiveCard”,
“version”: “1.2”,
“body”: [{
“type”: “TextBlock”,
“text”: “Hi {Requester}! \nLine 2 of Message. \nLine 3 of Message.”,
“wrap”: true
}],
“msteams”: {
“entities”: [
{
“type”: “mention”,
“text”: “{Requester}”,
“mentioned”: {
** “id”: “c0d68e65-9c94-4a0f-93ef-9a367”,**
** “name”: “{Requester}”**
}
}
]
}
}
}
]
}
Anil_G
(Anil Gorthi)
March 22, 2023, 6:37am
2
@Boonchai_Tuntiwuttipong1
Can you show how you are trying to replace it with variables…
Eg:
{
“type”:“message”,
“attachments”:[
{
“contentType”:“application/vnd.microsoft.card.adaptive”,
“contentUrl”:null,
“content”:{
“$schema”: “https://adaptivecards.io/schemas/adaptive-card.json” ,
“type”: “AdaptiveCard”,
“version”: “1.2”,
“body”: [{
“type”: “TextBlock”,
“text”: “Hi {Requester}! \nLine 2 of Message. \nLine 3 of Message.”,
“wrap”: true
}],
“msteams”: {
“entities”: [
{
“type”: “mention”,
“text”: “{Requester}”,
“mentioned”: {
** “id”: ““” + variable1 +“””,**
** “name”: “{Requester}”**
}
}
]
}
}
}
]
}
Cheers
@Anil_G
‘msteams’:{‘entities’: [{‘type’: ‘mention’,‘text’: ‘{Requester}’,‘mentioned’: {‘id’: “& user_id &”,‘name’: “& user_request &”}}]}}}]}"
Anil_G
(Anil Gorthi)
March 22, 2023, 6:55am
4
@Boonchai_Tuntiwuttipong1
Can you try the above way of please…I added variable1 and to escape double quotes added double double quotes
Cheers
Many Thank , I can do it Thank a lot
1 Like
Anil_G
(Anil Gorthi)
March 22, 2023, 7:38am
6
@Boonchai_Tuntiwuttipong1
Happy Automation…
If resolved please mark solution and close the topic so that it helps others with similar issue
Cheers
1 Like