KI-gesteuerter Buchempfehlungs-Engine

Experte

Dies ist ein Support Chatbot, Multimodal AI-Bereich Automatisierungsworkflow mit 21 Nodes. Hauptsächlich werden If, Set, Code, Wait, EmailSend und andere Nodes verwendet. E-Mail-basiertes Buchempfehlungssystem unter Verwendung von Ollama Large Language Model und OpenLibrary API

Voraussetzungen
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "QRbFHzWOiN6ee7D9",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "AI-Driven Book Recommendation Engine",
  "tags": [],
  "nodes": [
    {
      "id": "9840af8c-b582-4659-ae3b-869500193074",
      "name": "Ollama Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        -132,
        280
      ],
      "parameters": {
        "model": "llama3.2-16000:latest",
        "options": {}
      },
      "credentials": {
        "ollamaApi": {
          "id": "7td3WzXCW2wNhraP",
          "name": "Ollama - test"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "61b127d3-bb32-4eee-a239-c259430e9139",
      "name": "E-Mail-Trigger – Buchanfrage",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        -440,
        60
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "imap": {
          "id": "zTEGYssr7MSVeCs3",
          "name": "IMAP-test"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "cc2e4acc-e8dc-4789-9142-1bc08977add5",
      "name": "E-Mail mit Ollama analysieren",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -220,
        60
      ],
      "parameters": {
        "text": "={{ $json.textPlain }}",
        "options": {
          "systemMessage": "=You are a helper that identifies and lists only the types of books mentioned in the message.\n\nWhich types of books are being asked for in this message?\n\nReply with the types in lowercase, one on each line. Don’t include anything else — no headers, labels, or symbols.\n\nInput:\n{{ $json.textPlain }}"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "37386ba5-319e-40da-bf42-c8d2fbb0a48a",
      "name": "Buchsuchanfrage erstellen",
      "type": "n8n-nodes-base.set",
      "position": [
        156,
        60
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "subject-name",
              "value": "={{ $json.output }}"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "id": "0c9dc4d4-c775-4ae6-bd5c-dddb0ca175ab",
      "name": "Buchsuche API aufrufen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        376,
        60
      ],
      "parameters": {
        "url": "=https://openlibrary.org/subjects/{{ $json.subject-name}}",
        "options": {},
        "queryParametersUi": {
          "parameter": [
            {
              "name": "limit",
              "value": "0"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "39dc690f-f68b-4f5d-87e0-44eb12cbb5f4",
      "name": "API-Antwort prüfen",
      "type": "n8n-nodes-base.if",
      "position": [
        596,
        60
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$node[\"Call Book Search API\"].json[\"work_count\"]}}",
              "operation": "larger"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "727a94bd-9c95-44b6-85f7-86ee36fcda7f",
      "name": "Kein Buch gefunden behandeln",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        816,
        160
      ],
      "parameters": {
        "html": "=<p>We're sorry, but no books were found for the subject <em>{{$node[\"Check API Response\"].json[\"name\"]}}</em>. </p>\n\n<p>Please try a different subject or update your n8n workflow accordingly.</p>\n\n<p>You can explore a list of available subjects at <a href=\"https://openlibrary.org/subjects\" target=\"_blank\">Open Library Subjects</a>.</p>\n",
        "options": {},
        "subject": "=Book not found in {{$node[\"Check API Response\"].json[\"name\"]}}",
        "toEmail": "john.doe@example.com",
        "fromEmail": "john.doe@example.com"
      },
      "credentials": {
        "smtp": {
          "id": "G1kyF8cSWTZ4vouN",
          "name": "SMTP -test"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d164e6f0-b684-4467-a4e8-0aae75878663",
      "name": "Buchtitel prüfen",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        -40
      ],
      "parameters": {
        "jsCode": "var retrieve_book = 0;\nvar book_count = items[0].json.work_count;\n\nretrieve_book = Math.floor(Math.random() * book_count) + 1\n\nitems[0].json.retrieve_book = retrieve_book;\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "efa8a98b-cd03-41ac-93f0-c1f856cff17f",
      "name": "Buchzusammenfassung extrahieren",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1036,
        -40
      ],
      "parameters": {
        "url": "=http://openlibrary.org/subjects/{{$json[\"name\"]}}.json",
        "options": {},
        "queryParametersUi": {
          "parameter": [
            {
              "name": "limit",
              "value": "1"
            },
            {
              "name": "offset",
              "value": "={{$json[\"retrieve_book\"]}}"
            },
            {
              "name": "detail",
              "value": "true"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "96c40040-623c-45df-ae94-b2813ffd5668",
      "name": "Auf Zusammenfassungsantwort warten",
      "type": "n8n-nodes-base.wait",
      "position": [
        1256,
        -40
      ],
      "webhookId": "4880c8b5-9639-4e41-9ef9-3eb5520f5fab",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "786470f7-9056-46c3-83d0-48bbf98133a5",
      "name": "Buchdetails abrufen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1476,
        -40
      ],
      "parameters": {
        "url": "=http://openlibrary.org.{{$node[\"Extract Book Summary\"].json[\"works\"][0][\"key\"]}}.json",
        "options": {},
        "queryParametersUi": {
          "parameter": [
            {
              "name": "limit",
              "value": "1"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "641c0ba1-ccad-4462-9499-b4a28dfd0975",
      "name": "Buchdaten formatieren",
      "type": "n8n-nodes-base.set",
      "position": [
        1696,
        -40
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "authors",
              "value": "={{$node[\"Extract Book Summary\"].json[\"works\"][0][\"authors\"]}}"
            },
            {
              "name": "title",
              "value": "={{$node[\"Extract Book Summary\"].json[\"works\"][0][\"title\"]}}"
            },
            {
              "name": "description",
              "value": "={{$node[\"Retrieve Book Details\"].json[\"description\"][\"value\"]}}"
            },
            {
              "name": "URL",
              "value": "=https://openlibrary.org{{$node[\"Extract Book Summary\"].json[\"works\"][0][\"key\"]}}"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "id": "79d33736-4931-4f7e-8ac0-07980cc8fcb9",
      "name": "Daten mit Code erweitern",
      "type": "n8n-nodes-base.code",
      "position": [
        1916,
        -40
      ],
      "parameters": {
        "jsCode": "var arrAuthors = items[0].json.authors;\n\nvar arrNames = arrAuthors.map(function(author) {\n  return \"<a href=\\\"https://openlibrary.org\" + author['key'] + \"\\\">\" + author['name'] + \"</a>\";\n});\n\nvar names = arrNames.join(\", \");\n\nitems[0].json.authors = names;\n\nreturn items;"
      },
      "typeVersion": 2
    },
    {
      "id": "e19dbc55-a1c5-4070-b2ae-2f4582fe14c8",
      "name": "E-Mail-Inhalt generieren",
      "type": "n8n-nodes-base.set",
      "position": [
        2136,
        -40
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "msgSubject",
              "value": "=Book Recommendation: {{$node[\"Generate Author Info\t\"].json[\"title\"]}}"
            },
            {
              "name": "msgBody",
              "value": "=<H2><a href=\"{{$node[\"Generate Author Info\t\"].json[\"URL\"]}}\">{{$node[\"Generate Author Info\t\"].json[\"title\"]}}</a></H2>\n<p><em>By {{$node[\"Generate Author Info\t\"].json[\"authors\"]}}</em><br>\n{{$node[\"Generate Author Info\t\"].json[\"description\"]}}</p>"
            }
          ]
        },
        "options": {},
        "keepOnlySet": true
      },
      "typeVersion": 1
    },
    {
      "id": "c178bfca-5ee9-40d5-a0da-1b3fb0f7e5b8",
      "name": "Empfehlungs-E-Mail senden",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2356,
        -40
      ],
      "parameters": {
        "html": "={{$node[\"Generate Email Content\"].json[\"msgBody\"]}}",
        "options": {},
        "subject": "={{$node[\"Generate Email Content\"].json[\"msgSubject\"]}}",
        "toEmail": "abc@gmail.com",
        "fromEmail": "xyz@gmail.com"
      },
      "credentials": {
        "smtp": {
          "id": "G1kyF8cSWTZ4vouN",
          "name": "SMTP -test"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fe5af873-7969-436c-8eaf-efed81c83665",
      "name": "Haftnotiz",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -340,
        -900
      ],
      "parameters": {
        "color": 5,
        "width": 600,
        "height": 360,
        "content": "## Overview: \n\nThis workflow triggers on book request emails, uses Ollama LLM to extract intent, queries a Book Search API for data (title, summary, details), handles no-book cases, formats and enhances the data, generates a personalized email, and sends it to the user.\n\n✅ Ideal for automated book suggestions using LLMs and structured APIs.\n✅ Great for newsletter, reading clubs, and educational bots.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "afa604fa-0086-4327-998b-7b720694fc42",
      "name": "Haftnotiz1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -880
      ],
      "parameters": {
        "width": 660,
        "height": 320,
        "content": "## How to Run:\n\n1. Ensure the email trigger is connected to a valid inbox (IMAP/Gmail).\n2. Verify the Ollama node is running with the correct model.\n3. Set valid credentials for the book search API.\n4. Click **“Execute Workflow”** or activate the workflow to listen in real-time.\n5. Send a test email with a book request (e.g., “Recommend me a sci-fi novel.”).\n6. Check the sent mailbox for the recommendation email.\n\n## Tip: \nCustomize the book genre parser or API call to match your use case.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "afdc2813-f8ef-4311-bb5b-dbdd2784dfca",
      "name": "Haftnotiz2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -340
      ],
      "parameters": {
        "color": 4,
        "width": 540,
        "height": 860,
        "content": "## Email Input Processing\n\nTriggers on new book request emails and uses Ollama LLM to extract user intent."
      },
      "typeVersion": 1
    },
    {
      "id": "c0a2dc78-18a6-48f8-9599-74e4d5e7c27e",
      "name": "Haftnotiz3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -380
      ],
      "parameters": {
        "color": 2,
        "width": 880,
        "height": 860,
        "content": "## Output Generation\n\nFormats data, refines it with code, creates a personalized email, and sends it to the user."
      },
      "typeVersion": 1
    },
    {
      "id": "7a49c987-d940-4e65-ab52-b024d838a55c",
      "name": "Haftnotiz4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        -340
      ],
      "parameters": {
        "color": 3,
        "width": 580,
        "height": 860,
        "content": "## Book Data Retrieval\n\nGenerates a search query, fetches book data (title, summary, details) via API, and validates the response."
      },
      "typeVersion": 1
    },
    {
      "id": "86d479fa-002c-4e2f-8239-e3ba21d3989b",
      "name": "Haftnotiz5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        -380
      ],
      "parameters": {
        "color": 6,
        "width": 620,
        "height": 860,
        "content": "## Data Preparation\n\nExtracts summary, ensures data readiness, and gathers additional book details."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "675f1b3c-84ee-47b1-bbc4-c2c1a79a7b55",
  "connections": {
    "9840af8c-b582-4659-ae3b-869500193074": {
      "ai_languageModel": [
        [
          {
            "node": "cc2e4acc-e8dc-4789-9142-1bc08977add5",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "d164e6f0-b684-4467-a4e8-0aae75878663": {
      "main": [
        [
          {
            "node": "efa8a98b-cd03-41ac-93f0-c1f856cff17f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "641c0ba1-ccad-4462-9499-b4a28dfd0975": {
      "main": [
        [
          {
            "node": "79d33736-4931-4f7e-8ac0-07980cc8fcb9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "39dc690f-f68b-4f5d-87e0-44eb12cbb5f4": {
      "main": [
        [
          {
            "node": "d164e6f0-b684-4467-a4e8-0aae75878663",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "727a94bd-9c95-44b6-85f7-86ee36fcda7f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0c9dc4d4-c775-4ae6-bd5c-dddb0ca175ab": {
      "main": [
        [
          {
            "node": "39dc690f-f68b-4f5d-87e0-44eb12cbb5f4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "efa8a98b-cd03-41ac-93f0-c1f856cff17f": {
      "main": [
        [
          {
            "node": "96c40040-623c-45df-ae94-b2813ffd5668",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "786470f7-9056-46c3-83d0-48bbf98133a5": {
      "main": [
        [
          {
            "node": "641c0ba1-ccad-4462-9499-b4a28dfd0975",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "79d33736-4931-4f7e-8ac0-07980cc8fcb9": {
      "main": [
        [
          {
            "node": "e19dbc55-a1c5-4070-b2ae-2f4582fe14c8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e19dbc55-a1c5-4070-b2ae-2f4582fe14c8": {
      "main": [
        [
          {
            "node": "c178bfca-5ee9-40d5-a0da-1b3fb0f7e5b8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "37386ba5-319e-40da-bf42-c8d2fbb0a48a": {
      "main": [
        [
          {
            "node": "0c9dc4d4-c775-4ae6-bd5c-dddb0ca175ab",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc2e4acc-e8dc-4789-9142-1bc08977add5": {
      "main": [
        [
          {
            "node": "37386ba5-319e-40da-bf42-c8d2fbb0a48a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "96c40040-623c-45df-ae94-b2813ffd5668": {
      "main": [
        [
          {
            "node": "786470f7-9056-46c3-83d0-48bbf98133a5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "61b127d3-bb32-4eee-a239-c259430e9139": {
      "main": [
        [
          {
            "node": "cc2e4acc-e8dc-4789-9142-1bc08977add5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Experte - Support-Chatbot, Multimodales KI

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Experte
Anzahl der Nodes21
Kategorie2
Node-Typen10
Schwierigkeitsbeschreibung

Für fortgeschrittene Benutzer, komplexe Workflows mit 16+ Nodes

Autor
Oneclick AI Squad

Oneclick AI Squad

@oneclick-ai

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34