AI in Zammad using n8n (free) - Tutorial

This guide explains how to integrate Google AI Studio, n8n, and Zammad to create an AI assistant that automatically replies to support tickets.
It uses the knowledge base as knowledge to generate better answers according to your usecases


1. Requirements

Before you begin, ensure the following components are available:

  • A Google AI Studio account (for free AI usage)
    (You could also use Groq or another provider, since Google has reduced its rate limit to 20 requests per day)
  • n8n, either self-hosted or cloud
  • Rolf’s Table Search installed in Zammad

2. Preparing the AI User in Zammad

Step 1: Create a Dedicated AI User

Create a new Zammad user that will represent the AI, for example KI-rsten.
Assign the following:

  • Agent role
  • Access to all groups/permissions the AI should be allowed to work with



Step 2: Enable Token Access

In the Zammad admin panel, enable token-access for users.


Step 3: Create the API Token

Log in as the AI user and create an API token with permissions for:

  • Creating articles (ticket replies)
  • Reading Knowledge Base entries
  • Permission for Rolf’s Table Search: admin.table_search

Make sure to store the API token securely.



3. Import and Configure the n8n Workflow

Step 1: Create a new workflow

grafik

Step 2: Import the Workflow

Import the JSON workflow provided earlier into n8n.

Step 3: Replace All URLs and Credentials

Open each node and adjust:

  • Base URL of your Zammad instance
  • API tokens (Use n8n secrets in production)
  • Authentication details for the Zammad webhook user
  • Google AI Studio credentials for all Gemini nodes
  • Google node needs credentials (key, cx) if you want to use it
  • Look for Custom Search JSON API to create an API Key
  • In the code block there is a “const” where you need to change zammad-url to your url (look for “zammad-url”)



Step 4: Verify the AI Model Nodes

Ensure your Google Gemini nodes use the correct model and credentials from your Google AI Studio account.


4. Create the n8n Webhook in Zammad

Inside the imported workflow, copy the webhook URL from the Webhook node.

Example format (your URL will differ):

https://n8n.example.com/webhook/<unique-id>

A dedicated webhook user must also exist in n8n with proper authentication.


5. Add a Trigger in Zammad

Zammad needs a trigger that sends ticket updates to n8n.

Step 1: Create a Trigger

Go to:
Settings → Trigger → New Trigger

Configure conditions such as:

  • Ticket contains a keyword for the AI
  • Ticket is new or updated
  • Article is from a customer not from the AI

Then set the action to:

  • Execute Webhook
  • Insert the n8n webhook URL
  • Configure authentication if required

Step 2: Optional: Add Keyword for Invocation

Define a convention so agents can ask the AI for help, for example:

@KI
@AI
@Assistant

6. Testing the Integration

  1. Create a test ticket in Zammad.
  2. Add the AI invocation phrase.
  3. Zammad triggers the webhook.
  4. n8n receives the ticket, performs knowledge base search, uses Gemini to generate an answer, and posts it back to Zammad.
  5. Review the AI-generated answer in the ticket.


7. Conclusion

With this setup, Zammad can automatically:

  • Search internal knowledgebase using Table Search
  • Use Gemini models to produce helpful responses
  • Post structured answers back into the ticket system

This creates a robust AI-assisted workflow that supports agents and improves response times.

You can optimize the prompts or switch language if you need to.

Save the following as .json file.

JSON File for n8n (workflow):

