Answer currency rate questions from Gmail and chat with Gemini and Frankfurter API
Ready for 3.0What this workflow does
This AI workflow has 24 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail, Google Gemini Chat Model and HTTP Request. It also calls api.frankfurter.dev over HTTP.
How it runs
Trigger: On Gmail events (plus 1 other trigger).
- Normalize email message (Edit Fields (Set)): sets 5 fields: sessionId, chatInput, source…
- Normalize chat message (Edit Fields (Set)): sets 5 fields: sessionId, chatInput, source…
- Loop over messages (Loop Over Items (Split in Batches)): loops over the items in batches
- Set configurable variables (Edit Fields (Set)): sets 3 fields: cache_ttl_hours, email_subject, fallback_message
- Build cache key (Code): runs custom JavaScript code
- Lookup cached answer (Data table): get
- Cached answer still fresh? (If): checks a condition and branches into true / false
- Use cached answer (Edit Fields (Set)): sets 6 fields: response, cache_hit, source…
- Ask currency AI agent (AI Agent): runs an AI agent, with model: Gemini Chat Model; 1 tool (Get Exchange Rate); memory: Conversation memory
- Clean agent answer (Code): runs custom JavaScript code
…plus 8 more steps. See the full node list below.
Services it uses
HTTP calls to: api.frankfurter.dev
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Receive email from Gmail).
Nodes used (14)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Code
n8n-nodes-base.code - Data table
n8n-nodes-base.dataTable - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Http Request Tool
n8n-nodes-base.httpRequestTool - Chat
@n8n/n8n-nodes-langchain.chat - Gmail
n8n-nodes-base.gmail - No Operation, do nothing
n8n-nodes-base.noOp
From the author
Quick Overview This workflow answers exchange-rate questions coming from Gmail or an n8n chat trigger using a Google Gemini AI agent that calls the Frankfurter exchange-rate API, caches successful rate responses in n8n Data Tables to avoid repeated model…