Automation
The Automation module transforms your AI Executive Assistant into a hands-free processing pipeline. Using n8n (an open-source workflow automation tool), you'll set up file watchers, automatic routing, and scheduled tasks that run without manual intervention.
Prerequisites
- Foundation module completed (vault and AI provider configured)
- Meeting Processing module completed (processing scripts working)
- RAG Search module completed (Qdrant running)
- Calendar Integration module completed (daily briefings working)
- Docker Desktop installed (download)
- ~30 minutes to complete setup
What You'll Get
- File Watcher - Automatic processing when new meeting notes appear
- Automatic Routing - Intelligent detection of 1:1 vs group meetings
- End-to-End Processing - Summarization, embedding, and archiving without manual steps
- Scheduled Briefings - Daily meeting briefs generated every morning at 6 AM
- Error Handling - Automatic retries and failure notifications
- Zero Maintenance - Set it once, runs forever in the background
What is n8n?
n8n is an open-source workflow automation platform that connects different services and triggers actions based on events. Think of it as "if this, then that" for developers.
Why n8n?
- Self-Hosted - Runs on your machine, no external service required
- Visual Workflow Builder - Design automations with a drag-and-drop interface
- Rich Node Library - File watchers, SSH execution, HTTP requests, databases, and more
- Docker Support - Easy deployment alongside Qdrant
- Free & Open Source - Apache 2.0 license, no pricing tiers
How We Use n8n
Our automation stack uses n8n to:
- Monitor the Meetings folder for new .md files
- Parse frontmatter to detect meeting type (1:1 vs group)
- Execute the appropriate processing script via SSH
- Embed processed notes to Qdrant for semantic search
- Organize notes into quarterly folders
- Schedule daily briefing generation every morning
Docker Setup
We'll use Docker Compose to run both n8n and Qdrant as a unified stack, ensuring they can communicate and share persistent storage.
Create Docker Compose File
Create a directory for the n8n stack and compose file:
mkdir -p ~/n8n-stack
cd ~/n8n-stack Create docker-compose.yml with the following content:
version: '3.8'
services:
n8n:
image: n8nio/n8n:latest
container_name: n8n
restart: unless-stopped
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=changeme # CHANGE THIS!
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- GENERIC_TIMEZONE=America/New_York # Adjust to your timezone
- TZ=America/New_York
volumes:
- n8n_data:/home/node/.n8n
- ~/Obsidian:/data/obsidian:ro # Mount your vault (read-only)
- ~/.ssh:/home/node/.ssh:ro # SSH keys for executing scripts
- ~/.config/gcloud:/home/node/.config/gcloud:ro # For Vertex AI auth
networks:
- ai_assistant
qdrant:
image: qdrant/qdrant:latest
container_name: qdrant
restart: unless-stopped
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_data:/qdrant/storage
networks:
- ai_assistant
volumes:
n8n_data:
qdrant_data:
networks:
ai_assistant:
driver: bridge Security Note: Change N8N_BASIC_AUTH_PASSWORD to a secure password before starting.
Adjust Volume Paths
Update these paths to match your system:
~/Obsidian→ Path to your Obsidian vault root~/.ssh→ Path to SSH keys (for script execution)~/.config/gcloud→ Path to gcloud credentials (if using Vertex AI)
Start the Stack
cd ~/n8n-stack
docker-compose up -d Expected output:
Creating network "n8n-stack_ai_assistant" [completed]
Creating volume "n8n-stack_n8n_data" [completed]
Creating volume "n8n-stack_qdrant_data" [completed]
Creating n8n [completed]
Creating qdrant [completed] Verify Containers Are Running
docker ps You should see both n8n and qdrant containers with status "Up".
Access n8n Web Interface
Open your browser and navigate to:
http://localhost:5678
Log in with the credentials from your docker-compose.yml (default: admin / changeme).
Importing Workflow Templates
We provide pre-built workflow templates that you can import directly into n8n. These templates include all the necessary nodes and connections.
Available Templates
- Meeting Processor - File watcher → Type detection → Processing → Organization
- Daily Briefing - Scheduled task → Fetch calendar → Generate briefing
- Error Handler - Catch workflow failures → Log → Optional notification
Import a Workflow
- In n8n, click Workflows in the top menu
- Click Add Workflow
- Click the three dots menu (⋮) → Import from File
- Select the JSON template file (e.g.,
meeting-processor.json) - Click Import
The workflow will appear in the visual editor with all nodes pre-configured.
Download Templates
Templates are available in the templates directory of the repository:
meeting-processor.json- Main automation workflowdaily-briefing.json- Morning briefing schedulererror-handler.json- Error workflow (optional)
File Watcher Trigger
The file watcher monitors your Meetings folder and triggers the workflow whenever a new .md file is created.
How It Works
- Local File Trigger - n8n watches a specified directory path
- Event Filter - Only responds to "add" events (new files)
- Write Completion - Waits for file write to complete before processing
- File Reading - Reads the complete file content
- Text Extraction - Converts binary content to text for parsing
Configuration
In the Local File Trigger node, configure:
Path to watch: /data/obsidian/YourVault/Meetings
Trigger on: add
Watch for directories: No
Await write finish: Yes (prevents partial file processing) Important: The path /data/obsidian is the mounted volume inside the Docker container.
If your vault is mounted at a different location in docker-compose.yml, adjust accordingly.
Testing the Trigger
- Activate the workflow in n8n (toggle switch in top-right)
- Create a test file in your Meetings folder:
echo "--- title: Test Meeting tags: [meeting] --- # Test Meeting This is a test." > ~/Obsidian/YourVault/Meetings/test.md - Watch the n8n execution history - a new execution should appear immediately
Meeting Type Detection
The workflow automatically detects whether a meeting is a 1:1 or group meeting by parsing the frontmatter and analyzing tags.
Detection Logic
The Parse Front-Matter JavaScript node:
- Extracts YAML frontmatter from the markdown file
- Normalizes tags (handles unicode dashes, underscores, spaces)
- Checks for specific 1:1 indicators:
- Tag
1-1(or1–1,1_1, etc.) - Tag
one-on-one
- Tag
- Sets
isOneOnOne: trueif detected, otherwisefalse
Tag Normalization
The normalization function handles various tag formats:
// These all normalize to "1-1":
tags: [1-1]
tags: [1–1] // Unicode en-dash
tags: [1_1]
tags: [1:1]
tags: [1 1]
// These normalize to "one-on-one":
tags: [one-on-one]
tags: [one_on_one]
tags: [one:on:one] Routing Branch
After detection, the If 1-1 node routes to the appropriate processor:
- True branch →
process_one-on-one_notes.py - False branch →
process_mtg_notes.py
Processing Pipeline
The complete end-to-end automation pipeline processes notes from detection to organization:
Flow Diagram
[File Trigger]
↓
[Read File]
↓
[Extract Content]
↓
[Get Filename]
↓
[Parse Frontmatter]
↓
[Meeting Type Detection]
↓
├→ [1:1 Processing]
└→ [Group Processing]
↓
[Vector Embedding] (optional)
↓
[Move to Quarterly Folder] Pipeline Stages
- File Detection - New .md file appears in Meetings folder
- Content Reading - Full file content loaded into workflow
- Type Detection - Frontmatter parsed to determine meeting type
- AI Processing - Appropriate script generates summary, action items, tags
- Vector Embedding - Processed note embedded to Qdrant for semantic search
- File Organization - Note moved to appropriate quarterly folder
Processing Time
Typical processing times:
- Detection & Routing: < 1 second
- AI Processing: 30-60 seconds (depends on AI provider)
- Vector Embedding: 5-10 seconds
- File Organization: < 1 second
- Total: ~45-75 seconds per meeting note
SSH Execution
n8n runs inside a Docker container but needs to execute Python scripts on your host machine. We use SSH to bridge this gap securely.
SSH Setup
Step 1: Generate SSH Key (if needed)
ssh-keygen -t ed25519 -f ~/.ssh/n8n_automation -N "" Step 2: Add Key to Authorized Keys
cat ~/.ssh/n8n_automation.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys Step 3: Test SSH from Container
docker exec -it n8n ssh -i /home/node/.ssh/n8n_automation username@host.docker.internal "echo 'SSH works'" Replace username with your actual username.
Step 4: Configure SSH Node in n8n
In each SSH node, configure:
Host: host.docker.internal # Docker's host machine alias
User: your_username
Private Key: Use the mounted key at /home/node/.ssh/n8n_automation Creating SSH Credentials in n8n
- In n8n, go to Settings → Credentials
- Click Add Credential
- Select SSH
- Configure:
- Host:
host.docker.internal - Port:
22 - Username: Your system username
- Private Key: Paste contents of
~/.ssh/n8n_automation
- Host:
- Click Save
SSH Node Configuration
Example SSH command for meeting processing:
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_IMPERSONATE_SERVICE_ACCOUNT="service-account@project.iam.gserviceaccount.com"
export VERTEX_LOCATION="us-central1"
export CLOUDSDK_ACTIVE_CONFIG_NAME=default
"$HOME/scripts/ai_scripts/.venv/bin/python" \
"$HOME/scripts/ai_scripts/process_mtg_notes.py" \
"$HOME/Obsidian/YourVault/Meetings/[filename]" Template Variables: {{ $json.title }} is replaced with the filename
extracted in the "Get File Name" node.
Error Handling
Robust error handling ensures the automation continues working even when individual steps fail.
Built-in Safeguards
- Await Write Finish - File trigger waits for complete write before processing
- Idempotent Scripts - All processing scripts are safe to retry
- Graceful Degradation - System continues with reduced capability on errors
- Data Preservation - All nodes pass complete data downstream for debugging
Error Workflow
Create a separate "Error Handler" workflow that catches failures from your main workflows:
- Import
error-handler.jsontemplate - In your main workflow settings, set Error Workflow to the error handler
- Configure notification method (email, Slack, webhook, etc.)
Viewing Errors
In n8n:
- Click Executions in the top menu
- Failed executions show with a red error icon
- Click to view full execution details and error messages
- Inspect each node's input/output data
Common Errors and Solutions
SSH Connection Failed
Symptom: "Permission denied" or "Connection refused"
Solutions:
- Verify SSH daemon is running:
sudo systemctl status ssh - Check key permissions:
chmod 600 ~/.ssh/n8n_automation - Test SSH manually:
ssh -i ~/.ssh/n8n_automation username@localhost - Verify
host.docker.internalresolves correctly
Python Script Failed
Symptom: "ModuleNotFoundError" or "Python not found"
Solutions:
- Verify virtual environment path:
ls -la ~/scripts/ai_scripts/.venv/bin/python - Check installed packages:
.venv/bin/pip list - Run script manually to test:
.venv/bin/python process_mtg_notes.py test.md
Vertex AI Authentication Failed
Symptom: "Could not automatically determine credentials"
Solutions:
- Verify gcloud config mounted correctly in docker-compose.yml
- Check environment variables are set in SSH command
- Test gcloud auth:
gcloud auth list - Verify service account impersonation:
gcloud config get-value auth/impersonate_service_account
Scheduling Daily Briefings
Set up a cron trigger to automatically generate daily briefings every morning.
Import Daily Briefing Workflow
- Import
daily-briefing.jsontemplate - The workflow includes:
- Cron Trigger - Runs at 6:00 AM every day
- Fetch Calendar - Executes
fetch_today_events.py - Generate Briefing - Pipes events to
create_daily_briefing.py
Configure Cron Schedule
In the Cron node, set:
Trigger Interval: Days
Minute: 0
Hour: 6
Timezone: America/New_York # Adjust to your timezone This translates to: "Every day at 6:00 AM".
Customize Timing
Common schedules:
- Weekdays only: Add condition to skip Saturdays/Sundays
- Earlier start: Change hour to
5for 5:00 AM - Multiple times: Add additional cron triggers
Briefing Command
The SSH node executes:
export BRIEFING_DETERMINISTIC=1
export BRIEFING_DEBUG=0
cd "$HOME/scripts/ai_scripts"
./calendar-events/fetch_today_events.py | \
./.venv/bin/python ./create_daily_briefing.py This pipes calendar events directly to the briefing generator.
Testing the Schedule
To test without waiting until 6 AM:
- In the workflow editor, click Execute Workflow
- Check that
Dashboard/Daily Briefing.mdis updated - Verify the timestamp at the bottom of the file
Customizing Workflows
n8n's visual editor makes it easy to modify workflows to fit your specific needs.
Adding Nodes
- Click the + button between existing nodes
- Search for the node type (e.g., "HTTP Request", "Code", "If")
- Drag the node into position
- Configure the node's parameters
- Connect input/output to neighboring nodes
Common Customizations
Add Slack Notification
Get notified when daily briefing is ready:
- Add Slack node after briefing generation
- Configure Slack credentials (webhook URL or OAuth)
- Set message:
"Daily briefing ready! {{ $json.event_count }} meetings today."
Filter by Meeting Title
Skip processing certain meetings:
- Add If node after filename extraction
- Condition:
{{ $json.title }}does not contain "WFH" or "OOO" - Connect true branch to processing, false branch to end
Add Email Digest
Email yourself the daily briefing:
- Add Read Binary File node to load
Dashboard/Daily Briefing.md - Add Email node
- Configure SMTP credentials
- Set body to briefing content
Debugging Workflows
Tips for troubleshooting custom workflows:
- Execute Manually - Use "Execute Workflow" button to test without waiting for triggers
- Inspect Data - Click on any node to see its input/output JSON
- Add Debug Nodes - Insert "Code" nodes to log data:
console.log($input.all()) - Check Logs - View container logs:
docker logs n8n -f
Verify It Works
Let's test the complete automation pipeline end-to-end.
Step 1: Verify n8n is Running
docker ps | grep n8n You should see n8n with status "Up".
Step 2: Activate Workflow
- Open n8n:
http://localhost:5678 - Navigate to your "Meeting Processor" workflow
- Toggle the Active switch in the top-right (should turn blue)
Step 3: Create Test Meeting Note
Create a test file in your Meetings folder:
cat > ~/Obsidian/YourVault/Meetings/12-09-25\ -\ Test\ Meeting.md << 'EOF'
---
title: Test Meeting
tags: [meeting, test]
date: 2025-12-09
---
# Test Meeting
This is a test meeting to verify automation.
## Discussion Points
- Point 1
- Point 2
## Next Steps
- Action item 1
- Action item 2
EOF Step 4: Watch Execution
- In n8n, click Executions in the top menu
- A new execution should appear within seconds
- Click on it to see the full workflow execution
- Verify all nodes completed successfully (green checkmarks)
Step 5: Verify Processing Results
Check that the file was processed:
cat ~/Obsidian/YourVault/Meetings/12-09-25\ -\ Test\ Meeting.md You should see:
- Frontmatter updated with additional tags
- Executive summary added at the top
- Action items extracted and formatted
- Transcript archived (if configured)
Step 6: Verify File Organization
Check if the file was moved to the quarterly folder:
ls ~/Obsidian/YourVault/Meetings/2025/Q425/ The test file should appear in the appropriate quarterly directory.
Step 7: Test Daily Briefing
- Open the "Daily Briefing" workflow in n8n
- Click Execute Workflow
- Wait 10-15 seconds for completion
- Check
Dashboard/Daily Briefing.mdfor updated content
Troubleshooting
Container not running
Symptom: n8n not accessible at http://localhost:5678
Solutions:
- Check Docker is running:
docker ps - Start stack:
cd ~/n8n-stack && docker-compose up -d - Check logs:
docker logs n8n - Verify port 5678 isn't in use:
lsof -i :5678
SSH errors when executing scripts
Symptom: "Permission denied (publickey)" in SSH nodes
Solutions:
- Verify SSH key in authorized_keys:
cat ~/.ssh/authorized_keys | grep n8n - Check key permissions:
chmod 600 ~/.ssh/n8n_automation - Test SSH from container:
docker exec n8n ssh -i /home/node/.ssh/n8n_automation user@host.docker.internal - Verify username in SSH credentials matches your system username
File not detected by watcher
Symptom: New files don't trigger workflow execution
Solutions:
- Verify workflow is Active (blue toggle in top-right)
- Check file is in the correct path:
/data/obsidian/YourVault/Meetings(container path) - Verify volume mount in docker-compose.yml matches your vault location
- Restart n8n container:
docker restart n8n - Check n8n logs:
docker logs n8n -fwhile creating test file
Qdrant connection errors
Symptom: "Connection refused" when embedding notes
Solutions:
- Verify Qdrant is running:
docker ps | grep qdrant - Check Qdrant health:
curl http://localhost:6333/health - Verify both containers are on same network:
docker network inspect n8n-stack_ai_assistant - Restart Qdrant:
docker restart qdrant
Environment variables not set
Symptom: "GOOGLE_CLOUD_PROJECT not set" errors in AI processing
Solutions:
- Check SSH node includes all required
exportstatements - Verify credentials are mounted in docker-compose.yml
- Test environment manually:
ssh user@host.docker.internal "echo \$GOOGLE_CLOUD_PROJECT"
Complete!
Congratulations! You've successfully set up a fully automated AI Executive Assistant. Your system now:
- Automatically processes new meeting notes as they appear
- Intelligently routes 1:1 vs group meetings to specialized processors
- Embeds notes to a searchable vector database
- Organizes files into quarterly folders
- Generates daily briefings every morning at 6 AM
- Handles errors gracefully and provides debugging visibility
What's Next? Explore the n8n workflow editor to customize the automation to your specific workflow. Add notifications, integrate with other tools, or create entirely new workflows.
The full power of your AI Executive Assistant is now at your fingertips - working 24/7 in the background, completely hands-free.