1.1.13 • Published 6 years ago

botpress-msbotfw v1.1.13

Weekly downloads
42
License
Botpress Propriet...
Repository
-
Last release
6 years ago

Microsoft Bot Framework connector for Botpress

Installation

botpress install botpress-msbotfw

Get started

1. Create a bot on Bot Framework Developer Dashboard

2. Setup Application Key & Password

To setup connection of your chatbot, you need to fill the application configurations directly in the module interface.

You can also

  • Set the bot application ID in env var MSBOTFW_APP_ID
  • Set the bot application password in env var MSBOTFW_APP_PASSWORD

3. Set the webhook url in Bot Framework config

The messaging endpoint must be https://YOUR_DOMAIN/api/botpress-msbotfw/messages

Usage

Incoming

You can listen to incoming events easily with Botpress by using the built-in "hear" function.

bp.hear({platform: 'msbotfw', type: 'message'}, (event, next) => {
    const text = event.text
    const session = event.session
    
    bp.msbotfw.sendText(session, `You said ${text}`)
})

Outgoing

Text messages

bp.msbotfw.sendText(session, 'aMessage')

Attachments

You can use the Bot Framework attachment API described here

You can see how it is rendered on different platforms here

bp.msbotfw.sendAttachment(session, {
    'contentType': 'application/vnd.microsoft.card.hero',
    'content': {
      'title': 'Who is it?',
      'subtitle': 'Guess who is on the picture',
      "images": [
        {
          "url": "https://upload.wikimedia.org/wikipedia/en/a/a6/Bender_Rodriguez.png"
        }
      ],
      'buttons': [
        {
            'type': 'postBack',
            'title': 'Bender Rodriguez',
            'value': 'insert_your_postback'
        },
        {
            'type': 'postBack',
            'title': 'R2D2',
            'value': 'insert_your_postback'
        }
      ]
    }
  })
1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago