Mar 01 2022 10:35 AM
Hi,
we are using a Power Automate Flow to send Teams Messages.
This Flow is activated from a http call.
But we are getting constant errors "Message mention text needs to be specified."
This is the json for the adaptive card:
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Hi <at>John</at>"
}
],
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"msteams": {
"entities": [
{
"type": "mention",
"text": "<at>John</at>",
"mentioned": {
"id": "{Office365 User GUID}",
"name": "John Doe"
}
}
]
}
}
}
Any Ideas how to solve this?
for the User Id i tried my email and also the guid from the Graph Api Explorer...
Mar 01 2022 09:58 PM
Mar 02 2022 12:59 AM
Mar 02 2022 04:39 AM - edited Mar 02 2022 04:45 AM
@cschuster - I ran a flow manually with the following JSONs and it worked. I tried with both email ID and User ID. Please try with the below JSON and it should work.
ID can be fetched from the activity as follows
from: {
id: '29:15fREhoUuf6vVCOuaJYVH-AB6QXXX',
name: 'MOD Administrator',
aadObjectId: 'XXXX'
}
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Hello new test <at>Mod</at>"
}
],
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"msteams": {
"entities": [
{
"type": "mention",
"text": "<at>Mod</at>",
"mentioned": {
"id": "admin@m365x654992.onmicrosoft.com",
"name": "Mod"
}
}
]
}
}
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Hi <at>Mod</at>"
}
],
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"msteams": {
"entities": [
{
"type": "mention",
"text": "<at>Mod</at>",
"mentioned": {
"id": "4exxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx8",
"name": "Mod"
}
}
]
}
}
Mar 02 2022 05:01 AM
not working for me :(
tried with my (primary) email, my default email (onmicrosoft.com) and your original json....
but a simple json is working fine:
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Hello new test"
}
],
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4"
}
Mar 02 2022 05:32 AM
Mar 02 2022 06:04 AM
unfortunately no, i get an error every time i try to export the flow (even for a fresh created flow):
Mar 03 2022 05:40 AM
Solution@cschuster - We are sharing our flow package zip. Please check and confirm if this works at your end?
Mar 03 2022 07:25 AM
Mar 03 2022 08:53 AM
Mar 03 2022 08:53 AM
Mar 03 2022 05:40 AM
Solution@cschuster - We are sharing our flow package zip. Please check and confirm if this works at your end?