https://github.com/ejach/notion-budgeter
Keeps a given Notion database up to date with expenses using Teller.
https://github.com/ejach/notion-budgeter
budget budgeting docker notion notion-api notion-client python teller teller-api
Last synced: about 1 month ago
JSON representation
Keeps a given Notion database up to date with expenses using Teller.
- Host: GitHub
- URL: https://github.com/ejach/notion-budgeter
- Owner: ejach
- Created: 2023-07-11T22:17:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-16T22:04:37.000Z (5 months ago)
- Last Synced: 2024-12-16T23:20:35.106Z (5 months ago)
- Topics: budget, budgeting, docker, notion, notion-api, notion-client, python, teller, teller-api
- Language: Python
- Homepage:
- Size: 62.5 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### notion-budgeter
[](https://pypi.org/project/notion-client/)
[](https://pypi.org/project/schedule/)
[](https://pypi.org/project/SQLAlchemy/)
[](https://pypi.org/project/Requests/)Keeps a given Notion database up to date with transactions using Teller.
#### docker-compose.yml
```yml
version: '3.7'
services:
notion_budgeter:
image: ghcr.io/ejach/notion-budgeter
container_name: notion_budgeter
environment:
- data_dir=
- notion_secret=
- notion_db=
- notion_custom_property= # optional
- notion_icon= # optional, default ๐งพ
- teller_account_id=
- teller_access_token=
- teller_cert_path=
- teller_key_path=
- excluded= # 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) | โ |
| `teller_account_id` | ID associated with your Teller account | โ |
| `teller_access_token` | Token associated with your Teller account | โ |
| `teller_cert_path` | Path to the Teller certificate `.pem` file | โ |
| `teller_key_path` | Path to the Teller key `.pem` file | โ |
| `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:
- [Notion](https://notion.so) account
- A Notion Integration added to a desired database (see the [Notion guide](https://www.notion.so/help/create-integrations-with-the-notion-api))
- A [Teller](https://teller.io) account with a connected financial account (see the [Documentation](https://teller.io/docs))____
#### Expected Notion Columns```bash
'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:
```python
{'Category': {'type': 'multi_select', 'multi_select': [{'name': '\u2754Uncategorized'}]}}
```Or a list of Python-like dictionaries:
```python
{'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](https://developers.notion.com/reference/database#database-property).
> NOTE: Use a Python code beautifier like [Code Beautify](https://codebeautify.org/python-formatter-beautifier) if you get stuck.