What This Workflow Does
This advanced AI automation workflow solves three critical business inefficiencies: manual email sorting, document-based customer support, and appointment scheduling. It was presented at the AI Developers meetup in San Francisco as a demonstration of practical, multi‑modal AI integration.
The workflow automatically categorizes incoming Gmail emails using a Text Classifier node, assigning custom labels like “urgent,” “sales inquiry,” or “newsletter.” It also implements a Retrieval-Augmented Generation (RAG) system that ingests PDFs into a Pinecone vector store, allowing you to chat with your documents. Finally, it showcases an AI agent that uses HTTP Request tools to check availability on Google Calendar and book appointments autonomously.
By combining these three AI capabilities, businesses can reduce manual administrative work by 70%, accelerate response times, and provide intelligent, context-aware support without constant human intervention.
How It Works
Step 1: AI‑Powered Email Categorization
The workflow listens for new emails in Gmail. Each incoming email is passed to an AI text classifier (like OpenAI or Anthropic) that analyzes the content and assigns a predefined label. The email is then automatically moved to the corresponding Gmail folder or forwarded to the appropriate team member.
Step 2: RAG Document Chatbot
PDF documents are uploaded and processed by a text splitter node, breaking them into manageable chunks. These chunks are converted into vector embeddings and stored in Pinecone. When a user submits a query, the system retrieves the most relevant document snippets and feeds them to an AI model to generate a precise, sourced answer.
Step 3: AI Agent for Calendar Scheduling
The agent receives a request (e.g., “Schedule a meeting next Tuesday”). It uses an HTTP Request node to call the Google Calendar API, checks available slots, proposes optimal times, and if confirmed, creates the event and sends a confirmation. This demonstrates how AI can handle multi‑step, API‑dependent tasks autonomously.
Who This Is For
This template is ideal for businesses drowning in email volume, teams that rely on document‑based knowledge, and service providers who manually schedule appointments. Customer support teams, sales departments, legal firms, consultants, and educational institutions can dramatically cut manual overhead.
If your team spends hours each week sorting emails, answering repetitive questions from documents, or coordinating calendars, this automation delivers immediate ROI. It’s also a powerful learning tool for developers and business owners wanting to understand how to integrate multiple AI models into real‑world workflows.
What You'll Need
- n8n instance (cloud or self‑hosted)
- Gmail account with API access enabled
- AI model API keys (OpenAI GPT or Anthropic Claude)
- Pinecone account for vector storage (RAG component)
- Google Calendar API credentials (for the scheduling agent)
- Basic understanding of n8n nodes and webhook triggers
Pro tip: Start with the email categorization module first—it’s the easiest to configure and delivers immediate visibility into AI’s sorting accuracy. Once comfortable, add the RAG and agent components.
Quick Setup Guide
- Download and import the JSON template into your n8n workspace.
- Configure Gmail node with your account credentials and set up a trigger for new emails.
- Set up AI classifier by connecting your OpenAI/Anthropic API and defining your email categories (urgent, support, sales, etc.).
- Connect Pinecone for the RAG section—create an index and add your PDF documents.
- Authorize Google Calendar for the agent scheduling module.
- Test each module independently before running the full workflow.
- Activate the workflow and monitor the logs to ensure emails are categorized correctly, documents are retrievable, and calendar bookings succeed.
Key Benefits
Reduce email triage time by 70%. AI categorization eliminates manual sorting, ensuring urgent messages are flagged instantly and routed to the right person.
Turn static documents into interactive knowledge bases. The RAG system lets customers or employees ask questions and get answers directly from your PDFs, manuals, or policy documents.
Automate appointment scheduling without human intervention. The AI agent checks calendars, proposes times, and books meetings—freeing up sales or support staff.
Learn multi‑modal AI integration in a single workflow. This template demonstrates how to combine classification, retrieval, and agentic reasoning—a blueprint for more complex automations.
Scalable and adaptable. Each module can be extended: add more email categories, ingest different document types, or integrate with other calendar services like Outlook or Calendly.