zxdong262 / ping-pong-engage-digital-chatbot

Example engage digital chat bot that will respond with "pong" for "ping" message.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ping-pong-engage-digital-chatbot

Simple example engage digital chatbot that will repond with 'pong' to message with 'ping', created with RingCentral engage Digital chatbot framwork.

Youtube video

https://youtu.be/HDDGUFIzNxQ

Quick start

Let's start a simple chatbot server.

# get the code
git clone git@github.com:zxdong262/ping-pong-engage-digital-chatbot.git
cd ping-pong-engage-digital-chatbot

# install dependecies
npm i

# start proxy server, this will make your local bot server can be accessed by RingCentral service
npm run ngrok

# will show
Forwarding                    https://xxxx.ap.ngrok.io -> localhost:4100
# Remember the https://xxxx.ap.ngrok.io, we will use it later

Follow steps to prepare email source and webhook for chatbot to prepare the email source and webhook.

# create env file
cp .env.sample .env
# then edit .env, set proper setting according to the tip in .env

# run local dev server
npm start

Test bot

  • Send a email with "ping" to your predefined email source address, then bot will auto reply with pong.
  • You may edit src/server/index.js to set your own reply logic.

Build

npm run build

Run production code

# after npm run build
npx ringcentral-engage-chatbot dist/server/index.js

Build and deploy to AWS Lambda

https://github.com/ringcentral/ringcentral-engage-chatbot-js/blob/master/docs/deploy-to-lambda.md

License

MIT

About

Example engage digital chat bot that will respond with "pong" for "ping" message.


Languages

Language:JavaScript 100.0%