Add Actual Budget import + reminder workflows to README
- 💰 Actual — Import Estratto Conto [Telegram] (qtvB3r0cgejyCxUp) - ⏰ Actual — Reminder Estratto Conto [Schedule] (w0oJ1i6sESvaB5W1) - 📄 Paperless — Upload Documento [Multi] (GBPFFq8rmbdFrNn9) - Retired Upload Bolletta [Email] and Upload Documento [Telegram] - Added Google Calendar credential to table (ZIVFNgI3esCKuYXc) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
53
README.md
53
README.md
@@ -216,26 +216,46 @@ Notification is sent via **Amazon Echo / Pompeo** (TTS) for voice, and **Telegra
|
||||
- If a bill/invoice PDF is detected → triggers the **Upload Bolletta** webhook
|
||||
- Sends a digest report to Telegram
|
||||
|
||||
### 📄 Paperless — Upload Bolletta [Email] (`vbzQ3fgUalOPdcOq`)
|
||||
### 📄 Paperless — Upload Documento [Multi] (`GBPFFq8rmbdFrNn9`) ✅ Active
|
||||
|
||||
- Triggered by webhook from Daily Digest (payload includes `email_id`)
|
||||
- Downloads the PDF attachment from Gmail API
|
||||
- Fetches Paperless metadata (correspondents, document types, tags, storage paths, similar existing documents)
|
||||
- Calls GPT-4.1 to infer Paperless metadata (correspondent, doc type, tags, storage path, filename, date)
|
||||
- Uploads PDF to Paperless, polls task status, patches metadata on the created document
|
||||
- Sends Telegram confirmation
|
||||
Replaces the two retired workflows below. Single core pipeline with two entry points:
|
||||
|
||||
### 📄 Paperless — Upload Documento [Telegram] (`ZX5rLSETg6Xcymps`)
|
||||
- **Trigger 1 — Telegram**: PDF sent to bot with caption starting with "Documento" → downloads file
|
||||
- **Trigger 2 — Webhook** (`POST /webhook/paperless-upload`): called by Daily Digest with `{email_id, attachment_id, filename, hint, from}` → downloads attachment from Gmail API
|
||||
|
||||
- Triggered by Telegram bot (user sends a PDF with caption starting with "Documento")
|
||||
- Downloads file from Telegram
|
||||
- Sends to FileWizard OCR microservice (async job), polls for result
|
||||
- Same GPT-4.1 metadata inference pipeline as above
|
||||
- Uploads to Paperless (filename = original filename without extension), patches metadata
|
||||
- Sends Telegram confirmation with link to document
|
||||
- Cleans up FileWizard: deletes processed files, then clears job history
|
||||
Both paths converge:
|
||||
- FileWizard OCR (async, polls job) → GPT-4.1 metadata inference → Paperless upload → PATCH metadata → Telegram confirmation → FileWizard cleanup
|
||||
- Dedup: if Paperless returns "duplicate", patches the existing document's metadata instead
|
||||
|
||||
**Common pattern across all three**: GitHub Copilot token is obtained fresh at each run (`GET https://api.github.com/copilot_internal/v2/token`), then used for `POST https://api.githubcopilot.com/chat/completions` with model `gpt-4.1`.
|
||||
> 🔴 **Retired** (deactivated):
|
||||
> - `vbzQ3fgUalOPdcOq` — Paperless — Upload Bolletta [Email]
|
||||
> - `ZX5rLSETg6Xcymps` — Paperless — Upload Documento [Telegram]
|
||||
|
||||
---
|
||||
|
||||
### 💰 Actual — Import Estratto Conto [Telegram] (`qtvB3r0cgejyCxUp`) ✅ Active
|
||||
|
||||
Imports bank CSV statements (Banca Sella format) into Actual Budget via Telegram upload.
|
||||
|
||||
- **Trigger**: Telegram bot, send CSV file with caption starting with "Estratto"
|
||||
- Fetches token Copilot → downloads CSV binary from Telegram
|
||||
- Parses CSV: skips SALDO rows, extracts transactions with `Id. XXXXXXXXX` as dedup key
|
||||
- Calls Actual HTTP API to fetch existing payees, categories, and transactions since `min_date`
|
||||
- Deduplicates: skips transactions already present (by `imported_id = banca-sella-{Id}`)
|
||||
- Splits remaining transactions into batches of 30
|
||||
- **Per batch**: GPT-4.1 classifies each transaction (payee, category, notes) → creates missing payees/categories on Actual → imports transactions
|
||||
- Final Telegram report: imported count, skipped, new payees/categories created
|
||||
- After report: marks Google Task "Actual - Estratto conto" in list "Finanze" as completed (non-blocking)
|
||||
|
||||
**CSV format** (Banca Sella): `;` separator, `dd/mm/yyyy` dates, `.` decimal, Row 1 = header, Row 2 = SALDO FINALE (skip), Last row = SALDO INIZIALE (skip).
|
||||
|
||||
### ⏰ Actual — Reminder Estratto Conto [Schedule] (`w0oJ1i6sESvaB5W1`) ✅ Active
|
||||
|
||||
- Daily cron at 09:00 → checks Google Tasks for "Actual - Estratto conto" in "Finanze" list
|
||||
- If task exists and is not completed (due date ≤ today or no due date) → sends Telegram reminder
|
||||
- Reminder instructs to upload CSV via Telegram with caption `Estratto [mese]`
|
||||
|
||||
**Common pattern across Paperless + Actual workflows**: GitHub Copilot token is obtained fresh at each run (`GET https://api.github.com/copilot_internal/v2/token`), then used for `POST https://api.githubcopilot.com/chat/completions` with model `gpt-4.1`.
|
||||
|
||||
### n8n Credentials (IDs)
|
||||
|
||||
@@ -245,6 +265,7 @@ Notification is sent via **Amazon Echo / Pompeo** (TTS) for voice, and **Telegra
|
||||
| `uTXHLqcCJxbOvqN3` | Telegram account | Telegram API |
|
||||
| `vBwUxlzKrX3oDHyN` | GitHub Copilot OAuth Token | HTTP Header Auth |
|
||||
| `uvGjLbrN5yQTQIzv` | Paperless-NGX API | HTTP Header Auth |
|
||||
| `ZIVFNgI3esCKuYXc` | Google Calendar account | Google Calendar OAuth2 (also used for Tasks API) |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user