This script is used to help me take emails I label as receipts and load them into my obsidian vault. This allows me to keep track of receipts in a relational way.
Edit the file to fit your needs, then run python gmail_receipts_to_obsidian.py
on a regular basis to keep your inbox synced to obsidian.
- python3
-
This file can (and should) be modified to fit your liking, receipts are just a useful example I used.
-
The template is formed to be compatible with the dataview plugin for obsidian so long as you have the inline attributes option enabled.
This is what a file might look like:
---
tags: ['receipt','email']
aliases: []
---
# Your Electronic Receipt - The Home Depot <[email protected]>
-----------
**From**:: The Home Depot <[email protected]>
**To**::
**Bcc**::
**Date**:: Apr D YYYY HH:MM PM
**Subject**:: Your Electronic Receipt
-----------
## Associations
- [[Big Construction Project]]
- [[Contractor]]
- [[Me]]
## Contents
**EML**:: [[Obsidian Attachments/DD-MM-YYY_THH_MM_Your Electronic Receipt.eml]]
**PDF Attachment**:: ![[Obsidian Attachments/DD-MM-YYY_THH_MM_Your Electronic Receipt.pdf]]