Buscar recetas paso a paso a través de la API de recetas de API Ninjas en el agente de n8n AI
Este es unautomatización que contiene 6 nodos.Utiliza principalmente nodos como Agent, HttpRequestTool, ChatTrigger, LmChatOpenAi, MemoryBufferWindow. Buscar recetas paso a paso mediante la API de recetas de API Ninjas en el agente n8n con IA
- •Pueden requerirse credenciales de autenticación para la API de destino
- •Clave de API de OpenAI
Nodos utilizados (6)
Categoría
{
"meta": {
"instanceId": "c8c9ba5d3eb26ae47a06d24ff164a01c0d73ed4753a74903c2bb609d434a0f6b",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "69588c4f-75cb-48c1-913d-b39e108591aa",
"name": "Disparador de chat - 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": "Agente IA - 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 Herramienta - 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": "Memoria - 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
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
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
Compartir este flujo de trabajo