-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement Request - Add Support for @Mentions #11
Comments
Mentions are currently not supported for incoming webhooks: https://techcommunity.microsoft.com/t5/Microsoft-Teams/Microsoft-Teams-Incoming-Webhook-Message-Formatting/td-p/31984 This is not an official Microsoft repo, but it is functionality that I've looked into as well. I'll keep this open for tracking purposes. Hopefully, it can be added later. |
Microsoft have had open requests for this for 4 years. Not holding my breath! |
Currently we are using this excellent library for monitoring our ETLs in Teams but we would like to use mentions as well. It would be a great feature! Thank you! |
At-mention support is now avaialble using adaptive cards with AC v1.2 in Teams.
and it is now possible to send an AC to a Teams Channel webhook by specifying it as an attachment to the message. |
@Josverl Does this mean it is now possible to mention channels with pymsteams? I don't see anything about adding an attachment on their documentation and I have tried sending it through the text section.
|
@alj032 {
"type":"message",
"attachments":[
{
"contentType":"application/vnd.microsoft.card.adaptive",
"contentUrl":null,
"content":{
"$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
"type":"AdaptiveCard",
"version":"1.2",
"body":[
{
"For Samples and Templates, see":"https://adaptivecards.io/samples"
}
]
}
}
]
} Channel Mention: username in the supported adaptive card elements below is untested : (and would need to be wrapped as an attachment per above) {
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Hi <at>Channel</at>"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"msteams": {
"entities": [
{
"type": "mention",
"text": "<at>Channel</at>",
"mentioned": {
"id": "19:[email protected]",
"name": "The Channel"
}
}
]
}
}
} |
hey all, thanks for the interest. It's going to be a bit before I can work on this, but pull requests are always welcome. |
Hi! I'm also looking forward to this capability to be included. |
Hope this capability is added soon! |
If someone were to start development on a pull request for this, recommendations on where they should begin looking to accomplish this faster? Based on the Microsoft link above I'd think maybe it needs two parts; one to look up an ID and a second to mention that ID? Thoughts on where/how they should fit into the structure you already have here? |
any update!? |
I am also looking forward to this. if i get a heads up where to start implementing, i can submit a pull request aswell. |
Still waiting for this also. |
Hello, also looking foward to this upgrade! Would be extremly helpful atm. |
I'm also looking forward to this! Would be a great help! |
1 similar comment
I'm also looking forward to this! Would be a great help! |
@rveachkc |
@elisiariocouto, apologies for the delay - life is busy..... I agree that a major refactor is needed. I've started playing around with it in https://github.com/rveachkc/pymsteams/tree/adaptive-cards, but haven't gotten past the chores part of it. To be 100% transparent, I just haven't had the motivation to do it in the spring/summer/fall months. I typically dive into projects like this in the winter. A few of the things I'd like to do with the new branch:
I don't know a whole lot about |
I agree with all of this. Will start working on this soon :) |
Started the work on #131 |
Hey Elisiario! Love seeing this. Any updates on mentioning a user using the module? |
While this is not implemented, this is a temporary solution that works: teams_message = pymsteams.connectorcard(webhook)
teams_message.payload = {
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "Hello <at>Leonardo</at>"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"msteams": {
"entities": [
{
"type": "mention",
"text": "<at>Leonardo</at>",
"mentioned": {
"id": "[email protected]",
"name": "Leonardo Benitez"
}
}
]
}
}
}]
}
teams_message.send() |
Hi there, First of, thanks for the work! |
I would love to see this feature being released! 😜 |
Is there any way we can include something similar to @mention within a MessageCard type instead of adaptive card. I heard that @mention is not supported by MessageCard. Has anyone figured out a way to mention team members in MessageCard structure? Please, do let me know |
Lookgin forward for implementation as I manage to make this code work for ppls but not for Channels :( |
Hello everyone! Has anyone figured out how to integrate mentions in a section without having to send a new message solely for the user mention? Let me clarify. This is the payload of the message I created with pymteams:
How can I add the following mention to the previous payload? Is the only way to create another message?
Thank you! |
This code really makes it easy for us to integrate automated communications into our Teams Channels.
I would like to request @mentions be supported. We have various scenarios when we would like to tag/notify Associates of events. Supporting an @username tag/notification would really help us take Microsoft Teams to the next level.
@rveachkc let me know if this is not the Official Microsoft Repository for Teams. If it isn't I'll repost this request there.
The text was updated successfully, but these errors were encountered: