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 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 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 Ange Russell
This workflow fetches real-time air quality and pollen data using Ambee’s APIs and sends a friendly, personalized daily summary by email. It uses a scheduler to automate data collection, AI-generated health tips, and clear, actionable messages—perfect for sensitive users (e.g. kids with asthma, allergy sufferers). Use Case: Ideal for individuals with respiratory conditions, allergies, or those who want to stay informed about environmental conditions affecting their health. Set up steps Estimated time: 10–15 minutes You'll need: Ambee API key (free registration) OpenAI API key Email credentials (Gmail) User Profile 💡 Keep in mind: You’ll need to input your location coordinates (we’ve pre-filled Braunschweig as an example). The AI Agent node uses a ready-made prompt that’s tailored for email—but feel free to adapt it to other messaging platforms.
by Sarfaraz Muhammad Sajib
This workflow allows interactive conversation with the content of an XML file using OpenAI and LangChain. It fetches an XML feed from a specified URL, parses the XML, and enables an AI agent to respond to user queries based on the XML's structure and data. What It Does: Triggered via webhook or manual execution. Sets and fetches an external XML feed URL. Parses the XML into a readable format. Connects OpenAI GPT via LangChain for intelligent chat. AI agent answers questions like extracting nodes, attributes, or structure from the XML.
by Strategiflows
Who Is This For? E-commerce managers, data analysts, and n8n beginners who need a hands-off way to pull all Shopify orders—even stores with thousands of orders—into Google Sheets for reporting or BI. What Problem Does It Solve? Shopify’s GraphQL API only returns up to 250 orders per call, forcing you to manually manage cursors and loops. This template handles the “get next 250” logic for you, so you never miss an order. What This Workflow Does Schedule Trigger – Runs at your chosen cadence (daily, hourly, or manual). Set Date Range – Defines startDay and endDay based on $now. GraphQL Loop – Fetches orders 250 at a time, using pageInfo.hasNextPage and endCursor until complete. Code Node – Flattens orders into line-item rows and summarizes by SKU/vendor. Google Sheets – Appends results to your sheet for easy analysis.
by Viktor Klepikovskyi
Base64 Encode Multiple Binary Files with a Code Node This template demonstrates how to handle multiple binary files in n8n by using a Code node to convert them into a Base64 encoded string. It's particularly useful when an API requires file uploads in this format and the standard 'Extract From File' node is not sufficient for batch processing. The workflow starts by downloading a ZIP file, unzipping it to get multiple binary files, and then uses a Code node with custom JavaScript to encode each file individually. Instructions Download and import this template into your n8n instance. Run the workflow once to see how it downloads, unzips, and then encodes multiple files. Modify the 'HTTP Request' node to download your own binary file or a ZIP file containing multiple files. Update the 'Code' node if you need to adjust the output format or file paths. Use the output of the 'Code' node in a subsequent node, such as another 'HTTP Request' to send the Base64-encoded files to your desired API. A link to the full blog post is available here
by Clown Mutiny
What It Does The Chef Agent is your AI-powered kitchen companion—ready to turn leftover ingredients into meal inspiration. It's a simple, fun n8n automation that: Accepts a list of ingredients via webhook Uses Ollama AI to suggest 5 creative recipes or food ideas Recommends up to 3 missing ingredients to improve the dish Returns a fallback message if the AI is unavailable Includes setup notes for beginners Requirements An active n8n instance (local or hosted) Ollama AI running locally (or another LLM via HTTP request) A webhook endpoint (defaults to /lets-cook) Why You’ll Love It Fully customizable for your use case or favorite LLM Great intro to AI + workflow automation Comes with playful Clown Mutiny flair: > “Powered by Clown Mutiny’s taste-bud liberation division.” Installation Import the provided JSON template into your n8n workspace. Configure your AI node to match your local Ollama instance. Trigger the flow by sending a POST request to the webhook: { "ingredients": "eggs, rice, spinach" }
by Wyeth
Let a user load multiple files with a Form node, and process the binary data. A very important workflow for many tools. This is a learning example of several core concepts that are hard to grasp in n8n: $binary data Loop and $runIndex Split Out The Save File deomonstrates how to access the binary data correctly, but could be swapped to POST the files to an AI, for example.
by Yaron Been
Wan Video Wan 2.2 I2v A14b Video Generator Description Image-to-video at 720p and 480p with Wan 2.2 A14B Overview This n8n workflow integrates with the Replicate API to use the wan-video/wan-2.2-i2v-a14b 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): Prompt for video generation image** (string): Input image to generate video from Optional Parameters seed** (integer, default: None): Random seed. Leave blank for random num_frames** (integer, default: 81): Number of video frames. 81 frames give the best results resolution** (string, default: 480p): Resolution of video. 832x480px corresponds to 16:9 aspect ratio, and 480x832px is 9:16 sample_shift** (number, default: 5): Sample shift factor sample_steps** (integer, default: 30): Number of generation steps. Fewer steps means faster generation, at the expensive of output quality. 30 steps is sufficient for most prompts frames_per_second** (integer, default: 16): Frames per second. Note that the pricing of this model is based on the video duration at 16 fps 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: wan-video/wan-2.2-i2v-a14b API Endpoint: https://api.replicate.com/v1/predictions Requirements Replicate API key n8n instance Basic understanding of video generation parameters
by MRJ
Modular Hazard Analysis Workflow : Free Version Business Value Proposition Accelerates ISO 26262 compliance for automotive/industrial systems by automating safety analysis while maintaining rigorous audit standards. :chart_with_upwards_trend: Key Benefits Time Instant report generation vs. weeks of documentation for HAZOP Risk Mitigation Pre-validated templates reduce human error Quick guide Input a systems_description file to the workflow Provide an OPENAI_API_KEY to the chat model. You can also replace the chat model with the model of your interest. :play_or_pause_button: Running the Workflow Refer to the github repo to understand in detail about how the workflow can be used :email: Contact For collaboration proposals or security issues, contact me by Email. :warning: Validation & Limitations AI-Assisted Analysis Considerations | Advantage | Mitigation Strategy | Implementation Example | |-----------|---------------------|------------------------| | Rapid hazard identification | Human validation layer | Manual review nodes in workflow | | Consistent S/E/C scoring | Rule-based validation | ASIL-D → Redundancy check | | Edge case coverage | Cross-reference with historical data | Integration with incident databases |
by Yang
Who is this for? This workflow is ideal for sales teams, marketers, and virtual assistants who manage outbound campaigns and want to improve their cold outreach personalization. It helps automate the research and writing process for each lead, saving time while improving quality. What problem is this workflow solving? Cold outreach often lacks personalization because manually reviewing each lead's website takes time. This workflow eliminates that bottleneck by using AI to auto-generate personalized icebreakers, summaries, and outreach emails based on a lead’s website—without human research. What this workflow does This n8n workflow runs on a schedule and pulls leads from Airtable who don't yet have an "Ice breaker" field filled out. For each lead, it does the following: Trigger: Scheduled daily via the Run Daily to Process New Leads node. Search Airtable: Finds leads in Airtable where the Ice breaker field is empty using the Search Cold Leads Without Icebreaker node. Split in Batches: Iterates through each lead one by one using Loop Through Each Lead. Rate Limiting: Waits briefly before each request using Wait Before Making Request to avoid rate limits. Scrape Website: Sends each lead’s website to Dumpling AI's /scrape endpoint via the Scrape Lead Website with Dumpling AI HTTP request. Generate AI Copy: Sends the scraped content to GPT-4o using the Generate Icebreaker, Summary & Email (GPT-4o) node. It asks the LLM to create: A short personalized icebreaker A 2–3 line website summary A short email body for cold outreach Save Results: Updates the original Airtable record with the generated content using the Save AI Output Back to Airtable node. Sticky Note: Provides an overview of the workflow and usage instructions for future editors or collaborators. This loop continues for all leads found, updating Airtable with fresh AI-generated outreach content. Integration Requirements Airtable (Personal Access Token) Dumpling AI API Key (Header Auth) OpenAI (GPT-4o)