How to use Microsoft Teams Graph spoke to Post a Message with a mention?

mkegruber
Tera Expert

Hi,

 

I got the Microsoft Teams Graph spoke activated in my company's DEV environment recently (after successfully using the MS Teams spoke). 

 

I understand where to source Group/Team IDs and Channel IDs, etc, but I'm stumped on where a get a data pill that is compatible with the Mentions field (see image below).

 

I was sure a "For Each Items > Look Up Records > Case Records > Assigned To > Email" would do the trick, but no. I'm missing something here, and I can't find it via Google.

 

If someone has successfully used this action, please detail what you did to issue a mention inside the message.

 

MS_Teams_Graph_mentions.png

 

regards

Michael

7 REPLIES 7

mkegruber
Tera Expert

Hi,

 

I found the "documentation" referring to the field use for the Post Message form...

 

In the Message field, an entity can be mentioned in the message using <at> tag. To mention an entity, following is the syntax:

<at>Mention Text</at>
For example: <at>Test User</at>
Here 'Test User' is the entity to
be mentioned.

For mention to work, required details must be provided in Mentions input (below). Mentions input must contain the details of the mentioned entities in the same order as they appear in the message, which means if <at>Test User</at> is the first mentioned entity, then it must be added to Mentions input as first item.

 

Mentions - List of objects containing these values

  • Mention Text - Text used in Message to mention the entity.
  • Type - Type of entity to be mentioned.
  • Mentioned - Details of the mentioned entity. Provide value for one of the following depending upon Type of entity.
    • Application
      • Application ID
      • Display Name
      • Application Identity Type
    • User
      • User ID
      • Display Name
      • User Identity Type
    • Conversation
      • Conversation ID
      • Display Name
      • Conversation Identity Type

 

I've read above, however, not being familiar with the Graph API, I'm still unsure what content/format is used in the "mentions" field in the Post Message form.

 

I would appreciate anyone who has used the Microsoft Team Graph Post Message action to share a screen shot of how its down and a sanitised cut/paste of the message and mentions field contents.

 

regards

Michael

 
 
I think your right re: complex action..I'd be knocking up something quick to see.Have a look at his vid that Goran did a few years back..about 5 mins in:
 
 
100% let me know how it goes though as havent had to play with that data type as yet...well at least not that I can remember.

mkegruber
Tera Expert

Hi

I was shown how to view the hidden fields in the Post Message action and see how they relate to a JSON format. 

 

mkegruber_0-1688615230939.png

 

The next step is to work out how to create a custom action to use the value in the "assigned to" field of a case to retrieve the Microsoft Teams UserID of a user. 

 

Life would have been so much easier if the spoke contained such an Action.

 

regards

Michael

Do you know if it's possible, and if yes how, to <at>everyone</at>?

 

Also, the "Azure Active Directory Spoke" contains the action to look up the "obect id" of the user (just to your comment "The next step is to work out how to create a custom action to use the value in the "assigned to" field of a case to retrieve the Microsoft Teams UserID of a user. ")