Fully automated audio transcription workflow using n8n, AssemblyAI, and OpenAI GPT-5. Upload audio to Google Drive and get AI-powered transcriptions with speaker diarization in Notion + Google Drive.
- ποΈ Speaker Diarization - Identifies who said what with timestamps
- π€ AI Processing - GPT-5 powered summaries and key insights
- π Dual Output - Saves to both Notion database and Google Drive
- β‘ Auto-Triggered - Processes new files automatically (checks every minute)
- π Smart Chunking - Splits long content into Notion-friendly 2000-char blocks
- π‘οΈ Error Handling - Continues processing even if OpenAI fails
- βοΈ Cloud Deployment - Runs 24/7 on AWS (no local computer needed)
# 1. Clone repository
git clone <your-repo>
cd iWatcherPartner
# 2. Copy environment template
cp .env.example .env
# 3. Add your API keys to .env
# - ASSEMBLYAI_API_KEY
# - OPENAI_API_KEY
# - NOTION_API_TOKEN
# - NOTION_DATABASE_ID
# 4. Start local n8n (requires Docker)
docker-compose up -d
# 5. Access n8n UI
open http://localhost:5678
# 6. Import workflow
python3 import-workflow.py
# 7. Configure Google Drive OAuth in n8n UI
# Settings β Credentials β Add Google Drive OAuth2 APIπ Complete Step-by-Step Guide: See docs/COMPLETE-DEPLOYMENT-GUIDE.md
This guide covers everything:
- AWS infrastructure setup
- n8n container configuration
- Workflow import
- Google OAuth setup (with SSM tunnel trick)
- HTTPS setup with custom domain
- Complete testing and verification
Quick deploy (if you know what you're doing):
cd infrastructure
npm install
NOTIFICATION_PHONE_NUMBER="+1234567890" npx cdk deploy SimpleIWatcherStackFor HTTPS setup: docs/HTTPS-DOMAIN-SETUP.md
Google Drive "New" Folder
β
[n8n Trigger]
β
Download Audio
β
AssemblyAI API
(Speaker Diarization)
β
OpenAI GPT-5
(AI Summary) β [Error Handling]
β
ββββββββ΄βββββββ
β β
Notion DB Google Drive
(Chunked) (Full .txt)
β
Move to "Completed"
iWatcherPartner/
βββ iwatcher-gdrive-trigger.json # Main n8n workflow
βββ import-workflow.py # Workflow deployment script
βββ google_credentials.json # Google OAuth (keep secure!)
βββ .env.example # Environment template
βββ infrastructure/ # AWS CDK deployment
β βββ lib/ # CDK stack definitions
β βββ n8n-workflows/ # Workflow backups
β βββ cdk-app.ts # Main CDK app
βββ docs/ # Documentation
βββ AWS-DEPLOYMENT-PLAN.md # AWS deployment guide
βββ WORKFLOW-SUMMARY.md # Workflow documentation
- Sign up: https://www.assemblyai.com/
- Get API key from dashboard
- Cost: ~$0.37/hour of audio
- Sign up: https://platform.openai.com/
- Create API key
- Uses: GPT-5 model (
gpt-5-2025-08-07) - Cost: ~$0.05-0.10 per transcript
- Create integration: https://www.notion.so/my-integrations
- Get API token (starts with
ntn_) - Share database with integration
- Cost: Free
- Create project: https://console.cloud.google.com
- Enable Google Drive API
- Create OAuth 2.0 credentials (Desktop app)
- Download
google_credentials.json - Cost: Free
1. Google Drive Trigger
- Monitors "New" folder every minute
- Detects new audio files automatically
2. Speaker Diarization
- Identifies multiple speakers
- Adds timestamps to each utterance
- Format:
[MM:SS] Speaker A: text
3. OpenAI Processing
- Model:
gpt-5-2025-08-07 - No token limits (uses default 128K)
- Error handling: Falls back if API fails
4. Dual Delivery
- Notion: Chunked into 2000-char blocks
- Google Drive: Full transcript as
.txt
5. File Management
- Success: Moves to "Completed" folder
- Failure: Moves to "Failed" folder
Create .env file:
# AssemblyAI
ASSEMBLYAI_API_KEY=your_key_here
# OpenAI
OPENAI_API_KEY=sk-proj-...
# Notion
NOTION_API_TOKEN=ntn_...
NOTION_DATABASE_ID=your_database_id
# Google Drive (folder IDs)
GOOGLE_DRIVE_NEW_FOLDER_ID=...
GOOGLE_DRIVE_COMPLETED_FOLDER_ID=...
GOOGLE_DRIVE_FAILED_FOLDER_ID=...- Drop audio file into Google Drive "New" folder
- Supported formats: M4A, MP3, WAV, AAC
- Workflow triggers within 1 minute
- Transcription takes ~3-10 minutes
- Check Notion database for results
- Notion: AI summary + chunked transcript
- Google Drive "Completed": Full transcript with metadata
- Original audio: Moved to "Completed" folder
- Cost: $0
- Setup time: 15 minutes
- Use case: Testing, development
- Cost: ~$17/month
- Setup time: 30 minutes
- Use case: Single-user testing
- Cost: ~$88/month
- Setup time: 2-3 hours
- Use case: Production, high availability
- See: docs/AWS-DEPLOYMENT-PLAN.md
# Check n8n logs
docker logs iwatcher-n8n --tail 50
# Verify workflow is active
curl -H "X-N8N-API-KEY: your_key" \
http://localhost:5678/api/v1/workflows- Delete credential and recreate
- Ensure redirect URI is
http://localhost:5678/rest/oauth2-credential/callback - Check Google Cloud Console for authorized redirect URIs
- Workflow continues even if OpenAI fails
- Check fallback summary in output
- Verify API key and quotas
Monthly costs for 40 hours of audio:
- AssemblyAI: ~$15 (40 hours Γ $0.37)
- OpenAI: ~$2 (40 transcripts Γ $0.05)
- AWS (Production): ~$88/month
- Total: ~$105/month
Free tier options:
- Notion: Free
- Google Drive: Free (15GB)
- Credentials: Stored in
.envandgoogle_credentials.json(gitignored) - AWS: Uses Secrets Manager for API keys
- n8n: Encrypted credential storage
- HTTPS: Recommended for production (see domain setup)
- Complete Deployment Guide β START HERE - Full step-by-step deployment
- HTTPS Domain Setup - Configure SSL/TLS with Let's Encrypt
- AWS Deployment Plan - AWS architecture options (EC2, ECS, RDS)
- Deployment Learnings - Lessons learned and rabbit holes
- Workflow Summary - Detailed workflow documentation
- README.md (this file) - Project overview
setup.py- Import workflow and verify environmenttest-complete-pipeline.py- End-to-end testing and monitoringimport-workflow.py- Basic workflow import utility
- Fork the repository
- Create feature branch
- Test changes locally
- Submit pull request
MIT License - see LICENSE file for details
For issues and questions:
- Check Troubleshooting section
- Review docs/ folder
- Open GitHub issue
Ready to start? Follow the Quick Start guide above!