All Projects → SAPConversationalAI → Bot Connector

SAPConversationalAI / Bot Connector

Licence: mit
Bot Connector allows you to connect your bot to multiple messaging channels.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bot Connector

Whatsapp Web.js
A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
Stars: ✭ 4,103 (+2117.84%)
Mutual labels:  api, bot-api, bot
Jda
Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Stars: ✭ 2,598 (+1304.32%)
Mutual labels:  api, bot-api, bot
Whatsapp Bot
BOT - WhatsApp Web in TypeScript
Stars: ✭ 170 (-8.11%)
Mutual labels:  api, bot-api, bot
Discord4j
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.
Stars: ✭ 973 (+425.95%)
Mutual labels:  api, bot-api, bot
Botogram
Just focus on your bots.
Stars: ✭ 106 (-42.7%)
Mutual labels:  bot-api, bot
Wechat Go
go version wechat web api and message framework for building wechat robot
Stars: ✭ 1,381 (+646.49%)
Mutual labels:  api, bot
Cryptotrader
A responsive dynamic webapp to trade cryptopairs on the most prominent exchanges
Stars: ✭ 118 (-36.22%)
Mutual labels:  api, bot
Tiktokbot
A TikTokBot that downloads trending tiktok videos and compiles them using FFmpeg
Stars: ✭ 126 (-31.89%)
Mutual labels:  api, bot
Framework
Chatbot framework
Stars: ✭ 130 (-29.73%)
Mutual labels:  bot-api, bot
Mojo Webqq
【重要通知:WebQQ将在2019年1月1日停止服务,此项目目前已停止维护,感谢大家四年来的一路陪伴】使用Perl语言(不会没关系)编写的smartqq/webqq客户端框架(非GUI),可通过插件提供基于HTTP协议的api接口供其他语言或系统调用
Stars: ✭ 1,755 (+848.65%)
Mutual labels:  api, bot
Eddi
Scalable Open Source Chatbot Platform. Build multiple Chatbots with NLP, Behavior Rules, API Connector, Templating. Developed in Java, provided with Docker, orchestrated with Kubernetes or Openshift.
Stars: ✭ 171 (-7.57%)
Mutual labels:  bot-api, bot
Ex gram
Telegram Bot API low level API and framework
Stars: ✭ 103 (-44.32%)
Mutual labels:  api, bot
Fondbot
Chatbot framework
Stars: ✭ 102 (-44.86%)
Mutual labels:  bot-api, bot
Novagram
An Object-Oriented PHP library for Telegram Bots
Stars: ✭ 112 (-39.46%)
Mutual labels:  api, bot
Wa Automate Nodejs
💬 🤖 The most advanced NodeJS WhatsApp library for chatbots with advanced features. Be sure to 🌟 this repository for updates!
Stars: ✭ 1,326 (+616.76%)
Mutual labels:  api, bot
Tiledesk Server
Tiledesk server. Tiledesk is an Open Source Live Chat platform written in NodeJs and MongoDB
Stars: ✭ 94 (-49.19%)
Mutual labels:  api, bot
Youtubeshop
Youtube autolike and autosubs script
Stars: ✭ 177 (-4.32%)
Mutual labels:  api, bot
Go Tgbot
Golang telegram bot API wrapper, session-based router and middleware
Stars: ✭ 90 (-51.35%)
Mutual labels:  api, bot
Telebot.nim
Async client for Telegram Bot API in pure Nim [Bot API 5.1]
Stars: ✭ 93 (-49.73%)
Mutual labels:  api, bot
Slack Starterbot
Python-powered simple starter Slack bot.
Stars: ✭ 169 (-8.65%)
Mutual labels:  api, bot

[Archived] Open Source Bot Connector

As communicated earlier in August 2019, this repository has been archived and the source code is not maintained by the SAP Conversational AI team.

All Bot Connector capabilities are integrated in our bot building platform.

If you are running a standard / customised version of open source bot connector on your platform, please migrate to the bot connector available on our bot building platform (hosted in on SAP Cloud Platform), which offers integration with a wide number of channels which that we plan to make more robust.

If you have any questions, please contact our team.

Bot Connector Logo

Supported Channels Getting Started How it works Messages Formats Getting Started with SAP Conversational AI

💬 Questions / Comments? Join the discussion on our community Slack channel!

Bot Connector

Bot Connector allows you to connect your bot to multiple messaging channels.

It provides a higher level API to manage several messaging platforms at once, and lets you focus on your bot by using a simple and unique format to talk to the entire world.

Documentation

You can see the API documentation here

Or generate the documentation with the following command:

yarn docs && open docs/index.html

Supported Channels

Bot Connector supports the following channels:

You can find more information on each channel in the wiki

More will be added, and you can contribute if you want to, and add a thumbs up for the channel you want to see implemented first ;) (To do so, fork this repo, add a thumbs up and make a PR!)

  • Discord 👍👍👍
  • Ryver 👍
  • Viber
  • Wechat 👍👍
  • Zinc.it 👍
  • Salesforce 👍

Getting started

The following examples use yarn package manager but you can use your favorite one like npm, or pnpm.

In order to run the connector you need MongoDB and Redis installed and running. The configuration files for both are stored in config directory.

Installation

Clone the repository and install the dependencies

git clone https://github.com/SAPConversationalAI/bot-connector.git
cd bot-connector
yarn install

Available Commands

  • yarn start - Start application in production mode
  • yarn start:dev - Start application in development mode
  • yarn start:dev:debug - Start application in development mode with debugger
  • yarn test - Run unit & integration tests
  • yarn test:debug - Run unit & integration tests with debugger
  • yarn test:coverage - Run unit & integration tests with coverage report
  • yarn lint - Run ESLint
  • yarn build - Build artifacts for production
  • yarn docs - Generate apidoc documentation

Configurations/Environments

You need to create a configuration file based on the following schema:

config/{env}.js (e.g. config/development.js for NODE_ENV=development)

module.exports = {
  db: {
    host: 'localhost',
    port: 27017,
    dbName: 'botconnector',
  },
  server: {
    port: 8080,
  },
  redis: {
    port: 6379,
    host: 'localhost',
    auth: '',
    db: 7,
    options: {},  // see https://github.com/mranney/node_redis#rediscreateclient
  },
  mail: {},  // valid object to be passed to nodemail.createTransport()
  base_url: '',  // base url of the connector
  facebook_app_id: '',
  facebook_app_secret: '',
  facebook_app_webhook_token: '',
  amazon_client_id: '',  // Client ID for use with Login with Amazon (Amazon Alexa channel)
  amazon_client_secret: '',  // Client Id for use with Login with Amazon (Amazon Alexa channel)
}

Running in development mode (hot reload)

yarn start:dev

Setup your connector

First of all, you need to create a connector with the Bot Connector's API.

curl -X POST 'http://localhost:8080/connectors' --data 'url=YOUR_BOT_ENDPOINT_URL'

Then you need some code so the Bot Connector, via the connector you've just created, can send you the messages it receives. You can use the code from the example as a starter.

cd example
yarn install
yarn start

Now that your bot (well, your code) and the Bot Connector are running, you have to create channels. A channel is the actual link between your bot (the connector) and a specific service like Messenger, Slack or Kik. One connector can have multiple channels.

How it works

There are two distinct flows:

  • your bot receives a message from a channel
  • your bot sends a message to a channel

This pipeline allows us to have an abstraction of messages independent of the platform and implement only a few functions for each messaging platform (input and output parsing).

Receive a message

The Bot Connector posts on the endpoint stored with the connector each time a new message arrives from a channel.

  • a new message is received by Bot Connector
  • the message is parsed by the corresponding service
  • the message is saved in MongoDB
  • the message is post to the bot endpoint

BotConnector-Receive

Post a message

To send a new message, you have to post it to Bot Connector's API

  • the messages are saved in MongoDB
  • the messages are formatted by the corresponding service to match the channel's format
  • the messages are sent by Bot Connector to the corresponding channel

BotConnector-Sending

Messages format

All messages coming from the bot are parsed and modified to match the destination channel specifications. Bot Connector supports several message formats:

  • Text
{
  type: 'text',
  content: 'MY_TEXT',
}
  • Picture
{
  type: 'picture',
  content: 'IMAGE_URL',
}
  • Video
{
  type: 'video',
  content: 'VIDEO_URL',
}
  • Quick Replies
{
  type: 'quickReplies',
  content: {
    title: 'TITLE',
    buttons: [
      {
        title: 'BUTTON_1_TITLE',
        value: 'BUTTON_1_VALUE',
      }, {
        title: 'BUTTON_2_TITLE',
        value: 'BUTTON_2_VALUE',
      }
    ]
  }
}
  • List
{
  type: 'list',
  content: {
    elements: [
      {
        title: 'ELEM_1_TITLE',
        imageUrl: 'IMAGE_URL',
        subtitle: 'ELEM_1_SUBTITLE',
        buttons: [
          {
            title: 'BUTTON_1_TITLE',
            value: 'BUTTON_1_VALUE',
            type: 'BUTTON_TYPE',
          }
        ]
      }
    ],
    buttons: [
      {
        title: 'BUTTON_1_TITLE',
        value: 'BUTTON_1_VALUE',
        type: 'BUTTON_TYPE',
      }
    ]
  }
}
  • Card
{
  type: 'card',
  content: {
    title: 'CARD_TITLE',
    subtitle: 'CARD_SUBTITLE',
    imageUrl: 'IMAGE_URL',
    buttons: [
      {
        title: 'BUTTON_TITLE',
        type: 'BUTTON_TYPE', // See Facebook Messenger button formats
        value: 'BUTTON_VALUE',
      }
    ],
  },
}
  • Carousel
{
  type: 'carousel',
  content: [
    {
      title: 'CARD_1_TITLE',
      imageUrl: 'IMAGE_URL',
      buttons: [
        {
          title: 'BUTTON_1_TITLE',
          value: 'BUTTON_1_VALUE',
          type: 'BUTTON_1_TYPE',
        }
      ]
    }
  ],
}

Getting started with SAP Conversational AI

We build products to help enterprises and developers have a better understanding of user inputs.

  • NLP API: a unique API for text processing, and augmented training.
  • Bot Building Tools: all you need to create smart bots powered by SAP Conversational AI's NLP API. Design even the most complex conversation flow, use all rich messaging formats and connect to external APIs and services.
  • Bot Connector API: standardizes the messaging format across all channels, letting you connect your bots to any channel in minutes.

Learn more about:

API Documentation Discover the platform First bot tutorial Advanced NodeJS tutorial Advanced Python tutorial
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].