Kütüphane / E-posta Otomasyonu
E-posta Otomasyonu
Answer currency rate questions from Gmail and chat with Gemini and Frankfurter API
When a chat message arrives, it handles email with Google Gemini using Chat, Data Table, Gmail.
Ne yapar
## Answer currency rate questions from Gmail and chat with a cached AI agent Who's it for Anyone who wants a reusable pattern for an AI agent that serves several channels and avoids paying for the same model call twice. Exchange rates are only the example: swap the tool for any read-only API. How it works 1. Chat and Gmail messages are normalized to the same fields and processed one at a time. 2. The workflow detects two ISO currency codes (for example "USD to EUR") and looks for a fresh cached answer for that pair and date. 3. On a cache hit the model is not called. On a miss, a Gemini agent queries the free Frankfurter API and the answer is cached. 4. Every query is logged (channel, cache hit, latency) so you can measure the savings. The reply goes back through the channel it came from. How to set up - Create the Data Table Currency cache with columns cache_key (string), pair (string), response (string), cached_at (number). - Create the Data Table Query log with columns logged_at (string), source (string), pair (string), cache_hit (boolean), latency_ms (number). - Select the tables in the 3 Data Table nodes and add your Gemini and Gmail credentials. - Review the Set configurable variables node and the filter in Receive email from Gmail. Requirements Google Gemini API key, Gmail account, n8n with Data Tables. Frankfurter needs no API key. How to customize Replace the Get Exchange Rate tool and the agent prompt, and adapt Build cache key so that equivalent questions produce the same key.
Adımlar
- Receive chat message
- Receive email from Gmail
- Normalize chat message
- Normalize email message
- Loop over messages
- Set configurable variables
- Build cache key
- Lookup cached answer
- Cached answer still fresh?
- Use cached answer
- Ask currency AI agent
- Gemini Chat Model
- Conversation memory
- Get Exchange Rate
Toplam 24 adım.
Benzer otomasyonlar
Finans, Faturalar ve MuhasebeYabancı kart harcamalarını Google Sheets ve Slack ile günlük döviz kurlarına göre kontrol edin16 adımFinans, Faturalar ve MuhasebeOpenAI RAG ve Weaviate ile döviz kurlarını izleme11 adımUyarılar ve BildirimlerZamanlanmış Döviz Dönüşümlerini Telegram'a Gönderme5 adımUyarılar ve BildirimlerGünlük Döviz Kuru Güncellemelerini Gmail ile E-postalama6 adım