Send your spendings to bot and it will add them to specified spreadsheet.
- Add google credentials as described in Google Sheets API Node.js Quickstart, content of
client_secret.json
file isCLIENT_SECRET
- Create your bot with @botfather, it's token is
BOT_TOKEN
- Create spreadsheet with Google's template
Monthly budget
, assignSHEET_ID
variable to its ID
cp .env.example .env
- Fill
.env
:POLLING=true
: for local usage you can work without webhook's configuratoinSTORAGE=file
: for quick start you shouldn't configure db
npm install
npm start
Deploy to Heroku
You can deploy your own instance of this bot by following this steps:
- Install Heroku CLI
- Create project
heroku create <your-name>
- Add postgress add-on
heroku addons:create heroku-postgresql:hobby-dev
- Fill environment variables on project's dashboard:
WEBHOOK_ROOT
is the address of your project, likehttps://<your-name>.heroku.com
POLLING=false
: Apps on Heroku shut down from time to time, so you need to use webhooks.BOT_TOKEN
,SHEET_ID
,CLIENT_SECRET
: see aboveADAPTER=standart
STORAGE=db
git push heroku master
I have slightly different spreadsheet from default template, so I have changed data-to-rows converters. Feel free to create your own: maybe you will use this app for completely different purpose?