Email parser for RAG agent powered by Gmail and Mem0
Needs changesWhat this workflow does
This AI workflow has 10 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model, Mistral Cloud Chat Model and Mcp (community). It also calls api.mem0.ai over HTTP.
How it runs
Trigger: On Gmail events.
- Set Target Email (Edit Fields (Set)): sets 10 fields: id, threadId, labelIds…
- Parse_Email Agent (AI Agent): runs an AI agent, with model: llm of your choice; memory: Window Buffer Memory; output parser: Auto-fixing Output Parser
- Add_Parsed email to memory (Mcp Client): execute tool
- email to mem (HTTP Request): calls api.mem0.ai (POST)
Services it uses
HTTP calls to: api.mem0.ai
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Parse_Email Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Parse_Email Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Edit Fields (Set)
n8n-nodes-base.set - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Auto-fixing Output Parser
@n8n/n8n-nodes-langchain.outputParserAutofixing - Gmail Trigger
n8n-nodes-base.gmailTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Mistral Cloud Chat Model
@n8n/n8n-nodes-langchain.lmChatMistralCloud - Mcp Client
n8n-nodes-mcp.mcpClient - HTTP Request
n8n-nodes-base.httpRequest - AI Agent
@n8n/n8n-nodes-langchain.agent
From the author
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Alternatively, you can delete the community node and use the HTTP node instead. Most email agent templates are fundamentally broken. They're stateless—they…