Skip to content
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

@mention a user in Ms teams bot #146

Open
rjgmail88 opened this issue Sep 26, 2018 · 9 comments
Open

@mention a user in Ms teams bot #146

rjgmail88 opened this issue Sep 26, 2018 · 9 comments

Comments

@rjgmail88
Copy link

I read this document https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bot-conversations/bots-conv-channel

where its mentioned on the top that 'You can also access Teams-specific functionality within your bot like querying team information and @mentioning users'

I am interested to know how can I achieve @mentioning users via BOT that I have in MS teams as 1:1/personal scope.

I am aware of the process where I need to build a .zip with manifest.json and icons using App store and sideload that as a App in Ms teams channel. But, this will allow me to do @ mention {Bot name} so and I can parse user input in bot code. but, I am trying to see if same BOT can fetch users so I can @ mention users as well.

Desired state that I would like to achieve

For BOT in personal / 1:1 scope where we add a BOT by searching Bot ID in teams

1 . User navigates to bot in personal chat
2. user types 'Can you assign this ticket to @yinaa @Stevenic for quick fix ?'
3. Bot's business logic , (nodejs source code) gets above to users info. / user object like name etc..
4. Bot processes the request

For BOT in teams scope where we created .zip APP and sideloaded to a teams channel

1 . User @ {botName} in teams channel
2. user types '@ {botName} Can you assign this ticket to @yinaa @Stevenic for quick fix ?'
3. Bot's business logic , (nodejs source code) gets above to users info. / user object like name etc..
4. Bot processes the request

@Wajeed-msft
Copy link
Contributor

@rjgmail88 - This can be achieved in a channel. Please have a look at Node.js example code: Check for and strip @bot mention.

You can not @mention users in 1:1 conversation with the bot. You can also consider adding tabs and bots to chats which is in Public Developer Preview. In group chat you can at @mention the users which are part of it.

@rjgmail88
Copy link
Author

@Wajeed-msft , thank you for your suggestion. Let me reiterate what I understood from your comment.

A Bot which is added to a channel (scope=team) can be @ mentioned by user and same user can @ mention other users from same channel.
so user can type this '@ {botName} Can you assign this ticket to @yinaa @Stevenic for quick fix ?''

but, same user won't be able to @ mention anyone else from outside of the channel ? Let's say we 20K plus people in our o365 tenant and our bot should be able to @ mention anybody.

Should this be a feature request ?

Our use case:- We have a support ticket BOT which can be used to assign support tickets to other user. ex: User A can talk to a Bot and @ mention other people so they get notified. and @ mentioning should happen global level meaning anybody can @ mention anybody.

@billbliss
Copy link
Contributor

Yes this is a feature request - and an expensive one actually because it's a spam vector and a performance challenge (AutoComplete). I see the use case though - it's a good one.

@boris-rubo
Copy link

boris-rubo commented Feb 27, 2019

Just want to add that we want to implement very similar functionality in our company 20k+ users (and we actually have it in our own custom web implementation right at the moment and want to mirror it in Teams)
So for example, we want to use messages like 'Bot, book 1 on 1 meeting with @ someone' (in private conversation with bot) and we expect it to search over all users in our tenant and suggest the results alongside with user input; something like autocomplete input.

@droidriz
Copy link

+1,
our requirement is kind of same where 1:1 conversation with bot and the user can select another users (multiple) in 0365 tenant in msteams using autocomplete and the bot in backend will get their id to process further.

@clearab
Copy link

clearab commented Aug 12, 2019

For the booking a meeting scenario, you could have your bot return a Task Module and embed your existing web service as a web view in the task module. Essentially the flow could be:

  1. User says: @bot book a 1-1 meeting
  2. Bot responds with a task module (modal popup)
  3. User uses the task module to add the meeting details
  4. Bot creates the meeting (using either Graph or a deeplink)
  5. bot sends the confirmation response message to the user

The missing piece in this flow would be the bot wouldn't necessarily be able to message the other party, unless they already had the bot installed. You could solve this problem by pinning/installing the bot at the tenant level.

Alternatively (or additionally), if you already have a web experience you could create a tab with a personal scope and embed that into Teams.

@RajaniJillaGit
Copy link

Hi @clearab. Would appreciate if you can help detailing the above more where in we call a deep link inside the Bot. Can you please help on the below ?

  1. Are these task modules supported in other channels of the Bot. If a web chat channel is enabled for bot, can we reuse the task modules built. How the user experience is going to be ?
  2. How do we secure the deep links for calling inside Bot ? Do we need build any additional security ?
  3. Are these supported on mobile version of MS teams Bot ?
  4. What are the limitations of task modules ?

@RajaniJillaGit
Copy link

Hi Team,

Could you please clarify above to further decide on the approach ?

@georgeKh83
Copy link

Hi All,

Any update on above issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants