Tutorials>Learn creating a glip bot with botbuilder-glip

A step by step tutorial to get you started with creating a glip with botbuilder-glip in Node.js.

Start Tutorial

Prerequisites

  • Install Node.js with version 8
  • Install Ngrok to create a secure tunnel to local host
  • Create a RingCentral developer free account to create a new app with platform type -"Server/bot"
  • Create a Microsoft LUIS account (optional with AI)

Set up the project

  • Clone the demo repo with git.
  • Install dependencies with NPM or Yarn

Start Ngrok

Start ngrok to get a domain url

Configuration

Create .env file in project root folder

$ cp .env.sample .env
$ vim .env

Please visit Developer Portal to apply client ID and secret. And ensure add following redirect URI to your app settings:

YOUR_GLIP_BOT_SERVER/oauth

GLIP_BOT_VERIFICATION_TOKEN is a 32 random chars for webhook request verification.

Use dotenv

Use dotenv to import environments from .env file

Setup cache file

Set cache file to cache bot data, include token and identity

Create Glip Connector instance

Setup botbuilder and botbuilder-glip

When replyOnlyMentioned is enabled, bot will only get message when mentioned in multiple people group.

Connect botbuilder with restify server

Response oauth and webhook request in Glip Connector

Create BotBuilder instance with Glip Connector

Setup botbuilder and botbuilder-glip

Handle glip message

Get message from session in dialog. Send message glip by session.send.

Work with LUIS AI

Useing LUIS to recognize glip message to intent and entities.