Skip to content

niteshpatel/habitica-slack

Repository files navigation

habitica-slack Build Status Code Climate Coverage License StackShare

Habitica extension to send and receive messages from a Habitica Group Chat to a Slack Channel.

Deploy

Requirements

Slack Integrations

As well as a Slack channel and a Habitica account, you need to create a slack app to manage message delivery:

  1. Setup Event Subscriptions in Slack to support sending messages from Slack to Habitica
  2. Setup Incoming WebHooks in Slack to support receiving messages from Habitica to Slack

Setup Event Subscriptions in Slack

  1. Browse to Event Subscriptions
  2. Enable Events: On
  3. Request URL: <heroku-app-url>/sync_message_to_habitica e.g. https://myapp.herokuapp.test/sync_message_to_habitica
  4. Subscribe to Workspace Events > Add Workspace Event: message.channels
  5. Subscribe to Workspace Events > Add Workspace Event: message.groups

Setup Incoming WebHooks in Slack

  1. Browse to Incoming Webhooks
  2. Activate Incoming Webhooks: On
  3. Webhook URLs for Your Workspace > Add New Webhook to Workspace: Post to: <your-slack-channel> e.g. #Habitica

Setup Habitica WebHook

  1. Visit <heroku-app-url>/setup_habitica_webhook to setup the Habitica webhook

Heroku Configuration (optional if Habitica WebHook above is not working)

Not everything in the Heroku setup can be automated with the Deploy button. You will need to add the command for the scheduler manually.

  1. Browse to https://scheduler.heroku.com/dashboard
  2. Add a new job as follows
    1. Command: python manage.py sync_messages_to_slack
    2. Dyno size: Free
    3. Frequency: Every 10 minutes