How it works:
- Create a new spreadsheet or take the existing one
- Create a new Apps Script application:
- Copy and paste code from
Code.gs
and set it up according to the instructions in the comments - Add your Telegram username without "@" which will have access to the Telegram bot in the
GRANTED_USERS
constant in yourCode.gs
file. Not granted users will receive a message from the bot and won't be able to add expenses. If you want to have shared access from multiple accounts write several separated by commas'username1', 'username2', 'username3'
. - Register a new bot in BotFather and write the token from it to the
TOKEN
constant. - Write the spreadsheet ID in the
SPREADSHEET_ID
constant.
- If you going to use not the first list in the spreadsheet change the
SPREADSHEET_SHEET_INDEX
constant according to your list number (1st page — index 0, 2nd page — index 1, and so on). - Create a new deployment:
- Update
WEBAPP_URL
in your Code.gs and runinit()
function - When Google asks for granting permission to access your spreadsheet allow it.
- Write to your bot about expenses "Milk 10". One per line, each record on the new line.