A sophisticated AI-powered personal assistant system built with n8n, featuring autonomous agents, memory management, calendar integration, and task automation.
- Second Brain - Main orchestration agent that routes requests to specialized tools based on user intent
- Daily Readiness Marshal - Generates personalized daily readiness reports based on recovery metrics and schedule
- Sub-Agent: Whoop Recovery - Fetches recovery data from Whoop API
- Link Reader - Extracts and reads webpage content
- Web Search - Performs real-time Google searches
- Calendar View - Retrieves Google Calendar events
- Calendar Schedule - Creates new calendar events with conflict checking
- Add Task - Creates tasks in Todoist
- Memory Add - Stores information in vector database (Pinecone)
- Memory Search - Retrieves information from vector database
Second Brain (Main Agent)
βββ Tools
β βββ Link Reader
β βββ Web Search
β βββ Calendar View
β βββ Calendar Schedule
β βββ Add Task
β βββ Memory Add
β βββ Memory Search
βββ Sub-Agents
βββ Daily Readiness Marshal
β βββ Sub-Agent: Whoop Recovery
βββ Sub-Agent: Whoop Recovery
- n8n (self-hosted or cloud)
- Google Gemini API - For AI language model
- Pinecone - Vector database for memory storage
- Google Calendar API - Calendar integration
- Todoist API - Task management
- SerpAPI - Web search functionality
- Telegram Bot - User interface
- Whoop API - Recovery/fitness data (optional)
@n8n/n8n-nodes-langchain- LangChain integration- Base n8n nodes (HTTP Request, Code, Set, etc.)
- Community nodes may be required depending on your n8n version
- Navigate to your n8n instance
- Go to Workflows β Import from File
- Import workflows in this order:
- All tool workflows first (
workflows/tools/*.json) - Sub-agents next (
workflows/agents/Sub-Agent*.json) - Main agent last (
workflows/agents/Second Brain.json)
- All tool workflows first (
Set up the following credentials in n8n:
- Type:
Google PaLM API - Obtain API key from Google AI Studio
- Type:
Pinecone API - Create account at Pinecone
- Create index named
second-brainwith dimensions matching your embedding model
- Type:
Google Calendar OAuth2 - Follow Google Cloud Console setup
- Type:
Todoist API - Get API token from Todoist Settings β Integrations
- Type:
SerpAPI - Get API key from SerpAPI
- Type:
Telegram API - Create bot via @BotFather
- Type:
OAuth2 API - Register app at Whoop Developer Portal
Replace placeholders in the workflow files:
YOUR_EMAIL@example.comβ Your actual emailYOUR_TELEGRAM_CHAT_IDβ Your Telegram chat ID (get from @userinfobot)
The system is configured for Asia/Singapore timezone. Update in:
- Second Brain workflow settings
- Calendar-related workflows
- Daily Readiness Marshal
- Ensure all tool workflows are active
- Activate sub-agent workflows
- Finally, activate the Second Brain workflow
The Second Brain agent responds to natural language commands via Telegram:
- "What's on my schedule today?"
- "Schedule a meeting with John tomorrow at 3pm"
- "Do I have any conflicts on Friday afternoon?"
- "Remind me to buy groceries"
- "Add task: Email the report by 5pm"
- "Remember that I prefer morning meetings"
- "What is my favorite restaurant?"
- "What's the weather in Singapore?"
- "Search for latest AI news"
- "Summarize this article: [URL]"
- "Run my daily readiness report"
- "Show my recovery status"
- Daily Readiness Report: Automatically triggered at 10:30 AM (configurable via Schedule Trigger)
- Memory Auto-Save: Automatically stores important information from conversations
- Conflict Detection: Automatically checks for calendar conflicts before scheduling
Edit the system prompt in the Second Brain workflow's AI Agent node to modify:
- Response tone and style
- Decision-making logic
- Tool selection criteria
In Second Brain workflow:
- Adjust the Schedule Trigger node to change when daily reports are sent
Add new tools by:
- Creating a new workflow with
Execute Workflow Trigger - Adding it as a Tool Workflow node in the Second Brain agent
- Updating the system prompt to include the new capability
- The JSON files in this repository contain credential IDs only, not actual secrets
- Actual credentials are encrypted in your n8n database
- Personal information (email, chat ID) has been redacted - update these after import
- The n8n instance ID is specific to your installation and is not sensitive
- Uses Pinecone vector store for semantic search
- Embeddings generated via Google Gemini
- Text chunked using recursive character splitter (500 chars, 50 overlap)
- Primary model: Gemini 2.0 Flash Preview
- Memory window: 12-15 messages (context-dependent)
- HTML formatting for Telegram compatibility
- Timezone: Asia/Singapore
- ISO 8601 format for date/time inputs
- Automatic conflict detection
- Total Workflows: 10
- Tool Workflows: 7
- Agent Workflows: 3
- API Integrations: 7+
- AI Nodes: Multiple LangChain agents with memory
Workflow not executing
- Ensure all sub-workflows are active
- Check credential configuration
- Verify workflow IDs match in tool references
Memory not working
- Confirm Pinecone index exists and is named correctly
- Check embedding model credentials
- Verify dimensions match (typically 768 or 1536)
Calendar errors
- Validate timezone settings
- Ensure ISO 8601 date format
- Check Google Calendar API quota
Telegram not responding
- Verify bot token is correct
- Ensure webhook is not conflicting
- Check chat ID is accurate
These workflows are provided as-is for personal use. Please review and comply with the terms of service for all integrated third-party APIs.
Feel free to fork, modify, and submit pull requests with improvements or additional tools!
This system handles personal data (calendar, tasks, memories). Ensure you:
- Keep your n8n instance secure
- Use strong credentials
- Regularly backup your workflows
- Review API access permissions