{
  "name": "Zammad Ticket AI Help",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "43b34fb1-3585-4ed0-9247-53010972c5ee",
        "authentication": "basicAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -2032,
        224
      ],
      "id": "ef633284-1f35-462d-b749-e889679375e5",
      "name": "Webhook",
      "webhookId": "43b34fb1-3585-4ed0-9247-53010972c5ee",
      "alwaysOutputData": false,
      "credentials": {
        "httpBasicAuth": {
          "id": "uNuxwb3E2eyegCfq",
          "name": "CREDENTIALS FOR ZAMMAD"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        128,
        592
      ],
      "id": "82daa403-e0b1-4db1-a472-0b1171b25467",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        16,
        608
      ],
      "id": "93eab280-6b4e-487e-b4b8-e3f54f61ebca",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "id": "8W2ufLn7ZhOl6xZz",
          "name": "GOOGLE AI ACCOUNT"
        }
      }
    },
    {
      "parameters": {
        "method": "PUT",
        "url": "=http://zammad-zammad-nginx-1:8080/api/v1/tickets/{{ $('If').item.json.sessionId }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"article\": {\n    \"subject\": \"Automatische Lösung gefunden\",\n    \"body\": {{ $json.output.toJsonString() }},\n    \"type\": \"note\",\n    \"internal\": false\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        384,
        224
      ],
      "id": "b99b0561-bd72-42c1-b382-801029b22885",
      "name": "HTTP Request",
      "credentials": {
        "httpHeaderAuth": {
          "id": "I3qqmHhn27S2U97W",
          "name": "API TOKEN"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        -1456,
        400
      ],
      "id": "eb13f09b-351e-48bd-b4e1-294430e0a407",
      "name": "Google Gemini Chat Model1",
      "credentials": {
        "googlePalmApi": {
          "id": "8W2ufLn7ZhOl6xZz",
          "name": "GOOGLE AI ACCOUNT"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Ticket-Titel: {{ $('ref_list').item.json.title[0] }}\nTicket-Text:  {{ $('ref_list').item.json.ticket[0] }}",
        "needsFallback": true,
        "options": {
          "systemMessage": "Du bist ein Query-Rewriter für eine Support-Knowledgebase.\nExtrahiere aus dem Tickettext nur belegbare Fakten und generiere Suchbegriffe.\nGib NUR valides JSON zurück mit:\n{\n  \"summary\": string,\n  \"keywords\": string[],           // kurze Stichwörter\n  \"boolean\": string,              // z.B. (\"outlook\" AND \"safe mode\") AND (crash OR freeze)\n  \"natural\": string               // natürliche Suchformulierung\n}\nKeine weiteren Felder, keine Erklärungen.\nWenn der Nutzer fragt ob du etwas für ihn erstellen kannst, gib keine keywords zurück, aber wirklich nur wenn der Nutzer danach fragt."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        -1392,
        224
      ],
      "id": "292ebeb5-8847-4054-85c7-3b5d5faf1019",
      "name": "KB Abfrage",
      "retryOnFail": true,
      "executeOnce": true,
      "maxTries": 2
    },
    {
      "parameters": {
        "url": "http://zammad-zammad-nginx-1:8080/api/v1/tables/knowledge_base_answer_translations",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -992,
        224
      ],
      "id": "09eedc66-7059-4c85-9988-7928ee7e9e94",
      "name": "HTTP Request KB-Title",
      "executeOnce": true,
      "retryOnFail": true,
      "maxTries": 2,
      "credentials": {
        "httpHeaderAuth": {
          "id": "I3qqmHhn27S2U97W",
          "name": "API TOKEN"
        }
      }
    },
    {
      "parameters": {
        "url": "http://zammad-zammad-nginx-1:8080/api/v1/tables/knowledge_base_answer_translation_contents",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -752,
        224
      ],
      "id": "03baa7d5-eba6-43f3-8b70-b614ca348cae",
      "name": "HTTP Request KB-Article",
      "executeOnce": true,
      "retryOnFail": true,
      "maxTries": 2,
      "credentials": {
        "httpHeaderAuth": {
          "id": "I3qqmHhn27S2U97W",
          "name": "API TOKEN"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "let rw = $('KB Abfrage').first().json.output || {};\nif (typeof rw === 'string') {\n  rw = rw.replace(/^```(?:json)?/i, '').replace(/```$/, '').trim();\n  try { rw = JSON.parse(rw); } catch { rw = {}; }\n}\n\nconst rewriter = {\n  summary: rw.summary || '',\n  keywords: Array.isArray(rw.keywords) ? rw.keywords : [],\n  boolean: rw.boolean || '',\n  natural: rw.natural || ''\n};\n\nfunction stripHtml(s=''){\n  return String(s)\n    .replace(/<br\\s*\\/?>/gi,'\\n')\n    .replace(/<\\/(div|p|li|h\\d)>/gi,'\\n')\n    .replace(/<[^>]+>/g,'')\n    .replace(/\\n{3,}/g,'\\n\\n')\n    .trim();\n}\nfunction norm(t=''){\n  return t.toLowerCase()\n    .normalize('NFKD').replace(/[\\u0300-\\u036f]/g,'')\n    .replace(/[^\\p{L}\\p{N}\\s\\/\\.-]/gu,' ')\n    .replace(/\\s+/g,' ')\n    .trim();\n}\nfunction uniq(a){ return [...new Set(a)]; }\nfunction escRe(s){ return s.replace(/[.*+?^${}()|[\\]\\\\]/g,'\\\\$&'); }\n\nconst STOP = new Set(['und','oder','the','a','an','ist','sind','bei','mit','von','zu','im','in','am','an','auf','für','als','per','via','ohne','auch','der','die','das','den','des','dem','ein','eine','einer','einem','einen','etc','usw']);\n\nconst baseKeywords = Array.isArray(rewriter.keywords)\n  ? rewriter.keywords.map(k => String(k).trim()).filter(Boolean)\n  : [];\n\nconst hasKeywords = baseKeywords.length > 0;\nconst hasBoolean  = !!(rewriter.boolean && rewriter.boolean.trim());\n\nconst extraWhenKW = !hasKeywords ? [] : Array.from(\n  new Set(\n    (rewriter.summary + ' ' + rewriter.natural)\n      .toLowerCase()\n      .normalize('NFKD').replace(/[\\u0300-\\u036f]/g,'')\n      .replace(/[^\\p{L}\\p{N}\\s\\/\\.-]/gu,' ')\n      .split(/\\s+/)\n      .filter(w => !STOP.has(w) && w.length >= 3)\n  )\n);\n\nconst terms = Array.from(new Set([...baseKeywords, ...extraWhenKW]));\n\nconst codesFromKW  = (baseKeywords.join(' ').match(/\\b\\d{3,8}\\b/g) || []);\nconst codesFromTxt = ((rewriter.summary + ' ' + rewriter.natural).match(/\\b\\d{3,8}\\b/g) || []);\nconst codes = Array.from(new Set([...codesFromKW, ...(hasKeywords ? [] : codesFromTxt)]));\n\nfunction escRe(s){ return s.replace(/[.*+?^${}()|[\\]\\\\]/g,'\\\\$&'); }\nfunction termRegex(term){\n  const n = term.toLowerCase()\n    .normalize('NFKD').replace(/[\\u0300-\\u036f]/g,'')\n    .replace(/[^\\p{L}\\p{N}\\s\\/\\.-]/gu,' ')\n    .replace(/\\s+/g,' ')\n    .trim();\n  if (!n) return null;\n  if (/^\\d+$/.test(n)) return new RegExp(`\\\\b${escRe(n)}\\\\b`, 'i');\n  return new RegExp(`\\\\b${escRe(n)}(?:e|en|er|es|n|s)?\\\\b`, 'i');\n}\n\nconst TERM_RE = terms.map(termRegex).filter(Boolean);\nconst CODE_RE = codes.map(c => new RegExp(`\\\\b${escRe(c)}\\\\b`, 'i'));\n\nfunction buildBoolEval(qRaw){\n  let q = (qRaw || '').trim();\n  if (!q) return null;\n  q = q.replace(/^```(?:json)?/i,'').replace(/```$/,'').trim();\n  q = q.replace(/[„“\"']/g,'\"').replace(/\\bAND\\b/gi,'&&').replace(/\\bOR\\b/gi,'||').replace(/\\bNOT\\b/gi,'!');\n  const phrases = [];\n  q = q.replace(/\"([^\"]+)\"/g, (_,p) => {\n    const token = `__P_${phrases.length}__`;\n    phrases.push(\n      p.toLowerCase()\n       .normalize('NFKD').replace(/[\\u0300-\\u036f]/g,'')\n       .replace(/[^\\p{L}\\p{N}\\s\\/\\.-]/gu,' ')\n       .replace(/\\s+/g,' ')\n       .trim()\n    );\n    return token;\n  });\n  const toks = q.match(/__P_\\d+__|[()!]|&&|\\|\\||[\\p{L}\\p{N}\\.\\-\\/]+/gu) || [];\n  const src = toks.map(t => {\n    if (['&&','||','!','(',')'].includes(t)) return t;\n    if (/^__P_\\d+__$/.test(t)) {\n      const idx = Number(t.match(/\\d+/)[0]);\n      const p = escRe(phrases[idx]);\n      return `(hay.includes(\"${p}\"))`;\n    }\n    return `(hay.includes(\"${escRe(t.toLowerCase())}\"))`;\n  }).join(' ');\n  const fn = new Function('hay', `try { return (${src}); } catch(_) { return false; }`);\n  return (title, body) => {\n    const hay = `${title} ${body}`.toLowerCase()\n      .normalize('NFKD').replace(/[\\u0300-\\u036f]/g,'')\n      .replace(/[^\\p{L}\\p{N}\\s\\/\\.-]/gu,' ')\n      .replace(/\\s+/g,' ')\n      .trim();\n    return fn(hay);\n  };\n}\nconst boolMatch = hasBoolean ? buildBoolEval(rewriter.boolean) : null;\n\nconst translations = $('HTTP Request KB-Title').all().map(x => x.json);\nconst contents     = $input.all().map(x => x.json);\n\nconst contentById = new Map();\nfor (const c of contents) {\n  const k = c.id ?? c.content_id;\n  if (k != null) contentById.set(String(k), c);\n}\n\nconst docs = translations.map(t => {\n  const cid = t.content_id ?? t.id;\n  const cHit = contentById.get(String(cid)) || {};\n  const raw  = cHit.body ?? cHit.content ?? cHit.text ?? '';\n  const body = stripHtml(raw);\n  const title = t.title || '(ohne Titel)';\n  const id = t.id ?? cid;\n  const source = `https://zammad.de/#knowledge_base/1/locale/de-de/answer/${id}`;\n  return { id, title, body, source };\n});\n\nif (!TERM_RE.length && !CODE_RE.length && !boolMatch) {\n  return [{\n    json: {\n      action: 'no_hits',\n      info: 'Keine Suchsignale (keine Keywords/Boolean/Codes) – KI soll ohne KB-Kontext antworten.',\n      used_keywords: terms,\n      codes,\n      boolean_used: false,\n      ticket: $('ref_list').first().json.ticket[0],\n      ticketTitle: $('ref_list').first().json.title[0],\n      sessionId: $('ref_list').first().json.sessionId[0]\n    }\n  }];\n}\n\nfunction anyRe(list, s){ return list.some(r => r.test(s)); }\n\nfunction scoreDoc(d){\n  const text = `${d.title} ${d.body}`;\n  const hasTerm = anyRe(TERM_RE, text);\n  const hasCode = anyRe(CODE_RE, text);\n  let s = 0;\n  if (hasTerm) s += 1.5;\n  if (hasCode) s += 3.0;\n  for (const r of TERM_RE) if (r.test(d.title)) s += 0.5;\n  for (const r of TERM_RE) if (r.test(d.body)) s += 0.3;\n  return s;\n}\n\nlet hits = docs.map(d => ({...d, score: scoreDoc(d)}))\n  .filter(d => d.score > 0)\n  .sort((a,b) => b.score - a.score)\n  .slice(0,10);\n\nif (!hits.length) {\n  return [{\n    json: {\n      action: 'no_hits',\n      info: 'Keine KB-Treffer für die Suchterme.',\n      used_keywords: terms,\n      codes,\n      ticket: $('ref_list').first().json.ticket[0],\n      ticketTitle: $('ref_list').first().json.title[0],\n      sessionId: $('ref_list').first().json.sessionId[0]\n    }\n  }];\n}\n\nconst context = hits.map((r,i) =>\n  `[#${i+1} | score=${r.score.toFixed(2)}] ${r.title}\\n${r.body.slice(0,6000)}\\n${r.source}`\n).join('\\n\\n---\\n\\n');\n\nreturn [{\n  json: {\n    action: 'answer',\n    used_keywords: terms,\n    codes,\n    hits,\n    context,\n    ticket: $('ref_list').first().json.ticket[0],\n    ticketTitle: $('ref_list').first().json.title[0],\n    sessionId: $('ref_list').first().json.sessionId[0]\n  }\n}];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -528,
        224
      ],
      "id": "6a5b1d5b-84c5-448d-bc92-a0ee696dac5c",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "d4015ac1-9671-40c0-87b5-e21f7c2378cd",
              "leftValue": "={{ $json.action }}",
              "rightValue": "answer",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -320,
        224
      ],
      "id": "36da07a4-7567-4347-a8b2-edb33087a945",
      "name": "If",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        0,
        192
      ],
      "id": "efffe5b5-ba12-4671-b657-1183eb853cab",
      "name": "Google Gemini Chat Model2",
      "credentials": {
        "googlePalmApi": {
          "id": "8W2ufLn7ZhOl6xZz",
          "name": "GOOGLE AI ACCOUNT"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.sessionId }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        96,
        208
      ],
      "id": "35b1c67b-664a-45ca-8bea-1aed44d01fd4",
      "name": "Simple Memory1"
    },
    {
      "parameters": {
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "body.article.body",
              "renameField": true,
              "outputFieldName": "ticket"
            },
            {
              "fieldToAggregate": "body.ticket.id",
              "renameField": true,
              "outputFieldName": "sessionId"
            },
            {
              "fieldToAggregate": "body.ticket.title",
              "renameField": true,
              "outputFieldName": "title"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        -1840,
        224
      ],
      "id": "c24a4a6a-a2ab-4fbe-bdf8-0c2bdd395150",
      "name": "ref_list"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.5-flash-lite",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        -1344,
        512
      ],
      "id": "3594fb47-7a4e-4754-90b4-82ab64c52eea",
      "name": "Google Gemini Chat Model3",
      "credentials": {
        "googlePalmApi": {
          "id": "8W2ufLn7ZhOl6xZz",
          "name": "GOOGLE AI ACCOUNT"
        }
      }
    },
    {
      "parameters": {
        "toolDescription": "Mit einem Such-Query kann an Google angefragt und 10 Ergebnisse können abgerufen werden",
        "url": "https://www.googleapis.com/customsearch/v1",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "key"
            },
            {
              "name": "cx"
            },
            {
              "name": "q",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters2_Value', ``, 'string') }}"
            },
            {
              "name": "num",
              "value": "10"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.2,
      "position": [
        400,
        592
      ],
      "id": "e978ee66-5d43-4f8f-98fe-809acb7714dd",
      "name": "Google"
    },
    {
      "parameters": {
        "toolDescription": "Ruft den Content einer URL auf.",
        "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `link from Google Search`, 'string') }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "text/html"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122 Safari/537.36"
            }
          ]
        },
        "options": {
          "redirect": {
            "redirect": {}
          },
          "timeout": 10000
        },
        "optimizeResponse": true,
        "responseType": "html",
        "onlyContent": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_Only_Content', ``, 'boolean') }}"
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.2,
      "position": [
        288,
        592
      ],
      "id": "aa27d013-49d7-44d4-9dc8-eea35344a7d9",
      "name": "GETURLTOOL"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=TICKET:\n{{ $json.ticket }}\n\nSUCHTERME:\n{{$json.used_keywords ? $json.used_keywords.join(', ') : ''}}\n\nKONTEXTAUSZĂśGE (max. 10):\n{{$json.context}}",
        "options": {
          "systemMessage": "Du bist ein Support-Assistent. Antworte kurz, korrekt und zitierfähig. \nNutze nur den bereitgestellten Kontext. Wenn etwas fehlt, sag das klar.\nFormatiere Schritte als Liste. Verlinke Quellen mit den gegebenen SOURCE-URLs.\nFormatiere deine Antwort als reinen Fließtext.\nVerwende keine Markdown-Syntax, keine Sternchen (**) oder Punkte für Listen.\nSchreibe alles in normalen Sätzen."
        }
      },
      "id": "9712b32d-b84d-4f3a-953c-42e7b98b3c70",
      "name": "KB Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=TICKET:\n{{ $json.ticket }}\n\nHINWEIS:\nDu bist KI-rsten. Es sind keine passenden KB-Einträge gefunden worden. Formuliere selbst eine passende Antwort, wie du dem Supporter helfen kannst. Lasse Sternchen Symbole in deinen Auflistungen weg.",
        "options": {
          "systemMessage": "Formatiere deine Antwort ausschließlich als fortlaufenden Fließtext ohne Markdown, Aufzählungen oder Sonderzeichen.\nSchreibe vollständige, natürliche Sätze.\n\nFühre bei jeder Anfrage die folgenden Schritte strikt in dieser Reihenfolge aus:\n\nGoogle Tool:\nFühre immer eine Google-Suche mit einem präzisen Suchbegriff zum Thema durch.\nLies den JSON-Response des Google Tools vollständig aus.\nIn diesem Response befindet sich ein Array mit Suchergebnissen unter items.\nJedes Objekt enthält ein Feld link.\n\nGETURLTOOL Tool:\nExtrahiere alle Werte aus dem Feld link in jedem Item des Google-Responses.\nRufe für jeden einzelnen dieser Links das GETURLTOOL Tool auf.\nÜbergib die URL direkt an das GETURLTOOL Tool und sammle den gesamten Textinhalt der jeweiligen Seite.\nAnalysiere und fasse die Inhalte aller erfolgreich abgerufenen Seiten zusammen.\n\nAntworterstellung:\nKombiniere die Erkenntnisse aus den Google-Suchergebnissen und den mit GETURLTOOL geladenen Webseiten zu einer einheitlichen, fließenden Antwort.\nVerwende dabei keine Aufzählungen, keine Sternchen, keine Sonderzeichen.\nVerfasse eine natürliche, zusammenhängende Darstellung aller relevanten Informationen.\n\nAlle zwei Tools müssen immer aufgerufen werden bevor du einen Output gibst.\nVerdichte die Erkenntnisse aus GETURLTOOL zu einer knappen, faktischen Zusammenfassung mit Schritt für Schritt Anleitung\n\nRegeln:\nFühre die Tools still aus und zeige niemals Funktionsaufrufe, Parameter, JSON oder Roh-HTML in der Ausgabe\nNutze immer alle zwei Tools in der genannten Reihenfolge.\nErstelle den Such-Query immer auf Deutsch.\nWiederhole keine Inhalte, vermeide Füllwörter, vermeide Spekulationen ohne Kennzeichnung\nAntworte erst nach Abschluss aller verfügbaren GETURLTOOL-Aufrufe"
        }
      },
      "id": "b8fe61f3-56ec-4b0e-9b47-b7a56f9f30e4",
      "name": "Standalone Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        16,
        384
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "ref_list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Standalone Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Standalone Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "KB Abfrage",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "KB Abfrage": {
      "main": [
        [
          {
            "node": "HTTP Request KB-Title",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request KB-Title": {
      "main": [
        [
          {
            "node": "HTTP Request KB-Article",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request KB-Article": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "KB Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory1": {
      "ai_memory": [
        [
          {
            "node": "KB Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "KB Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Standalone Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ref_list": {
      "main": [
        [
          {
            "node": "KB Abfrage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "KB Abfrage",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Google": {
      "ai_tool": [
        [
          {
            "node": "Standalone Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "GETURLTOOL": {
      "ai_tool": [
        [
          {
            "node": "Standalone Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "KB Agent": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Standalone Agent": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "92c0bf62-14b8-4f5a-af47-139e147d9220",
  "meta": {
    "instanceId": "40be8362e0c6ed8a5c344d3255fac9365607dfd6adafc4bd2eea11dddc87e310"
  },
  "id": "R4Nuypj7keKESMHz",
  "tags": []
}
3 Likes