Skip to content

Automation Flows

This document describes typical end-to-end automation scenarios within the home lab and family automation stack.

1. School Activity Extraction

Goal: Automatically add school activities mentioned in emails to the family calendar.

  1. Ingest: A new email arrives from the school domain.
  2. Store: n8n triggers on the email, extracts the PDF attachment, and uploads it to Paperless-ngx.
  3. Understand: Paperless-AI (using Ollama) scans the document for dates and event descriptions.
  4. Decide: The AI determines if the document contains a calendar event. If yes, it formats the data (JSON).
  5. Act: n8n receives the JSON and creates an event in Google Calendar.
  6. Sync: The event is automatically synced to the family's shared calendar via CalDAV or native apps.

2. Physical Mail to Action

Goal: Digitizing physical mail and creating follow-up tasks.

  1. Ingest: Physical document is scanned using a mobile scanner app or dedicated hardware.
  2. Store: The scan is saved to a folder monitored by Syncthing or uploaded directly to Nextcloud.
  3. Process: OCRmyPDF automatically adds a searchable text layer.
  4. Understand: Paperless-ngx ingest the document and applies tags (e.g., "urgent", "invoice").
  5. Act: Home Assistant detects a new "urgent" document and sends a notification to the family chat.
  6. Sync: A corresponding task is created in Vikunja with the document link for follow-up.

3. Local Development to Automated Deployment

Goal: Streamlining the creation and deployment of home automation scripts.

  1. Dev: Developer uses Cursor or Aider to build a new Python script.
  2. Reason: Jules assists in writing tests and refactoring the code for reliability.
  3. Act: Code is committed to local GitHub or Gitea repository.
  4. Sync: Cloud Code or n8n detects the commit and triggers a deployment to the local Kubernetes cluster or a Docker host.
  5. Verify: Automated agents in Anti-Gravity verify the live deployment by running browser-based tests.