botkit icon indicating copy to clipboard operation
botkit copied to clipboard

Botframework and formatting

Open Brokray opened this issue 7 years ago • 4 comments

Hello everyone,

We are using botkit on our own express server.
We already used it to connect bots through facebook, slack and twilio SMS. These are mostly working fine at the moment.

However, today we tried to also integrate Skype thanks to Bot Framework, we followed similar steps as Twilio SMS because they seemed very similar in implementation (only webhook to provide, an ID and a secret).

Then we tried our bot, directly from the Bot Framework platform. Messages are indeed sent, we receive them in our end, then feed the request body to our spawned bot (with proper ID and password).

Here we have our first error : Botkit looks for an address field but does not find it.

We thought : "Alright, let's simply format the request body upon reception to an IMessage". So we did.

Then we got our second error, upon response of our bot, the Controller precise that fields are missing, especially : address. ERROR: ChatConnector: send - Message is missing address and serviceUrl

Does anyone got this error and have some advices for me ? Have a great day !

Brokray avatar Dec 20 '18 16:12 Brokray

Can you please show the code for how you're passing the body to the controller?

Stevenic avatar Dec 20 '18 20:12 Stevenic

Thank you for answering.
Hmmm, as I have multiple bots that can run on my platform, controllers are created (or getted) on the fly by a factory. But, in the end, it calls :

const controller = Botkit.botframeworkbot(conf)
const bot = controller.spawn({})
if (req.body) {
    controller.ingest(bot, req.body, res)
    res.status(200);
}

Did we miss something?

Brokray avatar Dec 27 '18 17:12 Brokray

Hello everyone, I have the same issue actually. Does anyone have a fix ?

PaulB-Gogowego avatar Jan 17 '19 17:01 PaulB-Gogowego

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 18 '19 17:03 stale[bot]