Oct 31 2019 02:16 AM - edited Oct 31 2019 02:17 AM
Hi. I'm able to send messages from Bot to user in Microsoft Teams app via Microsoft Bot's "botbuilder" Node.js SDK:
session.send(message);
How can I send the message on the other direction (from user to bot)
Oct 31 2019 09:52 PM
@member11 You could directly send a message to the bot using Teams client. What is that you are looking for? Could you please elaborate?
Nov 01 2019 01:24 AM
@Gousia_Begum I'm working on an integration between Microsoft Teams and Slack.
I'm building a Microsoft Teams application which is connected to a Microsoft Bot.
Additionally, I created a server for:
1. Listening to messages which were sent by users in Slack (via Slack webhooks)
2. Posting them in Microsoft Teams conversation as a user message to the bot (outgoing message)
I cannot accomplish item number 2.
I receive messages from Slack (which were sent by a Slack user) to my server and I wish to post them in Microsoft Teams as messages from the user to the bot and I'm not able to do so.
Nov 04 2019 08:18 AM
@member11 I've not done this via Node (js) but I've got it working fine in C#, sending on a schedule from an Azure function. Here's the gist of what you need (see the replies): https://stackoverflow.com/questions/42749982/initiate-a-message-from-bot-to-user-on-botframework
Nov 06 2019 01:12 AM
Thank you @Hilton Giesenow. Actually I'm looking for another behaviour...
In the example you sent the new message arrived from "consoleBot" while I'd like to send it as "User".
In such case the message would be displayed inside a blue bubble and it'd look like the user sent it.
The UX is crucial in this use case.
Nov 06 2019 01:16 AM
@member11 ahh, I see now - that makes sense given what you're trying to do - this is totally the wrong path we're done. What you'd want is the use the Teams API, with delegated permissions, to post on behalf of the user.
By the way, are you aware of https://m.io/ ? I think they already do something similar to what you're trying to achieve, just fyi.
Nov 10 2019 03:16 AM
Thanks again @Hilton Giesenow https://m.io posts messages solely by the bot while I'm willing to post messages as the user without using Teams' UI... Unfortunately, Teams API doesn't allow posting on behalf of the user
Nov 16 2019 11:53 PM
A related answer on StackOverflow: https://stackoverflow.com/questions/58788187/how-to-post-a-message-on-behalf-of-the-user-in-microsof...