Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/civictechto/slack-greeting-bot

A slackbot to send a greeting message to a user who joins a channel
https://github.com/civictechto/slack-greeting-bot

flask gunicorn heroku infrastructure python slackbot

Last synced: about 3 hours ago
JSON representation

A slackbot to send a greeting message to a user who joins a channel

Awesome Lists containing this project

README

        

# Slack Greeting Bot

Greetings! this is a Flask application that is hooked up to slack events api.
It sends a welcome message to the user that has just joined channels that this slackbot is configured to react to.

# Requirements

This Flask application is using python3, since python2.7 will be retiring [soon!!!](https://pythonclock.org/)

# Installation

```shell
#clone this repo
git clone
cd

# make sure you have virtualenv installed
virtualenv venv

# activate your virtualenv
source venv/bin/activate

# Install requirementst
pip install -r requirements.txt

```

# Development

Once the installation is done, can run the application locally.

```shell

export FLASK_APP=app.py

export FLASK_DEBUG=1

# Export the environ variables needed for sending chat messages
export SLACK_BOT_OAUTH_TOKEN='YOU_BOT_TOKEN_FROM_SLACK'

export SLACK_BOT_USERNAME='YOUR SLACKBOT USERNAME'

export CHANNEL_IDS='COMMA_SEPARATED_LIST_OF_CHANNEL_IDS'

# run the Flask app
python -m flask run

```

# Testing with Slack API

To test with the Slack API from your local development environment, would suggest `ngrok` to tunnel the flask app running on the machine's port.

# Deployment

We use [Heroku ](https://heroku.com) for hosting the chatbot service.

The `master` branch is setup to auto deploy to heroku whenever changes are pushed into the master branch. The `master` branch is a protected branch, changes can only be submitting through pull requests and requires reviews before merging. See our [CONTRIBUTING](CONTRIBUTING.md) for

The chatbot service lives at: [https://ctto-greetingbot.herokuapp.com](https://ctto-greetingbot.herokuapp.com)

# Contributing

Please see our [contributing guidelines](CONTRIBUTING.md).

# LICENSE

See [LICENSE](LICENSE)