by Irfan Handoko
Pizza Ordering Chatbot with OpenAI - Menu, Orders & Status Tracking Introduction This workflow template is designed to automate order processing for a pizza store using OpenAI and n8n. The chatbot acts as a virtual assistant to handle customer inquiries related to menu details, order placement, and order status tracking. Features The chatbot provides an interactive experience for customers by performing the following functions: Menu Inquiry: When a customer asks about the menu, the chatbot responds with a list of available pizzas, prices, and additional options. Order Placement: If a customer places an order, the chatbot confirms order details, provides a summary, informs the customer that the order is being processed, and expresses gratitude. Order Status Tracking: If a customer asks about their order status, the chatbot retrieves details such as order date, pizza type, and quantity, providing real-time updates. Prerequisites Before setting up the workflow, ensure you have the following: OpenAI account** (Sign up here) OpenAI API key** to interact with GPT-3.5 n8n instance** running locally or on a server (Installation Guide) Configuration Steps Step 1: Set Up OpenAI API Credentials Log in to OpenAI's website. Navigate to API Keys under your account settings. Click Create API Key and copy the key for later use. Step 2: Configure OpenAI Node in n8n Open n8n and create a new workflow. Click Add Node and search for OpenAI. Select OpenAI from the list. In the OpenAI node settings, click "Create New" under the Credentials section. Enter a name for the credentials (e.g., "PizzaBot OpenAI Key"). Paste your API Key into the field. Click Save. Step 3: Set Up the Chatbot Logic Connect the AI Agent Builder Node to the OpenAI Node and HTTP Request Node. Configure the OpenAI Node with the following settings: Model: gpt-3.5-turbo Prompt: Provide dynamic text based on customer inquiries (e.g., "List available pizzas," "Place an order for Margherita pizza," "Check my order status"). Temperature: Adjust based on desired creativity (recommended: 0.7). Max Tokens: Limit response length (recommended: 150). Add multiple HTTP Request Node: For Get Products: Fetch stored menu data and return details. For Order Product: Capture order details, generate an order ID, and confirm with the customer. For Get Order: Retrieve order details based on the order ID and display progress. Step 4: Testing and Deployment Click Execute Workflow to test the chatbot. Open the Chat Message node, then copy the chat URL to access the chatbot in your browser. Interact with the chatbot by asking different queries (e.g., "What pizzas do you have?" or "I want to order a Pepperoni pizza"). Verify responses and adjust prompts or configurations as needed. Deploy the workflow and integrate it with a messaging platform (e.g., Telegram, WhatsApp, or a website chatbot). Conclusion This n8n workflow enables a fully functional pizza ordering chatbot using OpenAI's GPT-3.5. Customers can view menus, place orders, and track their order status efficiently. You can further customize the chatbot by refining prompts, adding new features, or integrating with external databases for order management. š Happy automating!
by Robert Breen
This guide walks you through building an intelligent AI Agent in n8n that routes tasks to the appropriate sub-agent using the new @n8n/n8n-nodes-langchain agent framework. Youāll create a Manager Agent that evaluates user input and delegates it to either an Email Agent or a Data Agentāeach with its own role, memory, and OpenAI model. This is perfect for use cases where you want a single entry point but intelligent branching behind the scenes. š§ Step 1: Set Up the Manager Agent Start by dragging in an Agent node and name it something like ManagerAgent. This agent will act as the ābrainā of your system, analyzing the user's input and determining whether it should be handled by the email-writing sub-agent or the data-summary sub-agent. Open the nodeās settings and paste the following into the System Message: You are an AI Manager that delegates tasks to specialized agents. Your job is to analyze the user's message and decide whether it requires: An EmailAgent for writing outreach, follow-up, or templated emails, or A DataAgent for tasks involving data summaries, metrics, or analysis. Send the instructions to the sub agents. This instruction gives the Manager Agent clarity on what roles exist and what types of tasks belong to each one. š§ Step 2: Add Memory to the Manager Agent Drag in a Memory (BufferWindow) node and label it Manager Memory. Connect it to the ai_memory input of the Manager Agent. This ensures the agent can remember recent inputs and outputs from the user and agents during the conversation. No extra configuration is needed in this memory nodeājust connect it to the agent. š Step 3: Connect a Language Model to the Manager Agent Next, add a Language Model node and choose OpenAI Chat Model. Select a model like gpt-4o-mini or gpt-4, depending on what you have access to. Under Credentials, connect your OpenAI API key. If you havenāt created this credential yet: Click "OpenAI API" under Credentials. Choose "Create New". Paste your OpenAI API key (found at https://platform.openai.com/account/api-keys). Save it and return to the workflow. Once the model is set, connect it to the ai_languageModel input of the Manager Agent. āļø Step 4: Create the Email Agent Tool Now youāll create a specialized sub-agent that only writes emails. Add an Agent Tool node and call it EmailAgent. In the toolās settings, describe its job clearly. For example: Writes professional, friendly, or action-oriented emails based on instructions. Then scroll down to the System Message section and enter the following: You are a professional Email Writing Assistant. You write polished, effective emails for tasks such as outreach, follow-ups, and client communication. Follow the instruction provided exactly and return only the email content. Use a warm, business-appropriate tone. For the text input field, use the expression: {{ $fromAI('Prompt__User_Message_', ``, 'string') }} This allows the Email Agent to receive exactly what the Manager Agent wants it to handle. Add another Memory node and link it to this tool to help it maintain short-term context. Then add a second Language Model node, configured just like the first one (you can even clone it), and connect it to the EmailAgent. Finally, connect this entire EmailAgent setup back to the ManagerAgent by attaching it to its ai_tool input. š Step 5: Create the Data Agent Tool Repeat the same steps, but this time for data summaries and analysis. Add another Agent Tool node and name it DataAgent. In the Tool Description, write something like: Responds to instructions requiring metrics, summaries, or data analysis explanations. For its input text field, you can use: {{json.query}} If desired, provide a system message that gives the agent more detailed instruction on how to behave: You are a helpful Data Analyst. Summarize trends, explain metrics, and break down data clearly based on user instructions. As with the EmailAgent, youāll also need: A dedicated Memory node A dedicated Language Model node A connection to the ai_tool input of the Manager Agent Now the Manager Agent has two tools it can delegate to: one for communication and one for insights. š§Ŗ Step 6: Test Your AI Agent System Deploy the workflow and start testing by sending prompts like: > āWrite a cold outreach email to a software company.ā The ManagerAgent should route that to the EmailAgent. Then try: > āSummarize how our lead volume changed last month.ā The DataAgent should receive that task. If routing isnāt working as expected, double-check your system messages and input bindings in each agent tool. ā Youāre Done! You now have a modular, multi-agent AI system powered by n8n. The Manager Agent delegates intelligently, each sub-agent is optimized for its role, and all of them benefit from context memory. For more advanced setups, you can chain tools, add additional memory types, or use retrieval (RAG) tools for external document support.
by Viktor Klepikovskyi
Advanced Retry and Delay Logic This template provides a robust solution for handling API rate limits and temporary service outages in n8n workflows. It overcomes the limitations of the default node retry settings, which cap retries at 5 and delays at 5 seconds. By using a custom loop with a Set, If, and Wait node, this workflow gives you complete control over the number of retries and the delay between them. Instructions: Replace the placeholder HTTP Request node with your target node (the one that might fail). In the initial Set Fields node, modify the max_tries value to set the total number of attempts for your workflow. Adjust the delay_seconds value to define the initial delay between retries. Optionally, configure the Edit Fields node to implement exponential backoff by adjusting the delay_seconds expression (e.g., {{$json.delay_seconds * 2}}). For a more detailed breakdown and tutorial of this template, you can find additional information here.
by Praveena
What is Elderwatch Elder Watch is a simple system that checks daily vitals ā like heart rate, oxygen, and walking symmetry ā using data from an iPhone or Apple Watch. If something looks off ā say oxygen drops or heart rate spikes ā it flags that as āattention required.ā And depending on that status, it can either: Email a daily report to a caregiver Or if thereās an alert ā trigger a phone call via Twilio Why do we need this Elder Watch can help older people living alone for children or care givers to keey an eye on without obsessively checking apps. Itās useful for clinics that run home-care programs. Requirements Self hosted or cloud N8N Apple health vis iphone/watch Twilio VOIP phone number (to place a call) Workflows Core workflow for getting health data, processing and making a phone call. Twilio workflow to invoke Calls API to place an outbound voice call. twilio workflow { "name": "Twilio Bridge Caller copy", "nodes": [ { "parameters": { "httpMethod": "POST", "path": "twilio-call", "responseMode": "responseNode", "options": {} }, "type": "n8n-nodes-base.webhook", "typeVersion": 2, "position": [ 0, 0 ], "id": "ca3e6c69-3e7f-4d28-b699-4789a6fa2a6d", "name": "Webhook", "webhookId": "eb3d63df-800c-401d-931a-c6fba7d834ae" }, { "parameters": { "respondWith": "text", "responseBody": "={{ $json.body }}", "options": { "responseCode": 200, "responseHeaders": { "entries": [ { "name": "Content-Type", "value": "text/xml" } ] } } }, "type": "n8n-nodes-base.respondToWebhook", "typeVersion": 1.1, "position": [ 580, 0 ], "id": "6587b7e2-ace8-4e2b-9f4b-ed028a363c25", "name": "Respond to Webhook" }, { "parameters": { "jsCode": "const summary = $input.first().json.query.summary || 'No summary, check mail for critical health info';\n\nreturn [\n {\n json: {\n body: <Response>\n <Say voice=\"alice\">${summary}</Say>\n</Response>\n }\n }\n];\n" }, "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ 340, 0 ], "id": "0d4abf87-daf3-4533-8811-64ae61265f5d", "name": "Voice Twilio response" } ], "pinData": { "Webhook": [ { "json": { "headers": { "host": "n8n.domain.com", "user-agent": "curl/8.7.1", "content-length": "0", "accept": "/", "accept-encoding": "gzip, br" }, "params": {}, "query": { "lead": " 44711111111111" }, "body": {}, "webhookUrl": "https://n8n.domain.com/webhook/twilio-call", "executionMode": "production" } } ] }, "connections": { "Webhook": { "main": [ [ { "node": "Voice Twilio response", "type": "main", "index": 0 } ] ] }, "Voice Twilio response": { "main": [ [ { "node": "Respond to Webhook", "type": "main", "index": 0 } ] ] } }, "active": true, "settings": { "executionOrder": "v1" }, "versionId": "b58c5a12-75be-4b1d-b144-8c7251468021", "meta": { "instanceId": "8dc0e8a0878d0086b2f46ef04bb00ae07186c936d82d0f0a67563e9652996d33" }, "id": "RHaKqf8Wqt7fIuGH", "tags": [] } Samples Resources https://www.youtube.com/watch?v=HYk5_jtMlgc Questions/Support Contact me on info@pankstr.com.
by Adnan
This workflow allows users to generate beautifully stylized 3D-rendered food emoji icons based on a simple text prompt. It combines user input, structured visual design generation, and image rendering using OpenAIās GPT models. ⨠What It Does Collects user input via a form: e.g. "green apple" Generates a structured JSON specification describing the emojiās form, lighting, texture, and color scheme Uses AI to render an image based on that specāstyled like a high-quality emoji icon with a transparent background š§ Use Case This template is ideal for: Designers or creators needing icon ideas or drafts for food items Developers building emoji packs or digital stickers Inspiration for AI-assisted product illustration or branding š” Why It's Useful Instead of prompting a model directly with vague terms, this flow creates a structured visual spec tailored to food items. The final emoji-style icon is polished, modern, and downloadable. ā Requirements To get started with this workflow, follow these steps: š Configure Credentials: Set up your API credentials for OpenAI and Google Drive š³ Add OpoenAI Credit: Make sure to add credit to your OpenAI account, verify your organization (required for generating images) š Connect Google Drive: Authenticate your Google Drive account āļø (Optional) Customize Prompts: Adjust the prompts within the workflow to better suit your specific needs Note: Each image generation will cost you about $0.17
by Robert Breen
A step-by-step demo that shows how to pull your Outlook calendar events for the week and ask GPT-4o to write a short summary. Along the way youāll practice basic data-transform nodes (Code, Filter, Aggregate) and see where to attach the required API credentials. 1ļøā£ Manual Trigger ā Run Workflow | Why | Lets you click āExecuteā in the n8n editor so you can test each change. | | --- | --- | 2ļøā£ Get Outlook Events ā Get many events Node type: Microsoft Outlook ā Event ā Get All Fields selected: subject, start API setup (inside this node): Click Credentials āø Microsoft Outlook OAuth2 API If you havenāt connected before: Choose āMicrosoft Outlook OAuth2 APIā ā āCreate Newā. Sign in and grant the Calendars.Read permission. Save the credential (e.g., āMicrosoft Outlook accountā). Output: A list of events with the raw ISO start time. > Teaching moment: Outlook returns a full dateTime string. Weāll normalize it next so itās easy to filter. 3ļøā£ Normalize Dates ā Convert to Date Format // Code node contents return $input.all().map(item => { const startDateTime = new Date(item.json.start.dateTime); const formattedDate = startDateTime.toISOString().split('T')[0]; // YYYY-MM-DD return { json: { ...item.json, startDateFormatted: formattedDate } }; }); 4ļøā£ Filter the Events Down to This Week After weāve normalised the start date-time into a simple YYYY-MM-DD string, we drop in a Filter node. Add one rule for every day you want to keepāfor example 2025-08-07 or 2025-08-08. Rows that match any of those dates will continue through the workflow; everything else is quietly discarded. Why weāre doing this: we only want to summarise tomorrowās and the following dayās meetings, not the entire calendar. 5ļøā£ Roll All Subjects Into a Single Item Next comes an Aggregate node. Tell it to aggregate the subject field and choose the option āOnly aggregated fields.ā The result is one clean item whose subject property is now a tidy list of every meeting title. Itās far easier (and cheaper) to pass one prompt to GPT than dozens of small ones. 6ļøā£ Turn That List Into Plain Text Insert a small Code node right after the aggregation: return [{ json: { text: items .map(item => JSON.stringify(item.json)) .join('\n') } }]; Need a Hand? Iām always happy to chat automation, n8n, or Outlook API quirks. Robert Breen ā Automation Consultant & n8n Instructor š§ robert@ynteractive.comā|āLinkedIn
by Yaron Been
Google Veo 3 Fast Video Generator Description A faster and cheaper version of Googleās Veo 3 video model, with audio Overview This n8n workflow integrates with the Replicate API to use the google/veo-3-fast model. This powerful AI model can generate high-quality video content based on your inputs. Features Easy integration with Replicate API Automated status checking and result retrieval Support for all model parameters Error handling and retry logic Clean output formatting Parameters Required Parameters prompt** (string): Text prompt for video generation Optional Parameters seed** (integer, default: None): Random seed. Omit for random generations resolution** (string, default: 720p): Resolution of the generated video negative_prompt** (string, default: None): Description of what to discourage in the generated video How to Use Set up your Replicate API key in the workflow Configure the required parameters for your use case Run the workflow to generate video content Access the generated output from the final node API Reference Model: google/veo-3-fast API Endpoint: https://api.replicate.com/v1/predictions Requirements Replicate API key n8n instance Basic understanding of video generation parameters
by Varritech
Workflow: Publish to Contentful with Rich Text Formatting ā” About the Creators This workflow was created by Varritech Technologies, an innovative agency that leverages AI to engineer, design, and deliver software development projects 500% faster than traditional agencies. Based in New York City, we specialize in custom software development, web applications, and digital transformation solutions. If you need assistance implementing this workflow or have questions about content management solutions, please reach out to our team. šļø Architecture Overview This workflow takes a JSON article payload, splits its markdown content into logical chunks, converts each chunk into Contentful Rich Text JSON via an AI agent, merges the resulting rich text nodes back into a single document, formats the entire entry according to Contentful's field schema, and finally publishes it to Contentful. Trigger ā Executes when called by another workflow Split by Headings ā Breaks markdown into ##-delimited chunks Markdown ā Rich Text ā AI agent converts each chunk to Contentful Rich Text JSON Combine Rich Text Objects ā Aggregates all chunk outputs into one document Format Entry ā Wraps metadata and rich-text content into Contentful schema Publish Entry ā HTTP POST to Contentful API š¦ Node-by-Node Breakdown flowchart LR A[When Executed by Another Workflow] --> B[Split by Headings] B --> C[Markdown to Contentful format] C --> D[Combine Rich Text Objects] D --> E[Merge1] E --> F[Format1] F --> G[Create newly formatted Contentful Entry] 1. When Executed by Another Workflow Type: Execute Workflow Trigger Input Example: title, slug, category.id, description, keywords, content, metaTitle, metaDescription, readingTime, difficulty Purpose: Receives the JSON payload from the upstream workflow. 2. Split by Headings Type: Code Logic: Splits input.content into an array of markdown chunks at each second-level heading (##). Emits one item per chunk with index, slug, title, and contentChunk. 3. Markdown to Contentful format Type: LangChain Agent (+ OpenAI Chat model) System Prompt: Defines rules for generating valid Contentful Rich Text JSON (must include nodeType, data:{}, content:[], etc.). Provides examples for paragraphs, headings, lists, links, and images. User Prompt: Here is the markdown content to convert: Purpose: Converts each markdown chunk into an array of rich-text nodes. 4. Combine Rich Text Objects Type: Code Logic: Parses and merges all content arrays returned by the AI agent into one combined content array under a document root. 5. Merge1 Type: Merge Purpose: Joins the original item (with metadata) and the combined rich-text document into a single data stream. 6. Format1 Type: Code Logic: Maps workflow data into the Contentful entry schema by setting each field (title, slug, category link, description, keywords, rich-text content, metaTitle, metaDescription, readingTime, difficulty) under the appropriate locale and structure required by Contentful. 7. Create newly formatted Contentful Entry Type: HTTP Request Method: POST URL: https://api.contentful.com/spaces Headers: Authorization: Bearer token for Contentful Management API Content-Type: application/vnd.contentful.management.v1+json X-Contentful-Version: entry version number X-Contentful-Content-Type: content type ID Body: The formatted fields object produced by the previous node Purpose: Publishes the new entry with rich-text content to Contentful. š Design Rationale & Best Practices Chunked Conversion Splitting by headings prevents AI context limits and keeps conversions modular. Strict Rich Text Schema Enforcing nodeType, data, and content structure avoids validation errors on Contentful. Two-Phase Merge Separating "combine AI outputs" and "format entry" keeps transformations clear and testable. Idempotent Publish Uses explicit versioning and content type headers to ensure correct entry creation.
by Shahrukh
AI-Powered Workflow for Auto-Responding to Positive Cold Email Replies This workflow is designed for agencies, freelancers, and sales teams who want to turn positive cold email replies into booked meetings automaticallyāwithout hiring VAs or spending hours on manual responses. ā The Problem Most teams waste time replying manually or pay for virtual assistants, leading to delays and missed opportunities. This template eliminates that bottleneck. ā What the Workflow Does Detects positive replies from Instantly.ai campaigns Uses AI to analyze intent and craft natural, human-like responses Adds personalization to keep replies authentic Includes Calendly links, product docs, or FAQs based on the leadās intent Sends responses instantlyāso you never miss a hot lead again No robotic AI text. Just smooth, human-style emails that get booked calls faster. š„ Who is This For? Agencies** running Instantly.ai or similar outbound tools Founders** handling their own cold email outreach Sales teams** looking to automate follow-up and booking Anyone who gets 5ā20 positive replies a week and wants to 2xā4x conversions ā Requirements n8n** (Cloud or self-hosted) Instantly.ai account** with API access OpenAI API key** (stored securely in n8n credentials) (Optional) Calendly or booking link, Notion or Google Docs for resources āļø How to Set Up Import the workflow into n8n Add your Instantly.ai API credentials and OpenAI key using n8nās credential manager Customize the AI prompt for your tone, CTA, and offer Insert your Calendly or booking link in the response template Test with one positive reply to confirm filtering and response quality Activate the workflow to auto-reply in real time š§ How to Customize Adjust the filtering logic for different keywords or intent signals Add branching for multiple booking links (e.g., based on region or service type) Push responses to a CRM for tracking Include extra resources like case studies or pricing docs
by PiAPI
What this workflow does? This workflow primarily uses the GPT-4o API from PiAPI and automatically creates front/side/top views of 3D models from commands. Who is this forļ¼ 3D Designersļ¼ Quickly generate standardized orthographic views for design review E-commerce Operatorsļ¼ Create multi-angle product display images 3D Modeling Beginnersļ¼ Instantly produce basic reference views Step-by-step Instruction Fill in X-API-Key of your PiAPI account and the image prompt based on your inspiration. Click Test workflow. Get the image url in the final node. OutPut
by n8n Team
This workflow is designed for dynamic and intelligent conversational capabilities. It incorporates OpenAI's GPT-4o model for natural language understanding and generation. Additional tools include SerpAPI and Wikipedia for enriched, data-driven responses. The workflow is triggered manually, and utilizes a 'Window Buffer Memory' to maintain the context of the last 20 interactions for better conversational continuity. All these components are orchestrated through n8n nodes, ensuring seamless interconnectivity. To use this template, you need to be on n8n version 1.50.0 or later.
by Jonathan
This workflow will take an alert from Syncro, determine if it's an agent_offline_trigger type, then determine if it's a new alert or a close to an existing alert, and then submit it to OpsGenie. New alerts will create a new alert in OpsGenie and resolved alerts will close the alert in OpsGenie. It doesn't require any kind of Google Sheets because OpsGenie allows you to submit a unique ID (known as an alias) along with the alert, which can be referenced later when closing the alert. The trigger type can be changed to suit your needs. You will need to create an API integration in OpsGenie. In Syncro, in addition to setting up the appropriate notification to webhook, you will also need a script that closes the agent_offline_trigger alert and an automated remediation to trigger that script when the asset goes offline (the script is queued and run when the asset comes back online). > This workflow is part of an MSP collection, The original can be found here: https://github.com/bionemesis/n8nsyncro