Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

A slack app to track changes in an NRG (energi) address

Notifications You must be signed in to change notification settings

zahin-mohammad/energi3-slack-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NRG Slack Bot

A slack custom integration using a heroku scheduler to update slack channel when an address(s) have balance changes.

Example of working bot

Requirements:

  • Heroku account
  • Firebase account
  • Heroku CLI
  • git
  • Slack workspace with admin privilege

Getting Started

  • Create a slack custom integration if you have not already
  • git clone [email protected]:zahin-mohammad/nrg-slack-app.git
  • cd nrg-slack-app
  • Create a heroku project (skip if its already set up)
    • heroku login
    • heroku create
    • heroku push origin master
  • Setup Environment Variables:
    • These can also be configured on the web client for heroku
    • heroku config:set webhook="{slack incoming web hook}"
    • heroku config:set addressList="{space separated list of addresses}"
  • Install the scheduler via the CLI
    • heroku addons:create scheduler:standard
  • Configure the scheduler
    • heroku addons:open scheduler
    • python3 ./bin/nrg-address-summary.py run command
    • configure frequency as desired
  • Setup Firebase
    • Create a firebase project at https://firebase.google.com/
    • Create a database
    • Download a private key from settings -> Service Accounts
    • Rename this file to firestore-admin.json
  • Add Firebase Admin Cred to Heroku
    • On the web heroku client, paste in the contents of firestore-admin.json into a config var (environment variable) called firestoreAdmin
  • Verify that the script works
    • heroku run python3 ./bin/nrg-address-bot.py
    • Should see a slack message

About

A slack app to track changes in an NRG (energi) address

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages