SOLVED

How to send activity feed notification that is tied to a card notification

Copper Contributor

Hi, All.

I'm developing a Teams Add-On app that uses Adaptive Card to notify the user about the activity and interaction between users that happened in the App.
I'm sending this notification via a bot and now I need to expand this notification to also be included in the Activity Feed of the recipient. I have tried using Mention as stated on the docs Add Mention in Your Message but it doesn't work for card notification.
I have also come across this docs about Send Activity Feed Notification, but I don't know how to make it tied to the card notification that the bot send.

 

Any help is appreciated.

5 Replies
@ingmaramzan- Thanks for reporting your issue.
We will try the scenario from our end and get back to you.

@ingmaramzan -Microsoft Teams displays notifications in both activity feed and toast formats. Users receive notifications from multiple sources across chats, channels, meetings, or other apps. You can use either activity feed notifications or bot framework messages, but don't use both notification types. Provide appropriate titles and descriptions for your Activity Types. Use short titles, such as @mention and Announcements.


Sample Link-Microsoft-Teams-Samples/samples/graph-activity-feed/csharp at main · OfficeDev/Microsoft-Teams-Sampl...

Hi @Sayali-MSFT, thanks for the answer. What is the reason that I can't send both activity and bot framework notifications?
According to this doc [Add mentions to your messages], when sending a message via bot framework I can also make it an activity notification by mentioning the user by including <at>{userId}</at> in the message. Is it not possible to do the same while sending a card notification?
So, in my case, I want to send the user a card message and have that message show up in the user's activity feed. Is something like this possible?

best response confirmed by ingmaramzan (Copper Contributor)
Solution

@ingmaramzan - You can use both, but to Avoid duplicate notifications from bot messages and activity feed notifications.
It is not possible; we cannot bind the card to notification.

sample link-https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-activity-feed/csharp

@ingmaramzan - Could you please share your valuable feedback via Microsoft Teams Developer Feedback link.

1 best response

Accepted Solutions
best response confirmed by ingmaramzan (Copper Contributor)
Solution

@ingmaramzan - You can use both, but to Avoid duplicate notifications from bot messages and activity feed notifications.
It is not possible; we cannot bind the card to notification.

sample link-https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-activity-feed/csharp

View solution in original post