Schrittweise Rezepte über die API Ninjas Recipe API in n8n KI-Agenten per API finden
Dies ist ein Automatisierungsworkflow mit 6 Nodes. Hauptsächlich werden Agent, HttpRequestTool, ChatTrigger, LmChatOpenAi, MemoryBufferWindow und andere Nodes verwendet. Schritt-für-Schritt-Rezepte im n8n KI-Agenten über die API Ninjas Rezepte-API finden
- •Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
- •OpenAI API Key
Verwendete Nodes (6)
Kategorie
{
"meta": {
"instanceId": "c8c9ba5d3eb26ae47a06d24ff164a01c0d73ed4753a74903c2bb609d434a0f6b",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "69588c4f-75cb-48c1-913d-b39e108591aa",
"name": "Chat-Trigger - Receive Message",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
624,
16
],
"webhookId": "c730e1d3-d3db-46f4-9218-b9b0d9312b7c",
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "9e3376ef-ebef-481d-953b-aee21c174646",
"name": "KI-Agent - Route to Tools",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
832,
16
],
"parameters": {
"options": {
"systemMessage": "Always use the recipe tool if i ask you for recipe"
}
},
"typeVersion": 2.2
},
{
"id": "8900f434-6a59-47f7-ad6e-ce4649ba417b",
"name": "LLM - OpenAI Chat",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
768,
224
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5-mini",
"cachedResultName": "gpt-5-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "IscXryYQZrfSUSkH",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "a1c84496-89b6-405a-ae4a-c9688d717586",
"name": "Recipe Werkzeug - Fetch from API Ninjas",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
1120,
224
],
"parameters": {
"url": "https://api.api-ninjas.com/v1/recipe",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "query",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', ``, 'string') }}"
}
]
},
"toolDescription": "Use the query parameter to specify the food, and it will return a recipe"
},
"credentials": {
"httpHeaderAuth": {
"id": "IU0D73p4jW1pvQE8",
"name": "API Ninjas Credential"
}
},
"typeVersion": 4.2
},
{
"id": "ce484377-a229-49b7-a6b7-ac3592595a25",
"name": "Speicher - Recent Messages (Window)",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
928,
224
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "c13fc9d9-1f10-49c9-87e2-4f9233e56626",
"name": "Workflow description",
"type": "n8n-nodes-base.stickyNote",
"position": [
304,
-320
],
"parameters": {
"color": 5,
"width": 272,
"height": 912,
"content": "# Workflow description\n\nA small AI agent that answers chat messages and calls a recipe tool when you ask for a recipe.\n\n## Setup\n- Add OpenAI key to **LLM - OpenAI Chat**.\n- Add API Ninjas key to **Recipe Tool - Fetch from API Ninjas**.\n- Keep the agent system hint as is so it uses the recipe tool on recipe asks.\n\n## Flow\n1) **Chat Trigger - Receive Message** starts on each message\n2) **Memory - Recent Messages (Window)** keeps short context\n3) **AI Agent - Route to Tools** decides and calls tools\n4) **Recipe Tool - Fetch from API Ninjas** returns ingredients and instructions\n5) Agent replies with a clean message back to chat\n\n## Try it\nType: \"find me a pasta recipe\". The agent should call the tool and return a simple list of ingredients and steps.\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"8900f434-6a59-47f7-ad6e-ce4649ba417b": {
"ai_languageModel": [
[
{
"node": "AI Agent - Route to Tools",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Chat Trigger - Receive Message": {
"main": [
[
{
"node": "AI Agent - Route to Tools",
"type": "main",
"index": 0
}
]
]
},
"Memory - Recent Messages (Window)": {
"ai_memory": [
[
{
"node": "AI Agent - Route to Tools",
"type": "ai_memory",
"index": 0
}
]
]
},
"Recipe Tool - Fetch from API Ninjas": {
"ai_tool": [
[
{
"node": "AI Agent - Route to Tools",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}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?
Fortgeschritten
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.
Verwandte Workflows
Milan Vasarhelyi - SmoothWork
@vasarmilanWe help you eliminate the busywork by building compact business tools tailored to your processes. 📞: https://smoothwork.ai/book-a-call ▶️: https://www.youtube.com/@vasarmilan
Diesen Workflow teilen