n8n AI Automation Recipes and Templates
Template Workflows for AI
n8n provides a library of pre-built workflow templates that you can import directly into your instance and customize. For AI use cases, these templates cover the most common patterns: conversational agents, RAG-based Q&A systems, content generation pipelines, data classification, and multi-tool research agents. Each template includes all required nodes pre-configured with reasonable defaults, so you can get a working demo running before modifying it for your specific requirements.
The template library is accessible through the n8n interface under the Templates section, and templates from the community are also available on the n8n website. You can browse by category, search by keyword, and filter for AI-specific workflows. Once imported, a template becomes a regular workflow that you can modify, extend, or combine with other workflows.
Conversational AI Agent
The conversational agent template connects a Chat Trigger to an AI Agent node with memory and tools. The Chat Trigger provides a web-based chat interface where users type messages. The AI Agent processes each message, maintains conversation history through a memory node, and can call tools to look up information or take actions. This template is the starting point for customer support bots, internal knowledge assistants, and interactive data exploration tools.
Key configuration points include the system prompt (which defines the agent's role and boundaries), the memory type (buffer memory for short conversations, PostgreSQL memory for persistent sessions), and the tool set. A typical customer support agent might include tools for querying a knowledge base via RAG, checking order status via an HTTP request to your API, and escalating to a human via a Slack notification.
RAG Document Q&A
The RAG template splits into two workflows: an ingestion pipeline and a query pipeline. The ingestion workflow takes documents (from file uploads, Google Drive, or web URLs), splits them into chunks using a Text Splitter node, generates embeddings using an Embedding node, and stores the vectors in a vector database (Qdrant, Pinecone, or an in-memory store). The query workflow receives a user question, retrieves relevant chunks from the vector store, and passes them to an LLM with the question for context-aware answering.
This template is the foundation for knowledge base chatbots, documentation search systems, and internal research tools. The most important tuning parameters are chunk size (which affects retrieval granularity), the number of retrieved chunks (which affects context quality vs token usage), and the embedding model (which determines semantic matching quality).
Content Generation Pipeline
Content generation templates automate the creation of blog posts, product descriptions, social media content, and email newsletters. A typical pattern uses a Spreadsheet Trigger or Schedule Trigger to initiate generation, passes topic information to an LLM with a detailed prompt template, and outputs the generated content to Google Docs, a CMS via API, or a review queue in Slack.
More sophisticated versions chain multiple LLM calls: one for research and outline generation, another for first draft writing, and a third for editing and tone adjustment. Each stage can use a different model or temperature setting. The research stage might use a model with web search tool access, the writing stage uses a creative temperature setting, and the editing stage uses a lower temperature for consistency.
Data Enrichment Agent
The data enrichment template monitors a data source (CRM webhook, spreadsheet update, or scheduled database query) for new records, then uses an AI agent to research and enhance each record. For lead enrichment, the agent might search the web for company information, extract key details (industry, size, recent news), score the lead based on your criteria, and update the CRM record with the enriched data.
This pattern works well for any scenario where you need to augment structured data with unstructured intelligence: market research, competitive analysis, candidate screening, or supplier evaluation. The agent approach is particularly effective here because the research process is inherently variable, requiring different tools and strategies depending on what information is available for each record.
Document Classification
Classification templates use an LLM with a structured output parser to categorize incoming documents, emails, or support tickets. The workflow receives a document, passes it to an LLM with a prompt that defines the categories and classification criteria, and uses an Output Parser node to extract the category as structured data. The result feeds into a Switch node that routes the document to the appropriate downstream workflow based on its classification.
This pattern replaces manual triage processes. A support team might use it to classify tickets by urgency, department, and issue type, automatically routing each ticket to the right queue. The classification accuracy depends heavily on the prompt design and the number of categories. For best results, keep the number of categories under 10 and provide clear descriptions with examples for each category.
Building Custom Recipes
The best approach to building custom AI workflows in n8n is to start with the closest template and modify it. Add tools to agents, swap vector stores, change LLM providers, or add processing stages before or after the AI components. The node-based architecture makes it straightforward to extend workflows incrementally without starting from scratch.
When building from scratch, start simple. A Chat Trigger connected to an AI Agent with one tool is the minimal viable AI workflow. Get that working, then add memory for multi-turn conversations, a vector store for RAG, additional tools for specific actions, and error handling for production reliability. This incremental approach helps you understand each component before adding complexity.