Trouver des recettes étape par étape via l'API Recettes d'API Ninjas dans un agent n8n AI
Ceci est uncontenant 6 nœuds.Utilise principalement des nœuds comme Agent, HttpRequestTool, ChatTrigger, LmChatOpenAi, MemoryBufferWindow. Trouver des recettes étape par étape via l'API de recettes API Ninjas dans un agent n8n AI
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
- •Clé API OpenAI
Nœuds utilisés (6)
Catégorie
{
"meta": {
"instanceId": "c8c9ba5d3eb26ae47a06d24ff164a01c0d73ed4753a74903c2bb609d434a0f6b",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "69588c4f-75cb-48c1-913d-b39e108591aa",
"name": "Déclencheur 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": "Agent 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 Outil - 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": "Mémoire - 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
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Intermédiaire
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
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
Partager ce workflow