Pizza Ordering Chatbot using AI Agents and Tools - n8n Workflow

Build a powerful AI pizza ordering chatbot using an n8n workflow, OpenAI, and Langchain tools. Automate menu display, order placement, and status checks using this advanced n8n node configuration.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Restaurants or food service providers looking to automate order intake.
Businesses needing customer service automation using AI agents.
Developers exploring advanced Langchain agent capabilities and custom tools within an n8n workflow.
Users seeking complex, practical n8n templates for conversational AI.

Overview

This comprehensive n8n workflow demonstrates how to build a smart, conversational assistant named 'Pizzaro' capable of managing a digital pizza ordering process. By utilizing the specialized Langchain agent n8n node, this automation interprets natural language requests and intelligently delegates tasks to specific tools (webhooks) for backend operations. This robust system handles everything from fetching menu details to processing and tracking orders, minimizing human intervention. This advanced n8n workflow is a prime example of leveraging external services and powerful AI to create scalable customer service solutions, providing high-value n8n templates for complex integrations.

How it Works

The entire process of this n8n workflow is driven by a conversational AI loop, initiated by a specialized n8n trigger.


  1. Trigger and Greeting: The automation starts with the When chat message received n8n trigger node. This immediately presents the customer with a welcome message from 'Pizzaro' and waits for input.

  2. AI Orchestration: The user's input is passed directly to the central AI Agent n8n node. This agent is configured with Chat OpenAI as its language model and uses the Window Buffer Memory n8n node to maintain context throughout the conversation.

  3. Tool Selection: Based on the user's intent, as defined in its detailed system prompt, the AI Agent dynamically selects the appropriate tool:

If the user asks about the menu, the agent calls the Get Products n8n node (a custom HTTP Request tool).
If the user attempts to place an order, the agent calls the Order Product n8n node, passing the required details as a POST body.
* If the user inquires about an existing status, it calls the Get Order n8n node.

  1. Response Generation: The agent executes the chosen tool, receives the operational data (e.g., menu list, order confirmation), and uses the Langchain n8n node to synthesize a natural, coherent response delivered back to the customer, completing the cycle of this powerful n8n workflow.

Installation Guide

To set up this n8n workflow, follow these steps:


  1. Import: Copy the entire JSON code provided and import it into your n8n instance.

  2. OpenAI Credentials: Locate the Chat OpenAI n8n node and update the 'OpenAI Credentials' with your valid API key.

  3. Agent Configuration: Review the AI Agent n8n node. The system message defines the agent's persona and rules. Adjust these if your menu or ordering process changes.

  4. Tool Webhooks: The custom tools (Get Products, Order Product, Get Order) are currently set to placeholder n8n URLs (https://n8n.io/webhook/...). You must replace these URLs with the actual webhooks or API endpoints that manage your product catalog, order processing, and status tracking in your backend system.

  5. Activate: Once credentials and webhook URLs are configured, activate the n8n workflow. The When chat message received n8n trigger is now ready to handle incoming chat sessions.

Node Details

When chat message received (n8n trigger): The starting point of this n8n workflow. It acts as the chat interface trigger, initiating the automation upon receiving a user message. It also handles the initial welcome message.
AI Agent (n8n node): The core intelligence. It coordinates the conversation, selects tools based on intent, and manages the flow. Key configuration includes a comprehensive system message defining the agent's ordering and status rules.
Chat OpenAI (n8n node): Serves as the Large Language Model provider for the AI Agent, handling interpretation and response generation.
Window Buffer Memory (n8n node): Crucial for conversational flow. This Langchain n8n node allows the AI Agent to remember previous messages, ensuring context is maintained throughout the customer's interaction.
Get Products (n8n node / ToolHttpRequest): Configured as a tool that the AI Agent can call. Its function is to retrieve and present the available pizza menu using a defined webhook URL. The agent knows to use this tool when asked about the menu.
Order Product (n8n node / ToolHttpRequest): This tool processes the actual order. It's configured as a POST request, sending the details parsed by the AI Agent (e.g., pizza type, quantity) to a backend webhook to place the order.


  • Get Order (n8n node / ToolHttpRequest): A dedicated tool for checking the status of previous orders, used by the AI Agent when a customer inquires about tracking.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by

Irfan Handoko, an Engineering Manager at GITS Indonesia. With a background as an experienced mobile application designer and developer, he has a strong foundation in application development, especially mobile applications, particularly on Android and iOS platforms. Throughout his career, he has successfully contributed to various industries including healthcare, finance, e-commerce, and many more.

Featured*