This workflow corresponds to n8n.io template #7837 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "69588c4f-75cb-48c1-913d-b39e108591aa",
"name": "Chat Trigger - Receive Message",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
624,
16
],
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "9e3376ef-ebef-481d-953b-aee21c174646",
"name": "AI 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": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "a1c84496-89b6-405a-ae4a-c9688d717586",
"name": "Recipe Tool - 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": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "ce484377-a229-49b7-a6b7-ac3592595a25",
"name": "Memory - Recent Messages (Window)",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
928,
224
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "contact-note-1759910018484",
"name": "Creator Contact Info",
"type": "n8n-nodes-base.stickyNote",
"position": [
-76,
-625
],
"parameters": {
"color": 5,
"width": 600,
"height": 440,
"content": "# Contact Us:\n## Milan @ SmoothWork - [Book a Free Consulting Call](https://smoothwork.ai/book-a-call/)\n\n\n\n### We help businesses eliminate busywork by building compact business tools tailored to your process.\n### Contact us for customizing this, or building similar automations.\n\n\ud83d\udce7 hello@smoothwork.ai\n\u25b6\ufe0f [Check us on YouTube](https://www.youtube.com/@vasarmilan)\n\ud83d\udcde [Book a Free Consulting Call](https://smoothwork.ai/book-a-call/)\n\ud83d\udcbc [Add me on Linkedin](https://www.linkedin.com/in/mil%C3%A1n-v%C3%A1s%C3%A1rhelyi-3a9985123/)\n"
},
"typeVersion": 1
},
{
"id": "doc-note-1759910018484",
"name": "Workflow Description",
"type": "n8n-nodes-base.stickyNote",
"position": [
-76,
-185
],
"parameters": {
"width": 600,
"height": 1050,
"content": "## Workflow Overview\n\nThis AI chatbot intelligently retrieves recipes from an external API based on natural conversation. When users ask for recipes, the AI agent automatically uses the recipe lookup tool to fetch real-time data and provides helpful, conversational responses.\n\n### First Setup\n\n**Required Credentials:**\n- **OpenAI API:** Sign up at OpenAI and obtain an API key for the language model\n- **API Ninjas:** Register at API Ninjas to get your free API key for the Recipe API (supports 400+ calls/day)\n\nConfigure both credentials in n8n using the appropriate authentication methods. The Recipe API uses Header Authentication (X-Api-Key header).\n\n### Configuration\n\n**AI Agent System Message:** The agent is configured with the instruction \"Always use the recipe tool if i ask you for recipe\" to ensure it leverages the external API when appropriate.\n\n**Recipe Tool Setup:** The HTTP Request Tool is configured to automatically accept query parameters from the AI model. The tool description explains its purpose, helping the AI understand when and how to use it.\n\n**Language Model:** Currently set to use OpenAI's gpt-5-mini. You can change this to other compatible models based on your needs.\n\n**Memory:** Uses a window buffer to maintain conversation context, allowing for natural multi-turn conversations."
},
"typeVersion": 1
},
{
"id": "video-note-1759912267932",
"name": "Video Walkthrough",
"type": "n8n-nodes-base.stickyNote",
"position": [
534,
-625
],
"parameters": {
"width": 420,
"height": 340,
"content": "# Video Walkthrough\n[](https://youtu.be/mMEX4Zsz4XY)"
},
"typeVersion": 1
}
],
"connections": {
"LLM - OpenAI Chat": {
"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
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
httpHeaderAuthopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
[](https://youtu.be/mMEX4Zsz4XY)
Source: https://n8n.io/workflows/7837/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
ModelRouter. Uses chatTrigger, agent, modelSelector, httpRequest. Chat trigger; 28 nodes.
https://crmaiinsight.com/leadbot
This workflow automates patient care coordination in healthcare settings by intelligently processing patient information and scheduling follow-up communications through multiple channels. Designed for
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
This templates helps you ingest your PDF / text / MD documents into a knowledge graph use the graph as the knowledge base for your AI chatbots (and other workflows) visualize the main topics and gaps