Connect your Mondo to Google sheets.
Registers a webhook with mondo and posts your transactions to a spreadhseet.
-
Create a google sheet with row headers matching the keys you want imported to the sheet. All keys sent from the webhook can be found in the webhook documentation. (Only
merchant_id
from the merchant object is supported at the moment) -
Get your OAuth credentials from Mondo
-
Follow the instructions in the
google-spreadsheet
for setting up a service account for use with google sheets. -
Set the environment variables below or in a
.env
file if testing locally. Run all commands prepended withNODE_ENV=development
locally.
GOOGLE_CLIENT_EMAIL=
GOOGLE_PRIVATE_KEY=
GOOGLE_SHEET_KEY=
MONDO_CLIENT_ID=
MONDO_CLIENT_SECRET=
MONDO_USERNAME=
MONDO_PASSWORD=
PORT=
WEBHOOK_ORIGIN=*
WEBHOOK_URL=
- Run
npm install
to add dependencies - Run
npm run register-hook
to register a webhook with theWEBHOOK_URL
you provided - Run
npm start
orNODE_ENV=development npm start
locally - Run
npm run prefill
to prefill the spreadsheet with all your past transactions
npm run start
- Start the server listening for webhooks
npm run prefill
- Fetch all past transactions and add them to the sheet (don't have the sheet tab open when you're using this!)
npm run list-hooks
- List webhooks
npm run register-hook
- Register a webhook for this application
npm run dedupe-hooks
- Remove webhooks with duplicate URLs
- Get the current account balance when a webhook is fired
The sheets API seems to silently fail if you try sending too many rows too fast. For now I've implimented a delay between adding rows.
I've removed account_balance
for now as it appears on old transactions but not the webhook ones yet.
Alex Robinson for his great mondo-bank
API library
Darian Moody for his help with de-duping webhooks