AI Recipe Generation using Ollama Chef Agent - n8n Workflow

Create an interactive AI Chef Agent using this powerful n8n workflow template. Leverage the Ollama n8n node to generate recipes based on user-provided ingredients locally.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Developers and Self-Hosters: Individuals utilizing Ollama for local Large Language Model (LLM) serving who need a robust integration layer like n8n.
Technical Users: Those looking for advanced examples of n8n agent technology, specifically using the LangChain n8n node group.
Content Creators: People who need to rapidly generate cooking content or recipe ideas based on limited ingredients.
n8n Automation Specialists: Users seeking complex conversational n8n templates that involve memory and customized system prompts.

Overview

This n8n workflow transforms a basic input of ingredients into a customized recipe list using a self-hosted or local LLM powered by Ollama. This approach provides excellent privacy and cost control compared to external services. The central component is the 'Chef AI Agent,' which is meticulously configured with a system message instructing it to act as a helpful cooking assistant. It receives user inputs (ingredients) and is designed to provide five recipe suggestions while listing a maximum of three potential missing ingredients needed for those recipes.

By leveraging specific n8n node types, this advanced n8n workflow ensures a stateful conversation thanks to the Simple Memory component. Whether activated via a public webhook or a custom chat platform using the specialized n8n trigger node, this template offers a robust foundation for building powerful, customized AI applications within your n8n environment.

How it Works

This powerful n8n workflow is designed to be triggered by incoming data, initiating the AI interaction sequence.


  1. Trigger Reception: The process begins when the n8n workflow receives input, either through the generic Webhook n8n trigger (at the /lets-cook path) or the When chat message received n8n trigger node, indicating a user is ready to cook.

  2. Agent Initialization: The received message, which contains the list of available ingredients, is passed to the Chef AI Agent n8n node. This agent operates based on a strict system prompt to act as a culinary assistant.

  3. Language Model Connection: The agent executes its task using the Ollama Chat Model n8n node, ensuring the computation is performed by your configured Ollama instance (which requires an appropriate credential setup).

  4. Memory Management: The Simple Memory n8n node is connected to the agent, providing historical context within a 5000-character window. This allows the AI agent to remember previous turns in the conversation, enhancing the user experience if this n8n template is used conversationally.

  5. Tool Configuration: The Think n8n node serves as the tool manager, although no external tools are configured in this basic recipe generation n8n workflow, it is ready for future expansion.

  6. Response Delivery: Finally, the culinary suggestions generated by the AI agent are sent back to the originating service using the Respond to Webhook n8n node, completing the execution of the n8n workflow.

Installation Guide

To implement this n8n template, follow these steps:


  1. Import: Copy the entire JSON code provided and import it into your n8n instance via the 'Workflows' menu, using the 'New' button and selecting 'Import from JSON'.

  2. Ollama Credential Setup: This n8n workflow requires credentials for your self-hosted Ollama instance. Navigate to 'Credentials,' search for 'Ollama,' and configure the connection details, ensuring the API endpoint is correct.

  3. Activate: Ensure the Ollama Chat Model n8n node uses the correct credential ID you just created.

  4. Define Trigger: Configure the Webhook n8n trigger path (lets-cook) or set up the When chat message received n8n trigger to integrate with your desired chat platform.

  5. Activate Workflow: Once configured, set the workflow to 'Active' to start listening for the n8n trigger.

Node Details

Webhook (n8n trigger): Sets up the HTTP endpoint /lets-cook. This is the primary entry point for external applications to initiate the n8n workflow by sending ingredient data.
When chat message received (n8n trigger): A secondary specialized n8n trigger provided by the LangChain integration, allowing direct connection to chat services for conversational use cases.
Chef AI Agent (Agent n8n node): The core intelligence unit. It uses a custom system message: "You are a helpful cooking assistant... Provide a list of 5 items to make. If there are recipes that include Ingredients that are not provided in the beginning, advise the user... Limit to 3 missing ingredients."
Ollama Chat Model (LLM n8n node): Specifies the language model engine. This requires valid Ollama API credentials to run the local LLM used by this n8n workflow.
Simple Memory (Memory n8n node): A crucial component for conversational n8n templates, enabling the AI agent to retain context over multiple user interactions by utilizing a large 5000 token context window.
Respond to Webhook: Takes the output generated by the Chef AI Agent and sends it back immediately as the response to the originating n8n trigger request.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by
Clown Mutiny
Clown Mutiny

Sure! Here’s a version written from the perspective of Clown Mutiny: Clown Mutiny is a collective of artists, tinkerers, and automation rebels using n8n to create weirdly wonderful workflows. We build playful systems powered by AI and storytelling—where code meets chaos, and automation gets a sense of humor.

Featured*