ConversationUpdate not firing from Teams bot user added event NodeJs SDK v4 - node.js

I've been trying to implement the preview version of Microsoft's BotFramework for NodeJS SDK v4 on Teams as mentioned here. I've set up the messaging endpoint in the Azure portal and I'm able to receive the message events just fine.
I've tried out other bots in the Teams Store such as Hipmunk and they seem to be able to proactively message the users as soon as they get added on to the work space.
I've been through the documentation already and I know that I would need to work upon a ConversationUpdate event that fires in the event of a bot user being added to a team, but unfortunately I haven't received any such events. I've wired it up to be able to receive it because the handlers do work when I test the bot in web chat on the Azure portal. Is this some sort of bug in the Teams client itself or is there any alternative documentation that I've been missing. Please let me know if any code samples or further links are required to aid you in helping me as this is a pretty critical integration for me and my company.

Related

Using the Bot Framework to post to a Microsoft Teams channel with NodeJS

Is there a way to send proactive cards from a bot to a Teams channel? The use case is a channel for service tickets. Once they get posted, a user will be able to interact with them with a few actions.
I’m looking at the documentation here for sending proactive messages. At the bottom, there’s a section for ”Creating channel conversations”, with a small reference to the startReplyChain(). However, the actual code and sample on GitHub still seem to reference a conversation with a member rather than sending something proactive to a channel.
There does appear to be documentation for incoming and outgoing webhooks, which is what I may end up doing. My only real concern is that it requires using Actionable Cards, which it references as legacy everywhere. This is despite saying that you can’t send Adaptive Cards with them. Perhaps they intend to enable these connectors to send Adaptive Cards, it’s not just very clear to me if this is a long-term solution I should be focusing on.
This is definitely possible, and it's important to note that you can even send from another process/application (e.g. on a schedule from an AWS Lamba). You can see a sample here for this.
The process of sending the message is just part of the story though - you need to have certain information already saved (e.g. in your database) to know how to contact the right user, group chat, or channel conversation, but there are a few ways to get that information. The most common is, when you bot is added to the conversation, to get it from the conversationUpdate event. You'll need conversation id, service url, tenant id, and your bot's App Id (what you get in the Azure portal for your bot, and which you're using already in your app's configuration, teams manifest, etc.). You can read more about the topic here and here.
Another option, if you don't have access to conversationUpdate (e.g. the user hasn't installed your app) is to call the Graph API to install your app. It's only possible to do this to a channel (on the v1 or beta api) (see here) or to a user (see here), but on the beta api only, and not (yet?) for a group chat.

How can Microsoft team automatically do outgoing webhook?

I am developing MS teams bot.
I am creating a function to send a webhook automatically when I receive a message.
The development was carried out by referring to the URL below.
https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-outgoing-webhook
Like the URL above, teams support outgoing webbook.
However, the outgoing webbook must manually enter #mention in the chat window for the bot to work.
I want to tag #mention automatically when I receive a message
Is there a way to do a webhook?
Even if it's not an outgoing webbook,
The robot or ms flow can receive messages and send messages automatically.
I want to develop a robot.
You also need to provide that bot for use by multiple teams.
I'm not sure if you can automatically sync all messages in a channel. But you can use the graph API to constantly check the channel for new messages and pull them into your service.Graph API
You can subscribe to notifications for Microsoft Teams messages. This feature is available in beta on the Microsoft Graph API.

Microsoft Azure Bot App Skype Channel not Working

I have now spent too much time on this issue and still can't seem to fix it.
I have an Azure Bot and I have configured it for Microsoft Teams and Skype.
They do not seem to be working.
The Skype Bot Publish is still 'inReview', I can add the Bot as a contact on skype/teams and when I send a message it is 'Sent' according to Skype, but I do not get a reply.
The Azure Webchat (Test in Webchat) works flawlessly on the Azure Web interface.
There must be something that I'm missing?
Since the last update there does not seem to be an updated how to or explanation to the newly added fields.
When you publish the Skype channel there is an option:
Bot website? What should be put here?
Also on the Calling section:
Webhook (for calling)
Thank you.
More pictures:

Bot Framework bot randomly doesn't answer messages

I have a bot that consists of a Facebook Messenger connected to my bot code via the Microsoft Bot Framework. The bot works fine in the webchat, however on Facebook Messenger only about 1/3 of my messages get delivered to the bot.
That means that I have to send "hi" three or four times before the bot answers me once. Before it answers, the message shows as undelivered. There is nothing in the Bot Framework log in the web interface at dev.botframework.com, and my bot code (running on Azure) doesn't even receive anything from the bot framework - no HTTPS request whatsoever. When it does receive something (which, again, is about 1/3 of the times), the bot answers properly.
In facebook settings, I am using the standard endpoint (https://facebook.botframework.com/api/v1/bots/[my bot name]).
It just seems that most messages are somehow lost between Facebook and Bot Framework, and never reach my bot code.
There is no logging on the Facebook side so I'm out of ideas how to debug - there are no traces of any errors anywhere.
Update: the problem seems to occur only with bots registered using the Microsoft's new method of registering bots via Azure Portal. Bots registered at dev.botframework.com don't seem to be affected.
In case the application is hosted in an Azure WebApp or Azure Function App, please turn on Always On for the application. Might be when you call the Bot API, it switches it from stand by mode to On, that might come with some latency since Microsoft idles it's WebApp by default. And by default, Always On is kept to OFF.
Refer here to turn On , Always ON.
If you have not hosted the Bot Framework in Azure, then it might be a different issue altogether.

New bot not answering messages in microsoft teams

I'm running a bot with Microsoft Teams and have it setup in Azure. It's a demo bot from the bot builder code Microsoft released. I'm pointing it to a local server that has ngrok running. This works fine when I test via Web Chat in Azure but it doesn't work at all when working with Teams.
The app sideloads properly and the manifest is accepted by teams. No response appears to be making it to the server. When I click to show the Bot Channels in Azure some kind of OPTIONS query is being sent to the server and the demo bot throws a 405 error.
The bot id is f22039b8-5400-4569-a0f2-5bdceb8431f2 but I can't talk to it in 1:1 chat either when I specify this ID.
There are no logs in Azure or teams- I don't see any errors, so I have no idea how to start debugging this.
This is a link to someone with the exact same question:
Bot not answering messages in microsoft teams
There is currently a bug in our bot registration code that is causing this. We are currently investigating its root cause.
As a workaround, add the Skype channel and the MS Teams channel to the bot.

Resources