How tanujkumar24/personal-ai-agent-n8n works
Project type and purpose
• This is a low-code workflow automation project (built on n8n) that acts as an AI-powered personal assistant.
• It orchestrates multiple JSON-defined workflows to handle email management, calendar events, database operations, and RAG (Retrieval-Augmented Generation) using Pinecone + Groq LLMs, all exposed via a Telegram bot.
File structure
• Top-level JSON files (GET_CALANDER.json, SEND_EMAIL_WORKFLOW.json, etc.) are n8n workflow exports. Each represents one automation pipeline (e.g., “Get Calendar,” “Summarize Database”).
• There’s no “src” folder or code: the “source” is the collection of workflows.
• Configuration is through environment variables (.env) for API keys.
• README.md provides the high-level architecture and tech stack.
README for additional insights
• Core technologies: n8n (workflow engine), Pinecone (vector DB), Groq LLM (AI model), Telegram Bot API, Email & Calendar APIs.
• Use cases: automating business processes, AI-driven customer support, RAG queries.
a. Main components:
• User Interface: Telegram client (user’s chat app)
• Workflow Orchestrator: n8n server with JSON workflows
• Vector Store: Pinecone vector database
• LLM Service: Groq API
• External APIs: Email provider API, Calendar API
• (Optional) Metadata Store: where n8n persists workflow state (e.g., SQLite or Postgres)
b. Relationships & interactions:
1. User sends a message → Telegram Bot API
2. n8n “Telegram Trigger” node pulls the message
3. n8n processes the workflow JSON (e.g., “SUMMARIZE_DATABASE.json”)
– If it’s a RAG task:
· n8n “Pinecone Node” queries vector DB
· n8n “Groq Node” sends prompt + context to LLM
– If it’s email/calendar:
· n8n “HTTP Request” nodes call the Email/Calendar APIs
4. n8n collects responses, formats a reply, and sends it back via Telegram Bot API
c. Architectural patterns & principles:
• Event-driven integration: each workflow starts from a trigger node (Telegram or schedule).
• Single-responsibility JSON workflows: each file defines one pipeline.
• Clear separation between orchestration (n8n), AI services, and external data sources.
d. Key technologies & libraries:
• n8n: workflow automation engine
• Pinecone: vector search for RAG
• Groq API: AI language model for generation
• Telegram Bot API: user interface
• Email & Calendar REST APIs
Elements
• Clear labels: “Telegram Bot,” “n8n Workflow Engine,” “Pinecone Vector DB,” “Groq LLM Service,” “Email API,” “Calendar API,” “Workflow JSON Files.”
• From “User” to “Telegram Bot”
• From “Telegram Bot” to “n8n” (Trigger Node)
• From “n8n” to each external service (Pinecone, Groq, Email, Calendar)
• Orange for data stores (Pinecone, optional metadata DB)
• Grey for user interface (Telegram)