Automatic responses for Google Chat and Hangouts.
Python Shell JavaScript CSS HTML Ruby
Switch branches/tags
Nothing to show
Clone or download
simon-weber switch some warnings to info
this prevents them from going to sentry
Latest commit ca80929 Jun 27, 2018
Permalink
Failed to load latest commit information.
assets add favicon Oct 24, 2015
gchatautorespond switch some warnings to info Jun 27, 2018
ops collect testworker logs Mar 18, 2018
secrets add test account credentials Mar 17, 2018
test patch out WorkerIPC Aug 19, 2016
.flake8 ignore breaks before binary ops Sep 2, 2016
.gitattributes add an unencrypted README to the secrets folder [closes #5] Oct 6, 2016
.gitignore gitignore email csv template Oct 14, 2017
CONTRIBUTING.md add licensing code Oct 1, 2016
LICENSE Initial commit Oct 18, 2015
README.md update readme copy Oct 15, 2017
ansible.cfg reorganize supervisor logs Sep 2, 2016
delete_old_mail.py log start of periodic scripts Oct 15, 2016
dev-requirements.in switch to pinned pip-tools Sep 6, 2016
dev-requirements.txt clean up error presentation (upgrade bootstrap, add js/jquery) Oct 11, 2017
manage.py open source Oct 18, 2015
reenable_bots.py reenable bots hourly Oct 15, 2016
requirements.in add bootstrap3 Jan 16, 2017
requirements.txt clean up error presentation (upgrade bootstrap, add js/jquery) Oct 11, 2017
run_testworker.py add test worker Mar 18, 2018
run_worker.py add test worker Mar 18, 2018
standalone_bot.py add notification overrides for excluded contacts Oct 14, 2017
standalone_oauth.json add web oauth flow for standalone bot [closes #6] Oct 6, 2016
supervisord.conf add test worker Mar 18, 2018
sync_licenses.py log start of periodic scripts Oct 15, 2016
test_requirements.txt upgrade gevent; refactor requirement files Aug 28, 2016

README.md

Autoresponder for Google Chat and Hangouts

Autoresponder is a Django project that hosts static Google Chat/Hangouts bots.

I originally created it to avoid unnoticed messages to my forwarding accounts, but it's also found use with employees and small business owners.

The hosted version is available at https://gchat.simon.codes.

self-hosting

Autoresponder can also be self-hosted.

First, install the dependencies and connect your account:

$ pip install -r requirements.txt
$ python standalone_bot.py auth

You only need to run this once. The OAuth credentials will be written to your current working directory.

Then, start the bot:

$ python standalone_bot.py run my-email@gmail.com 'my autoresponse'

To further customize your bot, modify the constructor params for AutoRespondBot in standalone_bot.py

Email notifications are not currently supported when self-hosting (#7).

project layout

  • gchatautorespond/apps/autorespond: main django app
  • gchatautorespond/lib/chatworker: manages chat bots
  • test: tests
  • ops: ansible config (3rd party roles vendorized)
  • secrets: prod secrets (managed with transcypt)
  • assets: served with dj-static (not nginx because I'm lazy)

development

To create a new dev environment:

  • create a new virtualenv
  • pip install -r test_requirements.txt
  • DJANGO_SETTINGS_MODULE=gchatautorespond.settings_dev python manage.py migrate

Then:

  • run locally: DJANGO_SETTINGS_MODULE=gchatautorespond.settings_dev python manage.py supervisor
  • run tests: DJANGO_SETTINGS_MODULE=gchatautorespond.settings_dev ./manage.py test test/