https://github.com/zxdong262/ringcentral-poll-bot
Poll bot for ringcentral glip, created with ringcentral-chatbot-framework and ringcentral-chatbot-factory
https://github.com/zxdong262/ringcentral-poll-bot
bot poll ringcentral
Last synced: 4 months ago
JSON representation
Poll bot for ringcentral glip, created with ringcentral-chatbot-framework and ringcentral-chatbot-factory
- Host: GitHub
- URL: https://github.com/zxdong262/ringcentral-poll-bot
- Owner: zxdong262
- License: mit
- Created: 2018-11-24T16:09:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-08T03:05:01.000Z (about 7 years ago)
- Last Synced: 2025-02-13T05:16:38.551Z (over 1 year ago)
- Topics: bot, poll, ringcentral
- Language: Python
- Homepage:
- Size: 293 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Support: supported-commands.md
Awesome Lists containing this project
README
# ringcentral-poll-bot
Poll bot for ringcentral glip, created with [ringcentral-chatbot-framework](https://github.com/zxdong262/ringcentral-chatbot-python) and [ringcentral-chatbot-factory](https://github.com/zxdong262/ringcentral-chatbot-factory-py).
This simple bot use custom database wrapper(sqlite3) in local dev, read [bot-logic.py](bot-logic.py), [survey_bot.py](survey_bot.py) and [sqlite_custom.py](sqlite_custom.py) for more details.

[Supported Commands](supported-commands.md)
## Table of contents
- [Prerequisites](#prerequisites)
- [Development & Quick start](#development--quick-start)
- [Test bot](#test-bot)
- [Building and Deploying to AWS Lambda](#building-and-deploying-to-aws-lambda)
- [License](#license)
## Prerequisites
- Python3.6+ and Pip3
- Create the bot App: Login to [developer.ringcentral.com](https://developer.ringcentral.com) and create an `public` `Server/Bot` app with permissions: `ReadAccounts, Edit Extensions, WebhookSubscriptions, Glip`(or more as you may need)
## Development & Quick start
```bash
# use virtualenv
pip3 install virtualenv # might need sudo
# init virtual env
virtualenv venv --python=python3
# use env
source ./venv/bin/activate
# install deps
pip install -r requirements.txt
# run ngrok proxy
# since bot need https server,
# so we need a https proxy for ringcentral to visit our local server
./bin/proxy
# will show:
# Forwarding https://xxxxx.ngrok.io -> localhost:8989
# create env file
cp .sample.env .env
# then edit .env, set proper setting,
# and goto your ringcentral app setting page, set OAuth Redirect URI to https://https://xxxxx.ngrok.io/bot-oauth
RINGCENTRAL_BOT_SERVER=https://xxxxx.ngrok.io
## for bots auth required, get them from your ringcentral app page
RINGCENTRAL_BOT_CLIENT_ID=
RINGCENTRAL_BOT_CLIENT_SECRET=
# create custom bot config file
cp bot-logic.py config.py
# run local dev server
./bin/start
```
## Test bot
- Goto your ringcentral app's bot section, click 'Add to glip'
- Login to [https://glip-app.devtest.ringcentral.com](https://glip-app.devtest.ringcentral.com), find the bot by searching its name. Talk to the bot.
- Edit config.py to change bot bahavior and test in [https://glip-app.devtest.ringcentral.com](https://glip-app.devtest.ringcentral.com)
## Building and Deploying to AWS Lambda
[deploy-to-aws-lambda](https://github.com/zxdong262/ringcentral-chatbot-python/blob/master/docs/deploy-to-aws-lambda.md)
## License
MIT