Skip to content

ejach/notion-budgeter

Repository files navigation

notion-budgeter

PyPI PyPI PyPI

Keeps a given Notion database up to date with transactions using SimpleFin.

docker-compose.yml

version: '3.7'
services:
  notion_budgeter:
    image: ghcr.io/ejach/notion-budgeter
    container_name: notion_budgeter
    environment:
      - data_dir=<data_dir>
      - notion_secret=<notion_secret>
      - notion_db=<notion_db>
      - notion_custom_property=<custom_property> # optional
      - notion_icon=<notion_icon> # optional, default 🧾
      - simplefin_username=<simplefin_username>
      - simplefin_password=<simplefin_password>
      - simplefin_days_back=<simplefin_days_back> # optional,  default 2
      - include_pending=<True or False> # optional, default False
      - excluded=<expense_name> # optional
    volumes:
      - /path/to/data:/path/to/data
    restart: unless-stopped
Variable Description Required
data_dir Path to where the database file should be stored
notion_secret The secret token associated with your Notion integration
notion_db The database name that you want the data to be stored in (case-sensitive)
simplefin_username Username associated with your SimpleFin account
simplefin_password Password associated with your SimpleFin account
simplefin_days_back How many days back should SimpleFin get expenses from moving forward (Default is 2, anything greater than 60-90 days may not work
include_pending Include pending expenses from SimpleFin (True or False)
notion_custom_property Custom property in the format that Notion expects (see below)
notion_icon What icon should the expense have in Notion (Example: 💳)
excluded Expense name(s) that will not be written to Notion (Example: Walmart or Walmart,Amazon)

Environment Documentation

Pre-requisites:


Expected Notion Columns

'Expense' -> type: text
'Amount' -> type: number
'Date' -> type: date

You must format your Notion database to have these columns.

How to format Custom Properties

The program expects a Python-like dictionary:

{'Category': {'type': 'multi_select', 'multi_select': [{'name': '\u2754Uncategorized'}]}}

Or a list of Python-like dictionaries:

{'Category': {'type': 'multi_select', 'multi_select': [{'name': '\u2754Uncategorized'}]}, 
'Comment': {'type': 'rich_text', 'rich_text': [{'type': 'text', 'text': { 'content': 'Hello World' }}]}}

When adding these to your environment, they need to be encapsulated in quotes ""

More information on this format can be found here.

NOTE: Use a Python code beautifier like Code Beautify if you get stuck.

About

Keeps a given Notion database up to date with expenses using SimpleFin.

Topics

Resources

Stars

Watchers

Forks

Packages