Email-based book recommendations with Ollama LLM and OpenLibrary API
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs when a new email arrives over IMAP. Along the way it connects Ollama Chat Model.
How it runs
Trigger: When a new email arrives over IMAP.
- Analyze Email with Ollama (AI Agent): runs an AI agent, with model: Ollama Model
- Create Book Search Query (Edit Fields (Set)): sets or maps fields
- Call Book Search API (HTTP Request): calls an HTTP API
- Check API Response (If): checks a condition and branches into true / false
- Check Book Name (Code): runs custom JavaScript code
- Handle No Book Found (Send Email): sends an email over SMTP
- Extract Book Summary (HTTP Request): calls an HTTP API
- Wait: pauses before continuing
- Retrieve Book Details (HTTP Request): calls an HTTP API
- Format Book Data (Edit Fields (Set)): sets or maps fields
…plus 3 more steps. See the full node list below.
Services it uses
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.
Nodes used (9)
- Ollama Chat Model
@n8n/n8n-nodes-langchain.lmChatOllama - Email Trigger (IMAP)
n8n-nodes-base.emailReadImap - AI Agent
@n8n/n8n-nodes-langchain.agent - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Send Email
n8n-nodes-base.emailSend - Code
n8n-nodes-base.code - Wait
n8n-nodes-base.wait
From the author
This workflow listens for incoming book request emails, extracts the user's intent using the Ollama LLM, queries book data (title, summary, details) via an API, and sends a personalized recommendation email. Ideal for automated book suggestions using LLMs and…