Pizza Ordering Workflow
Shared 10/5/2025
260 views
Visual Workflow
JSON Code
{
"id": "91ulb2dOuwNuadRr",
"meta": {
"instanceId": "274f1e029771ddf1edd3aa5ab1bcc762247c497e0eaf6b9ef0a118d13388049e",
"templateCredsSetupCompleted": true
},
"name": "PizaaWorkflowTools",
"tags": [],
"nodes": [
{
"id": "2d769dbe-dbf1-47c1-ab65-ec41ef77b775",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
208,
0
],
"webhookId": "baedbc3b-42e9-4085-924e-066a449c3c19",
"parameters": {
"options": {
"responseMode": "responseNodes"
}
},
"typeVersion": 1.3
},
{
"id": "fe68fb3d-1d8e-400c-a914-2dbc5d9899c6",
"name": "Basic LLM Chain",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
624,
0
],
"parameters": {
"batching": {},
"messages": {
"messageValues": [
{
"message": "=You are a managing a pizza ordering system. Your task is to extract the pizza order from a chat message. Available Pizzas are {{ $json.available_pizzas }}. If the customer requests a pizza that is not on the menu, put an error message into the \"error\" field."
}
]
},
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "6d841230-6c3b-4e22-931e-9c7c48e6eb6b",
"name": "Ollama Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
512,
208
],
"parameters": {
"model": "hf.co/tensorblock/mlx-community_Qwen3-4B-bf16-GGUF:Q4_K_M",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "C910tH8qlKePraue",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "6fb81524-0c57-4e2d-aa06-6230ebb5e2b9",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
768,
208
],
"parameters": {
"autoFix": true,
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"pizzas\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\" },\n \"quantity\": {\n \"type\": \"integer\"\n }\n }\n\t\t\t}\n\t\t},\n \"error\": {\n \"type\": \"string\"\n }\n\t}\n}"
},
"typeVersion": 1.3
},
{
"id": "16bc07f1-98f5-4af3-aa4f-000fd6257081",
"name": "Ollama Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
768,
448
],
"parameters": {
"model": "hf.co/tensorblock/mlx-community_Qwen3-4B-bf16-GGUF:Q4_K_M",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "C910tH8qlKePraue",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "80098a88-a75a-4941-b8e4-f9b2a72cfe22",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
416,
0
],
"parameters": {
"include": "selected",
"options": {},
"assignments": {
"assignments": [
{
"id": "92b8e5df-62bc-4dd7-9496-5ca082f4eeb4",
"name": "available_pizzas",
"type": "array",
"value": "=[\"Margerita - tomato sauce, mozzarella and basil\", \"Salami - tomato sauce, mozzarella and italian salami\", \"Diavolo - tomato sauce, mozzarella and spicy salami\", \"Vegetal - vegetarian, eggplants, mushrooms and mozzarella\"]"
}
]
},
"includeFields": "chatInput",
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "a5dbcf7a-06df-4f6f-84cd-0868522ec29b",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
976,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3ffd682f-f8c6-4fb5-a7d9-2a41d8d06998",
"operator": {
"type": "array",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.output.pizzas }}",
"rightValue": ""
},
{
"id": "c41ba47d-47f4-45bc-bafc-38cd4cca8fe5",
"operator": {
"type": "string",
"operation": "empty",
"singleValue": true
},
"leftValue": "={{ $json.output.error }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "24cc9aec-6ae8-4851-a64c-76bdcf382e4e",
"name": "Respond to Chat",
"type": "@n8n/n8n-nodes-langchain.chat",
"position": [
1184,
-96
],
"parameters": {
"message": "=Is that right: {{ JSON.stringify($json.output.pizzas) }}",
"options": {}
},
"typeVersion": 1
},
{
"id": "aa0de86d-0c68-46d7-a788-31c9422148b4",
"name": "Respond to Chat1",
"type": "@n8n/n8n-nodes-langchain.chat",
"position": [
2128,
-176
],
"parameters": {
"message": "Your order is confirmed",
"options": {},
"waitUserReply": false
},
"typeVersion": 1
},
{
"id": "8b9770be-cb2c-4238-a21c-4abe53d7fd78",
"name": "Respond to Chat2",
"type": "@n8n/n8n-nodes-langchain.chat",
"position": [
2128,
-16
],
"parameters": {
"message": "Please start over",
"options": {},
"waitUserReply": false
},
"typeVersion": 1
},
{
"id": "732a68d2-0329-444e-99cf-11edf58a8d24",
"name": "Respond to Chat3",
"type": "@n8n/n8n-nodes-langchain.chat",
"position": [
1184,
96
],
"parameters": {
"message": "=There was an error in processing your request: {{ $json.output.error }}.\nPlease choose a different pizza.",
"options": {},
"waitUserReply": false
},
"typeVersion": 1
},
{
"id": "72306ff5-2d30-4e30-9bec-032f8b31859f",
"name": "If1",
"type": "n8n-nodes-base.if",
"position": [
1888,
-96
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3ffd682f-f8c6-4fb5-a7d9-2a41d8d06998",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.output.confirmation }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "0ab525dd-3ff3-437e-b07c-6c3fe210f502",
"name": "Basic LLM Chain1",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1504,
-96
],
"parameters": {
"batching": {},
"messages": {
"messageValues": [
{
"message": "You're task is to classify the given value into whether it represents confirmation or not. COnfirmation is given by affirmative phrases such as 'yes', 'true', 'confirm'. Not comriming is given by phrases such as 'no', 'false' or 'disagree'."
}
]
},
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "95f09f27-51e3-40ff-bec3-5bdddc04d5b0",
"name": "Ollama Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
1456,
112
],
"parameters": {
"model": "hf.co/tensorblock/mlx-community_Qwen3-4B-bf16-GGUF:Q4_K_M",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "C910tH8qlKePraue",
"name": "Ollama account"
}
},
"typeVersion": 1
},
{
"id": "393d79bb-5fc8-4be9-b675-24240bf26d0c",
"name": "Structured Output Parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1632,
208
],
"parameters": {
"autoFix": true,
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"confirmation\": {\n\t\t\t\"type\": \"boolean\"\n\t\t}\n\t}\n}"
},
"typeVersion": 1.3
},
{
"id": "52cd32f3-9385-4566-8352-d81134d8192f",
"name": "Ollama Chat Model3",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
1632,
368
],
"parameters": {
"model": "hf.co/tensorblock/mlx-community_Qwen3-4B-bf16-GGUF:Q4_K_M",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "C910tH8qlKePraue",
"name": "Ollama account"
}
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "f223697e-59e2-46cc-8951-b20eba773551",
"connections": {
"If": {
"main": [
[
{
"node": "Respond to Chat",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Chat3",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Respond to Chat1",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Chat2",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Respond to Chat": {
"main": [
[
{
"node": "Basic LLM Chain1",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain1": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"Ollama Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Ollama Chat Model1": {
"ai_languageModel": [
[
{
"node": "Structured Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Ollama Chat Model2": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Ollama Chat Model3": {
"ai_languageModel": [
[
{
"node": "Structured Output Parser1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Basic LLM Chain",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "Basic LLM Chain1",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
}
}
}