Transform your financial chaos into clear insights! 🚀 This intelligent ETL tool automatically fetches, categorizes, and organizes your transactions from multiple banks using AI-powered classification. Eliminate manual data entry with automated financial tracking that seamlessly integrates with Google Sheets. Whether you're managing personal finances or business expenses, get complete visibility into your money flow with minimal effort—set it up once and let it run automatically every month! Plus, you'll receive a detailed summary email in your inbox after each automatic run, keeping you informed effortlessly.
Built for Fio Bank and Air Bank users, featuring OpenAI-powered categorization and robust automation.
Clean, organized financial data in Google Sheets with automated calculations
Note: Steps 4 and 5 are optional, but at least one must be configured — the app cannot function properly without a data source.
Install Dependencies
Ensure all necessary packages are installed by running:
yarn install
Set Up Environment Variables
Rename .env.template
to .env
in your project root.
Google Sheets Integration
GOOGLE_SHEET_ID_PROD
and optionally GOOGLE_SHEET_ID_DEV
.service-account.json
) must
exist in the root folder of this project.Note: Some data sources must be configured. These can be Fio Bank, Air Bank, or a custom source (e.g., parsing transaction PDFs from other banks).
Fio Bank (Optional)
FIO_TOKEN
.Note: If you need to modify FIO API calls, refer to the official documentation.
Air Bank (Optional)
EMAIL_USERNAME
, EMAIL_PASSWORD
, EMAIL_IMAP_SERVER
, EMAIL_IMAP_PORT
, and AIR_ATTACHMENT_PASSWORD
in ./.env.Note: Gmail is not supported due to the lack of basic authentication. You can use email providers such as Seznam.cz.
OpenAI Integration (Optional)
Rename the following files and fill in your category identifiers and descriptions:
./src/static/prompts/expenses.template.txt
-> ./src/static/prompts/expenses.txt
./src/static/prompts/incomes.template.txt
-> ./src/static/prompts/incomes.txt
Register and sign in to the OpenAI developer platform
Go to Settings -> Organization -> Billing.
Add credit (e.g., $5 is sufficient for more than a year of monthly execution, depending on usage).
Create a new project.
Go to API Keys.
Create a new secret key — fill in the name, assign the project, select full permissions, then create.
Copy the key value and add it to ./.env as OPENAI_TOKEN
.
Note: The default model for development is gpt-4o-mini
for its speed and cost-efficiency. In production, o3-mini
is used for its reliable output structure.
The application and integration tests support the following flags:
Flag | Shortcut | Type | Values | Default |
---|---|---|---|---|
--environment | -e | string | development, production | development |
--withLabeling | -w | boolean | true, false | undefined |
--actions | -a | string | all, mail, fio | undefined |
--cleanup | -c | string | all, mail, sheets | undefined |
--month | -m | string | MM-yyyy | undefined |
Integration tests support one additional flag to target specific test case identifiers. It should be used standalone, without other flags.
Flag | Shortcut | Type | Values | Default |
---|---|---|---|---|
--id | -i | array | 1,..,27 | [] |
Note: If flags are omitted and .env
values are not properly configured, the app will throw an error. In the code, these flags are referred to as "app arguments."
Start commands support flags for configuring the application.
To start the application in development mode, run:
yarn start
To start the application in production mode, run:
yarn start:prod
To reset the environment (delete the last month of data and mark emails as unread), run:
yarn cleanup:all
To run integration tests (supports flags described above):
yarn test:integration
Note: Integration tests also accept the --id
flag to run specific test case(s) by ID.
Example:
yarn test:integration --id 12 25 5
To run unit tests run:
yarn test:unit
Note: Unit tests are also triggered on merge to main via Github Action and can be run in watch mode using yarn test:watch
To build the application, run:
yarn build
To generate documentation, run:
yarn docs:generate
To start the documentation server, run:
yarn docs:start
To create a new version, run:
yarn release
To use the monthly automation GitHub Action for the entire ETL process after forking the repository, set up additional secrets beyond those listed in .env.template: INCOMES_PROMPT
, EXPENSES_PROMPT
for setting AI prompt logic. EMAIL_SMTP_SERVER
, EMAIL_SMTP_PORT
, and EMAIL_USERNAME_CI_NOTIFICATION
for email summary. The action can be triggered manually via the GitHub UI with all supported flags.
After the automation completes, an email notification is sent to the address specified by EMAIL_USERNAME_CI_NOTIFICATION
. This email contains a detailed monthly financial summary, including the number and total value of expenses, incomes, and investments for the last month, as well as key metrics like net income, savings rate, and expense ratio. The email also includes a direct link to the relevant Google Sheet with all financial data, and workflow details such as repository, workflow name, run ID, and trigger time. The email is formatted in HTML for clarity and readability.
yarn lefthook install
.commitlint
in the commit-msg
hook.pre-commit
hook.pre-commit
hook.pre-commit
hook.main
CodeQL workflow is triggered for additinal code quality check.Imports use the "@" alias configured in tsconfig and work project-wide. Vitest may execute files outside the test scope, so in .test.ts
files, prefer relative imports instead of using the index via aliases or directly.
All objects (methods, constants, types, classes) must be exported, even if used in a single module — otherwise, Typedoc won't include them. Two commands exist for documentation: one generates the docs, the other starts the server. Documentation is also hosted via GitHub Pages here, served directly from the main branch.
Automated release management is powered by release-please GitHub Action. This intelligent system automatically creates release PRs based on your commit history. Once you merge the PR, it instantly bumps the version and generates a comprehensive changelog. The entire process follows semantic versioning principles and relies on conventional commit messages for seamless automation.
Ideas what could be added is written in 2DO.md file.