Serverless Poll Bot for Slack
AGPL-3.0 License
Serverless Poll Bot for Slack using the Serverless Framework for deployment.
Polly is designed to run on AWS infrastructure using Lambda and DynamoDB. For small to medium teams the free tier provided by AWS should allow the usage without any costs.
After installing and adding the Bot to your Channel, you can create new polls using the /poll
command.
/poll "Do you like cats?" "Yes" "Of Course" "Everybody loves cats"
Next to the created poll you'll find a menu button which allows you to close and delete the poll. Furthermore you can open the settings menu that is used for things like scheduling.
You can create reuccuring polls using the scheduling feature. Open the settings menu, select the prefered schedule type and then configure it.
The configured time is using the user's timezone.
Create an .env file with the following content:
CLIENT_SIGNING_SECRET=123456450645
BOT_TOKEN=xoxb-SOME_TOKEN
After setting up serverless, you can simply deploy the application using:
sls deploy
When the application is deployed, you need to add the following configurations to Slack:
app_mention
and message.channels
commands/poll
with Request UrlNow you should be able to add the Bot to your channels and use it.
There is a docker-compose file in /dynamodb
that can be used to start a local dynamoDB.
Afterwards the Bot can be started with npm start
. It's required to setup some reverse proxy (e.g. using ngrok
).
This bot was largely inspired by the openpollslack build by @KazuAlex.
The logo was kindly provided by @luisalisanne.