🧠 AI & AgentsIntermediate🧠 AI-powered🧬 RAG

02 – Inbound → Label → Reply

A 27-step ai & agents automation, triggered by gmail, connecting OpenAI Embeddings, Gmail, Supabase Vector, OpenRouter (LLM), HTTP / REST API, with built-in AI reasoning.

⬇ Download workflow JSON
💡

What this does for your business

In plain terms: this is an AI assistant that works the moment a new message arrives. It uses AI to understand and generate content, so it handles judgement-style work, not just moving data. It connects to OpenAI Embeddings, Gmail, Supabase Vector, OpenRouter (LLM) and completes multi-step tasks for you automatically — the kind of work you'd otherwise hand to a virtual assistant.

27
Nodes
5
Integrations
36
Connections
Gmail
Trigger

🚀 Deploy this workflow

Deploy this automation in minutes

Log in and we'll walk you through every key step by step, then deploy it for you.

Get started free Log in

🏗️ Architecture diagram

The real node graph exported from n8n — triggers (green), AI nodes (violet), services and logic — laid out as they run.

🧠Basic LLM ChainchainLlmSwitchswitchclean text1code🧬Embeddings OpenAI1embeddingsOpenAiLABEL1set📧Get a message1gmail📧wholesales1gmail📧shipping details1gmail📧Tracking1gmail🧬retrieve CONTEXT1vectorStoreSupabase🧠Chat Memory1memoryPostgresChat📧Quote request1gmail🧠Kate1agent🧠Output Parser1outputParserStructu…🧠LLM2lmChatOpenRouter📧Refund request1gmail📧call request1gmail📧NO LABEL1gmail📧Order not_found1gmail📧invoice requests1gmail📧email/phone1gmail📧damaged1gmail📧custom clearance1gmail🧠LLM3lmChatOpenRouter📧incoming_email1gmailTriggerRAW MIME for draft (t…code🌐Gmail API create draf…httpRequest

⚙️ How it works

  1. Embeddings OpenAI1 · embeddingsOpenAi
  2. Chat Memory1 · memoryPostgresChat
  3. Output Parser1 · outputParserStructured
  4. LLM2 · lmChatOpenRouter
  5. LLM3 · lmChatOpenRouter
  6. incoming_email1 · gmailTrigger
  7. retrieve CONTEXT1 · vectorStoreSupabase
  8. Kate1 · agent
  9. Basic LLM Chain · chainLlm
  10. Get a message1 · gmail
  11. RAW MIME for draft (threaded)1 · code
  12. LABEL1 · set
  13. clean text1 · code
  14. Gmail API create draft (with threadId)1 · httpRequest

💼 Business analysis

🎯

Business use case

Deploys an autonomous AI agent that can reason over instructions, call tools, and take multi-step actions on behalf of a team — replacing repetitive knowledge work. It orchestrates OpenAI Embeddings, Gmail, Supabase Vector, OpenRouter (LLM), HTTP / REST API so a single natural-language request becomes a completed task.

📈

Market need

Businesses are racing to put AI agents to work but lack the engineering to wire models to their real tools and data. This delivers that wiring as a ready-to-run asset.

💰

Market value

Custom AI-agent builds are quoted at $3,000–$15,000+ by agencies, with managed retainers on top. As a productised template it commands premium one-time or subscription pricing.

🧩 Integrations & stack

🧬OpenAI Embeddings📧Gmail🧬Supabase Vector🧠OpenRouter (LLM)🌐HTTP / REST API
Node typeschainLlm, switch, code, embeddingsOpenAi, set, gmail, vectorStoreSupabase, memoryPostgresChat, agent, outputParserStructured, lmChatOpenRouter, gmailTrigger, httpRequestWorkflow IDkrVValoOG28tgX3E
⬇ Download workflow JSON ← Back to library