Learn AI automation with n8n. This course by Rahul Joshi will take you from the basics of n8n to building real AI-powered workflows like agents, integrations, and self-hosting. The course is designed for developers and no-code specialists who want to gain production-ready skills. Imagine your entire business could run on autopilot. Lead generation, content creation, customer support— everything is automated. This is exactly what tools like n8n make possible. But here's the thing: n8n is not just another automation tool like Zapier . It's much more. Hello everyone, this is Rahul, co-founder and CEO of Tech Dome, and a leading content creator about n8n. I have helped transform over 1,200 companies with automation frameworks and intelligent workflows. In this video, I will show you the complete path: what n8n is, how it works, and how to create real automation systems from scratch. Most people consider n8n to be just another automation tool, but this is a misconception. n8n is an automation infrastructure and orchestration engine , a backend for intelligent workflows. Zapier is just a small part of what n8n can actually do. With n8n, you can automate entire business systems: lead generation funnels, AI-powered research processes, customer support, data processing, and internal operations. It's not just automation , it's building an automation architecture. By the end of the video, you will understand the principles of workflow design , API orchestration, AI agents in n8n, vector databases, event- driven systems, deployment, and self- hosting. Let me show you what n8n looks like outside of the workflow builder . This is the n8n authors page, where you will find ready-made templates for a quick start. If you are just starting out, you can download n8n from GitHub, run it locally, and test your processes. There is also a paid version: if you expect about 2000–2500 process executions, you can start with the Startup plan. However, the true power of n8n is revealed when self-hosting. You can deploy it on your own infrastructure, whether it's your company's internal systems or your cloud environment. You can use platforms like AWS, Azure, or any other cloud solution. In this video, we'll set up self- hosting through CBO Cloud, and I'll walk you through the entire process from start to finish. Now let's see how n8n actually looks and works. So, once the setup is complete, here's what your n8n environment looks like. You have your own personal workspace, and if you work in a team, you can manage multiple users. You also get access control, integration with GitHub, and full visibility into your workflows. This is your canvas where all the automation happens. You can create workflows, connect nodes, and design systems visually. You can also track execution, see successful and failed processes, and analyze performance over time. Every workflow in N8N starts with a trigger. This is what initiates automation. You can trigger workflows in many ways: manually, by application events, on a schedule, via webhooks, or even via chat. For example, when a user submits a form, it can automatically trigger an entire workflow. Once the workflow is started, the real power comes. You can connect APIs, transform data, and build complex logic. You can create loops, run parallel processes, and even implement approval systems. For example, you can create a content creation system where it is generated, images and videos are created, the system waits for approval, and then publishes everything automatically. This is not just automation , it is system design. N8N also allows you to integrate AI directly into your workflows. You can connect tools like OpenAI, Gemini, or any other LLM. This allows you to create AI agents, automate decision-making, and build intelligent systems that think and act based on data . One of the biggest advantages of n8n is its flexibility. You can run it locally, on your own server, or deploy it to any cloud infrastructure. This gives you full control over data, workflows, and system architecture. n8n also provides full visibility into your automation. You can monitor process execution, success and failure rates, and performance over time. This helps you reliably optimize and scale your systems. So, n8n is not just an automation tool. This is a holistic system for building scalable and intelligent business processes. If you are serious about automation, AI, and system building, you should master it. In the next video, we will build a real workflow step by step. Subscribe to learn more about automation, AI systems, and real-world workflows. And if you want access to ready-made templates, leave a comment below. Have you ever wondered how a simple form submission could automatically activate AI, make decisions, and send a personalized email without human intervention? Hello, I'm Rahul Joshi. This workflow demonstrates the basic architecture of n8n . The data comes in via a webhook, is cleaned, undergoes logic checks, enters the AI, and ultimately sends a personalized email. Let's look at each node separately. Step one, webhook trigger . This is where it all begins. The webhook is configured for the POST method, listening on the architecture-demo path. The moment an external source, form, app, or API request sends data to this URL, the workflow is triggered. We pinned the test data to this node—a JSON object with three fields. This is what we use for testing without the need for a real external call. Click “Test Workflow” and this data will automatically flow forward. Step two: configure field processing. This is a Set node. It takes incoming JSON and structures it into clear fields. It extracts name, email, and company name directly from the input data using N8N expressions. It also adds a hardcoded field that is not in the input data, but which is added to each record here. Open this node and you'll see the input JSON on the left and the raw output on the right, side by side . Step three: company or branch verification logic. This is the decision-making point. The If node checks a single condition. Is n't the company field empty? If so, the branch is "true". Execution continues further to the AI node. If not, the branch is "false". Nothing further happens on this path. In our test data, the company is Acme, so this will always be “true”. But in a real-world scenario, you might want to direct the “false” branch to a different email template, a Slack notification, or a CRM update for incomplete leads. Step four: OpenAI node for creating a letter. This is where AI comes into play. The node addresses the GPT-4o Mini with a dynamic prompt. Create a polite follow-up message for person $json.name. The name is taken in real time from the output of the previous node. Therefore, each execution receives a personalized prompt. The main thing to show here is the prompt field. Notice how the N8N expression inserts the actual data directly into the AI call. The response is returned as message.content inside JSON , which is picked up by the next node. Step five: Gmail's outgoing node for sending the email. The last step. The Gmail node sends an AI-generated email. The body of the letter is taken directly from the output of the OpenAI node. Open the execution log after running and you'll see the full JSON trace from the webhook to what Gmail actually sent. That's the whole cycle. Webhook received, data cleaned, logic tested, AI processed, personalized email sent. This architecture is the basis of most of the automated pipelines you will build in N8N. If this was helpful, please subscribe. I'm dissecting more examples of N8N work every week. Write in the comments if you want me to break down a specific workflow next time. See you in the next video. Imagine a CRM sales chatbot that actually thinks, remembers conversations, pulls data from Google Sheets in real time, and never makes anything up. Hello everyone, I'm Rahul Joshi, and in this video I'll show you how to build a powerful AI chatbot for CRM using n8n, Google Sheets, and Memory. A system that can answer real sales questions in real time. Step one: trigger a chat when a message is received. This node starts a workflow when a user sends a message in the n8n chat interface. It captures the user's request along with the session ID, ensuring real-time interaction. Step two: LLM model from OpenAI. This node provides the basis for intellectual communication. It is responsible for logic, understanding intent, and generating responses for the chatbot. Step Three: AI Router for LangChain Sales CRM. Agent. This is the brain of the workflow. It understands the user's question and decides whether to refer to Google Sheets for lead or deal data. He never guesses and always looks for data first. Step four: Google Sheets tool for working with mailings. This node allows AI to search for data in the mailing automation table. It is used to check lead status, mailing progress, and offer links upon user request. Step five: Google Sheets tool for working with deals. This node allows AI to retrieve details about opportunities and deals from CRM. It is used for questions about companies or sales funnels coming from chat. Step six: conversation memory buffer. Memory window. This node stores the last few steps of the conversation. This allows for multi-pass dialogues so that the bot remembers the context throughout a single session. Step seven: check the AI output via an "if" node. This node checks whether the AI generated a correct response. If the result exists, the workflow continues. If not, the interaction is recorded for debugging. Step eight: record error chat messages in Google Sheets. Google Sheets, this node captures failed or incorrect AI responses. This helps identify issues with tool calls or data without stopping the chatbot. Step nine: record the chat memory in Google Sheets. This node logs every step of the conversation. It stores the timestamp, session ID, user message, and AI response for analysis. Step 10: Chat reply node. This node sends the final AI-generated response back to the user. It completes the chat cycle with an instant response. If you found this workflow useful, please like it , subscribe for new AI automation tutorials, and see you in the next video. Congratulations again. I am Rahul Joshi. In this video, we'll take a detailed look at the HTTP Request node—the most powerful node in N8N. Whether you want to connect to a CRM, a payment platform, an AI tool, or any SaaS product with an API, this node is your gateway. At the end, you will have a workflow that collects company data from the web and stores it directly in Google Sheets. Let's go. Step One: What is an HTTP Request Node? The HTTP request node allows you to interact with any REST API. GET to retrieve, POST to send, PUT to update, DELETE to delete. Authentication: API key in the header or request parameter, Bearer token in the authorization header, OAuth2 for Google or Salesforce, basic authentication for APIs with login and password. For Serp API we use a query parameter. The API_key is added directly to the URL via N8N credentials. Never manually enter keys in the workspace . The URL is serpapi.com/search. Query parameters: engine is Google, Q is our search query, num is 10. API_key is pulled from the saved credentials. Click " execute" and the raw JSON will appear in the output panel. Most APIs use pagination. The Serp API returns next_page_token if there is more data. Check for the token, go back, make another request, repeat until it disappears. Step two: data transformation. APIs return "dirty" data. The Serp API gives us a huge JSON object with organic results, ads, and knowledge panels. We only need clean data. Here's what this code node does . We take the organic_results array and iterate through it, extracting the company name from the title, the website from displayed_link, the description from snippet, and the original URL from link. We also add a scraped_at tag with a timestamp to each entry. The result is a clean, flat array, exactly what Google Sheets expects. Step three: save to Google Sheets. The last one is Google Sheets. Node is configured in append mode, so it appends new rows every time it runs, without overwriting anything . Our column bindings connect each field from a code node directly to the desired column. Click "execute" and watch the table populate in real time. And this node is easy to replace. Airtable, Notion, CRM webhook, email—whatever tools you use, just connect them here instead. That's all about the HTTP Request node: from API call to clean structured data in Google Sheets in less than 5 minutes. Grab the workflow JSON from the link in the description, import it into your N8N, insert your Serp API key , and you're done. If it was helpful, I will teach one free workflow every week in my community. JSON file is attached, setup instructions are attached, completely free. Over 130 people are already using it. Link in the description, join us. This is where automation becomes intelligent. Hello, I am Rahul Joshi. Today I want to show how AI systems in N8N actually work using a real-life example. AI that reads a shipping bill and independently decides whether it is ready for processing or requires human intervention. Any AI workflow, no matter how complex it may seem, breaks down into four steps. Input, AI analysis, decision, action. Once you see this pattern, you'll recognize it in almost every AI automation, including this one. Step one: input data. The input data here is the bill of lading, i.e. the transport document. In a real system, this text would come after recognition (OCR) or document upload. Here, I pinned a sample document directly to the webhook node so that the workflow would instantly launch for demonstration. Step two: design prompts. Here's the part that separates a working AI system from a broken one— prompt design. If you just say, " Read this document," you 'll get a whole paragraph, and paragraphs aren't automated. Instead, we tell the model exactly which fields to remove. Bill of lading number, sender, recipient, vessel, ports, and we forcefully convert the response to JSON format. Step three: structured AI output. This produces a structured result, a clean object with each field found by the AI, instead of a block of text that a human has to reread. This code node takes a structured response and converts it into a set of predictable fields that the rest of the workflow can use. Step four: decision. Now the workflow makes the decision. It checks whether the required fields have been filled in : bill of lading number, sender, recipient. If at least one of them is missing, there is a risk of non-compliance , and the document requires human attention. If everything is in place, it simply registers and moves on. Step five: action. When something is missing, the workflow doesn't just silently pause, it immediately sends an email indicating which document and which field needs attention. This is the result: the AI solution actually triggers action in the real world, instead of sitting in a magazine that no one reads. So, to summarize: input, AI analysis, decision, action. This is the basis of every AI system in N8N. We used a bill of lading because compliance is a great example of where AI should make decisions, but this same pattern works for invoices, support tickets, contracts— anything with structured information hidden in unstructured text. If you want to continue creating such AI systems, join our free community, link below. I share free n8n automations, step-by-step instructions, and JSON files for each workflow in my videos, including this one. So if you want to just import it and start customizing it yourself, it's already waiting for you there. Agents are the next step after the usual AI workflow . Instead of just analyzing something and stopping, the agent can decide what to do, choose a tool, and get a real answer on their own . Hello, I am Rahul Joshi. Today I'll show you a simple example: an agent that searches for information on the web and sends you the results by email. LLM vs. agent. First, a brief distinction. LLM is just a text generator. You give him words, he gives you words back. An agent is a decision-making system. He can choose tools and get real data, instead of just responding with paragraphs of text. In this workflow, the agent is this node to which the LLM is connected, not the other way around. Agent architecture. The scheme is always the same. User request, agent, selected tool, action execution, result return. Here the request comes through a chat trigger. The agent decides to perform a network search, and once it finishes, the result is sent to an email. Step one: trigger. We start with a chat trigger. This is a request step from the user. Here's an example message : Find prospects who will close deals worth more than $50,000 this quarter. So, you can click "execute" and watch the process without typing anything. Step two: agent plus LLM. This is what an agent is. He needs a language model to actually think. This is the OpenAI chat model, connected below. A system message tells him exactly what his job is. Search for relevant information and summarize it clearly, as this summary will be automatically sent via email. Step three: tool. Google search via SERP API. The only tool this agent has is Google search via the Serp API. When he decides he needs relevant information, he goes to it, gets the actual search results, and weaves them into his response. One tool, one clear job. This is often better than giving an agent five tools that they hardly use. Step four: after the agent—sending the letter. And now the important difference. This email sending node is not a tool that invokes an agent. It's just the next step in the workflow. When the agent completes its work and issues a final response, it goes directly to this node and is sent via email. The agent does not make the decision to send the letter. The workflow does this automatically every time. Let's launch it. The chat trigger is triggered by our PIN request. The agent reads it, decides to search, gets the results via the Serp API, composes a summary, and it goes straight into the email. So: user request, agent, one tool, result, and then a simple automation step to send the email. This last part is worth remembering. Not everything that comes after an agent has to be another tool. Sometimes it's just the next node in the chain. If you want to continue building such AI systems, join the free School community. Link below. I share free n8n automations, step-by-step instructions, and JSON files for every workflow I make videos about, including this one. See you in the next video. Hello, I am Rahul Joshi. In this video, I will show you how to use Google Sheets as a simple database for an AI agent in n8n. This is useful when you don't need a full vector database, but you want your AI agent to respond based on real company data: return policies, shipping, cancellation policies, FAQs, or internal knowledge. At the end of this workflow, you will have a Telegram chatbot that receives a user's question, searches for the required row in Google Sheets, sends this information to the OpenAI model, and responds with an accurate answer. Step one: Telegram trigger. The workflow starts with the Telegram trigger node. This node waits for incoming messages in Telegram. When a user submits a question like " What is our return policy?", the workflow captures the message text and passes it to an AI agent . So, Telegram becomes a chat interface for the user. Step two: AI agent. Next, the message reaches the AI agent node. This is the brain of the workflow. The agent receives the user's question from Telegram and decides how to answer it. Instead of guessing the model from memory, the agent is instructed to use a connected Google Sheets tool when a user asks about company policies, returns, shipping, cancellations, warranties, or company information. This is what allows Google Sheets to work as a lightweight knowledge base. Step three: OpenAI chat model. The OpenAI chat model is connected to the AI agent as a language model. This model helps the agent understand the user's question, decide when to use a table, read the data received, and formulate a clear response in natural language. In this workflow, the model is used to reason and generate answers , while the actual company knowledge is stored in Google Sheets. Step four, table with knowledge base. The knowledge base table node is connected to the AI agent as a tool. This node searches Google Sheets and returns relevant rows based on the user's query. For example, if a user asks about a refund policy, the tool looks up the corresponding row in the table and returns fields such as question, answer, and category. This is the key idea of the workflow. The table acts as a database, and the AI agent only uses it when necessary. Step five, sending a response to Telegram. After the AI agent creates the final response, the workflow sends it back through the response sending node to Telegram. The user receives a clear answer directly in Telegram based on the corresponding row from Google Sheets. For example, if there is a refund policy in the table , the bot can respond with accurate data on refund terms, processing time, and payment method details. That's the entire workflow using Google Sheets as a database in n8n. It takes a user's question from Telegram, sends it to an AI agent, uses OpenAI for reasoning, searches Google Sheets as a knowledge base, and responds to the user with accurate information. It is a simple, vector-free alternative to RAG for small to medium knowledge bases, FAQs, policy bots, internal support agents, MVPs, demos, and client projects . You don't need Pinecone , Supabase, V8, or embeddings for every use case. Sometimes just a neat Google Sheet is enough. If you want to continue creating such AI systems, join the free school community. Link below. I share free n8n automations, step-by-step setup instructions, and up-to-date JSON files for every workflow I make videos about, including this one. See you in the next video. Hello, I am Rahul Joshi. In this video, I'll show you how AI memory systems work in n8n. Memory is what distinguishes a true AI assistant from a chatbot that forgets you as soon as you close the chat. Today I'll break down the two types of AI memory: short-term and long-term, and create a persistent AI assistant that actually remembers your past conversations even after restarting n8n. There are two types of memory that you need to know about. Short-term memory is the memory of your conversation. It stores context only for the current session. In n8n, it's this node, a simple "memory buffer window". Great for follow-up questions, but once the session ends, it all disappears. Long-term memory works differently . It is permanent. It's stored in a real database, so the AI can remember things that happened days, weeks, or even months ago, despite restarts and different sessions. To create long-term memory, we store every step of the conversation in a database. I use Google Sheets to keep everything simple and visual . The schema contains only four columns: user ID, message, response, and timestamp. You can see it right here in the node. Every time a user sends a message and the AI responds, we record that step on a new line. Over time, this becomes the AI's memory bank. Here is the complete workflow. The Telegram trigger receives a user message. Even before launching the AI agent, we retrieve the conversation history. This retrieves every previous row from the table that matches that user ID. You can see the resulting lines right here in the output. The code node formats this into a clean text block that is inserted directly into the agent's system message. So, the model literally reads the user's story before responding. The agent also uses OpenAI's chat model as a brain, plus a simple memory for short-term session context. After the response, we record this new step in the table and then send the response to Telegram. That's the whole cycle. Get the story, reply, save the story. Let's protest. I already have a saved previous conversation for my test user. I asked to order a red T-shirt in size M, and the AI confirmed it. Now in a new session, I'll ask something that only makes sense if the AI remembers it. It pulls up my story, finds the order for the red t- shirt, and responds correctly, even though it's a completely new chat session. This is how long-term memory works. This pattern is very important for support bots, personal assistants, or any case where users come back after days, expecting the AI to remember them. And because behind the scenes it's just a spreadsheet, you can view, edit, or even manually correct the AI's memory at any time. Get the full workflow JSON from the link below. And if you want to delve deeper into creating such AI agents, join the AI Automation Club, link in the description. See you in the next video. Most people create one AI agent and stop there. But the real automation systems that companies run on don't use a single agent. They use a team of agents. Hello, I am Rahul Joshi. Today I will show you how to create a multi-agent content system in N8N. Four AI agents, each with a single task, work together to automatically turn a topic into a finished article. That's the problem with one AI agent doing everything. The prompt becomes too complex, the model gets confused about what to do, and the quality drops. The solution is simple — divide the work. Think of it as a small team. One searches for information, another plans, a third writes, a fourth publishes. Each is only good at one thing, but together they create something that no one could do alone. This is exactly what we are building. Here is our workflow. Research agent, analyst agent, writer agent, and publisher agent. The result of one person's work becomes input for another. The research agent is only engaged in searching. He is forbidden to write anything. The analyst agent only converts this data into a structured plan. The writing agent writes the article based on this plan. And the publishing agent designs the final material: SEO title, meta description, tags and marks it as ready. Let's build it. Let's start with the webhook trigger. It starts the entire system as soon as a topic arrives. I'm pinning the test data to instantly run the entire workflow without waiting for the actual webhook call. Next up is the research agent. Pay attention to the system prompt. I tell him clearly, "Your only task is research. Provide structured notes. Don't write the actual article." The analytics agent then takes these notes and converts them into a JSON plan with a header, hook, and subheaders. I require structured JSON so that the next agent gets clear data. A writing agent takes this plan and writes an article in Markdown: an introduction, chapters, and a conclusion with a call to action. Finally, a publishing agent. It packs everything: SEO title, meta description, tags and sets the status to " published". I added a little code to parse the package to reliably process JSON even if the model adds Markdown tags. We launch in real time. I click "execute" and watch. First, the research agent starts. Now the analyst creates the structure of the plan. The writer prepares the complete text, and lo and behold—the publisher has packaged it and marked it as published. One topic at the input, one finished article at the output, completely automatically. This is a true multi-agent system, not just a name: a real pipeline, where each agent performs a specialized role. If you would like to get the ready-to- import JSON for this workflow, write “agents” in the comments and I will send it to you. And if you regularly create such automations, join our community in School , the link is in the description. See you in the next video. Hello, I am Rahul Joshi. In this video, I will show you how to create an AI agent for qualifying leads in n8n. Most people who create automations start with cron jobs. Check every 15 minutes to see if anything has changed. Poll the API every hour . And it works, as long as you don't run it 96 times a day, just to catch that one moment when something actually happened. Industrial systems don't poll, they react. Something happens: the form is submitted, the payment is made, the row is updated—and the automation is triggered instantly, not during the next scheduled check. This is the basic idea behind event-driven systems, and that is what we build on in this chapter. An event source is anything that can tell your automation that something just happened. There are three types that you will use all the time. The first is webhooks, the most versatile source of events. Any tool that can send an HTTP request—and that's pretty much any modern tool—can " ping" your workflow within a second of the event. Web forms, payment systems, chat platforms: if there is a webhook option, you will never need to poll them. The second is application triggers. These are ready-made versions of webhooks, adapted for specific applications. Instead of configuring a "raw" webhook URL, the application node itself " listens" to events for you. New response in Typeform , new booking in Calendly, new charge in Stripe. Same idea, but fewer settings. Third—update the database. When the event is not a form submission, but a row change, status change, or new record addition, you track this at the database level. Airtable, Postgres, Google Sheets— they all have trigger nodes that track changes at the row level and fire instantly . Here's what I want you to remember. All three of these options are interchangeable at the beginning of your pipeline. Whatever triggers the event, everything that happens next —processing, logic, notifications— remains the same. You don't need to rebuild automation for each new event source. You simply connect another trigger to the same pipeline. Let's solidify this with the example of the assembly line we are building today. Web form— webhook—AI analysis—CRM— Slack notifications. Walk this path with me. Someone fills out a form on your website. This dispatch triggers a webhook—the event source. AI analyzes messages, scores leads, determines intent and urgency, and then records everything in your CRM. And only if the ice is " hot" does your team receive a notification. No table checks, no updates every 10 minutes. One form fill-out starts the entire process in a matter of seconds. Note the filtering at the end. Not every event requires notification. Every lead is recorded, only the “ hot” ones require human attention. This distinction separates truly useful automation from that which simply creates noise. Let's create this live. I already have JSON ready for import. You will have it too . So let's break down what exactly is happening, step by step. Webhook is our event source, a form for leads on the site. It expects data on the POST endpoint. Copy this working URL, this is where you will point your site's form. As soon as the data arrives here, the workflow " wakes up". For this demonstration, I pinned two examples to this node: "hot" and " cold" leads, so you can see both results without waiting for the actual form. Artificial intelligence analyzes the lead, receives the name, email, company, message, and gives a score: a score from 1 to 10, intent, urgency, and a short summary that the sales manager can read in 2 seconds. This "raw" AI output is processed by code that pulls up the original form fields and collapses everything into a single object: time, name, email, company, message, rating, intent, urgency, and summary. I will now run a test run and show you the actual result live. CRM Record: Every lead, hot or not, goes into Google Sheets through the add record node. This is our accounting system. Nothing gets lost, even those leads that lead nowhere. The filter checks: is the lead score 7 or higher? If so, a Slack notification is sent to the n8n automation channel with the lead's name, company, and resume from the AI. If not, nothing happens. No Slack messages, no distractions. It is already safely stored in the CRM table, waiting for its next owner. It is worth noting: in the Slack node, the data (name, company, summary, urgency) is not taken from the table output, but directly from the analysis node by code. This is a handy template when the output of the next node does not contain all the required fields. You are not limited to what the last node produced. You can always return to the previous node by its name. This is event-based automation. A single source of events, a clear pipeline, and a filter at the end so that only what is truly important reaches the person. If you want to continue creating such AI systems, join the free community, link below. I share free n8n automations, step-by-step instructions, and JSON files for each workflow from my videos, including this one. See you in the next video. Hello, I am Rahul Joshi. Until now, we have created fully automatic AI processes without human involvement. But the truth is, not everything has to run on autopilot. Some things need a live person to say, "Yes, send it ." before it is sent. This is called a "man in a loop," and today I'll show you how to build such a system in N8N. Here is the gist in one sentence . The AI does the work, the person gives consent, then the action takes place. Why is this important? Because AI can write something a little inaccurate, off-brand, or just plain weird, and if it gets to a real customer, there will be a problem. So instead of sending automatically, we pause the workflow and ask a person first. Here is our example. AI writes a sales letter for a new lead. Instead of sending it right away, we send a draft to Slack with two buttons: “approve” and “reject.” The workflow literally stops and waits. Nothing happens until a person presses one of these buttons. If she clicks " approve," the email is sent for real. If you " reject", nothing is sent. Let's create this step by step. First, the webhook trigger. It triggers a workflow when new ice appears . I've pinned some sample lead data here so we can test this instantly without waiting for a real request. Next—the author of the sales letter. It's simply an AI agent with one task: to look at the lead's name and context and write a short, friendly letter. Nothing complicated, just a good draft. Now the most important part—the Slack node. I set it to send with a response pending, meaning it posts a draft to Slack with approve and reject buttons, and the process stops at that point. It won't move forward until someone makes a choice. After that, the "if" node checks: was it approved? If so, we are on the same path. If not, to others. Nothing happens on the way to the deviation . I just added a simple "no operation" node so that the workflow would complete correctly. On the approval path, the Gmail node sends an email to the lead. Now let's look at the workflow in action. The AI first creates a draft of the sales letter and then sends it to Slack for approval. When the reviewer clicks “approve, ” the workflow continues and sends the email as it really is . If the reviewer clicks "reject" , the workflow stops and nothing is sent. A person in the decision-making process. A simple but effective approach whenever AI is doing something where a mistake could cost you dearly. If you need this workflow, write "approve" in the comments and I will send you the JSON. And if you create similar automations, join our School community. Link below. See you in the next video. Hello, I am Rahul Joshi. In the previous video, we created a permanent AI assistant in n8n. He used Telegram, Google Sheets, an AI agent, and memory to preserve previous conversations even after restarting the workflow. But there is one problem. If the call to Google Sheets fails, or the AI agent throws a timeout error, or the conversation log is not saved, the workflow may end silently for the user. The user sends a message but does not receive a response. So in this video, we'll fix that by adding proper error handling to the same workflow. We will add retries, fallback responses for the user, and a separate notification in Telegram for the workflow owner. Before we add error handling, here's how the original workflow works. The message comes from Telegram. We then load the user's previous conversation history from Google Sheets. After that, we format the story and send it to the AI agent. The AI agent uses previous history along with memory to generate a response. Then we record the new part of the conversation back into Google Sheets. Finally, the response is sent to the user in Telegram. Importantly, three parts of this workflow depend on external services: Google Sheets, the AI agent, and Google Sheets again, and any one of them can fail. Step one: Telegram trigger. We start with the Telegram trigger. This node monitors new messages in Telegram. Every time a user sends a message, this workflow is triggered. Step two: get conversation history. Next, click "get conversation history." This node reads the user's previous chat history from Google Sheets. Since it depends on an external service, this is one place where a failure can occur. Step three: formatting the story . Next, click " format history ". This prepares preliminary messages in the correct format for the AI agent. We do not change this node because it is an internal formatting step. Step four: AI agent. Now click "AI Agent". This node generates the chatbot response. Since AI calls can end with an error or timeout, we need error handling here as well . Step five, OpenAI chat model. Under the AI agent, we have the OpenAI chat model. This is a model provider connected to an AI agent. We don't change it directly in this video. Step six, simple memory. Next is simple memory. This gives the AI agent short-term memory during a conversation. This node also remains unchanged. Step seven, block the conversation. Now click " block conversation progress". This saves the user's last message and the AI's response back to Google Sheets. Since this is another call to an external service, it also needs error handling. Step eight, sending a response to Telegram. The next step is to send a response to Telegram. This is the usual path to successful execution. If everything works, the AI response is returned to the user here. Step nine, notify the user about the error. Now add "notify user of error". Connect the error paths from retrieving the conversation history, the AI agent, and blocking the conversation flow to this node. If something fails, it sends the user a simple backup message in Telegram. That's the difference between a demo workflow and a production-ready workflow. The chatbot still uses the same Telegram trigger, Google Sheets history, AI agent, memory, and response flow. But now it handles errors correctly. If the external service fails, the workflow first retries. If this still fails, the user receives a fallback message. And if the workflow itself breaks, the owner receives a notification in Telegram with details of the error. So, instead of hidden failures, you get transparency, reliability, and a much better user experience. Write "errors" in the comments and I will send you this updated workflow. And if you're building automations that need to work in the real world, join our community. Link below. See you in the next video. Hello, I am Rahul Joshi. In this video, I will show you how to automatically monitor n8n workflows before they fail. Quick question: if one of your automations started to fail right now, would you know about it? Not later, when a client writes to you asking why he didn't receive the email or why the bot went silent. Right now, today , for most people working with n8n, the honest answer is no. And that's totally normal , because when you're just starting to learn automation, you're focused on making the workflow just work. No one teaches you what happens after that . But here's the thing: creating a workflow is actually the easy part. Keeping it running after launch is a completely different skill. And it's the same skill that separates someone who creates automations as a hobby from someone who can actually use them for real clients or their own business without constant supervision. So today I want to talk about something that many manuals completely skip over: monitoring and observability. This sounds like a complex technical DevOps term, but in reality what we will build today is quite simple. No fancy tools or expensive software. Just three things you track with tools that you probably already have in your n8n setup: Google Sheets and Telegram. By the end of this video, you'll have a working system that alerts you as soon as something goes wrong, instead of you finding out too late. That's what the approach is. A workflow that runs in production without visibility is a workflow that you manage blindly. You don't need anything fancy, just track three metrics. Execution time: How long each run takes, as a sudden jump usually means something has slowed down or hung. Error rate: what percentage of launches end in error, because one failure is normal, but an upward trend is not. And AI token usage: how many tokens each AI call burns, because it directly affects your score. To track this, you need three tools working together. Logs are a record of what happened and when; notification—a signal when something crosses a critical threshold; and a metrics dashboard—a place to see trends, not just single numbers. Today we'll build all three using tools you already have: Google Sheets and Telegram. Let's create the first part—the metrics logger. It starts with a schedule trigger set to run hourly, which triggers a fetch of recent executions, calling n8n's own API to pull your history. I've pinned sample data here so we can test everything instantly . This data goes into a metrics computation node— a small piece of code that performs mathematical calculations. The total number of executions, how many of them failed, the error rate in percentage, and the average execution time in seconds. These numbers are recorded as a new row in Google Sheets. This is our logs and dashboard in one place . Because a table filled with hourly rows already shows you trends over time. Then the “if” node checks: is the error rate 10% or more? If so, a message is immediately sent to Telegram, letting you know exactly what is happening. If all is well, nothing happens. No noise, only silence when everything is fine. Now the second, completely separate part: tracking token usage . Whenever you use an AI agent node, its response actually contains a token usage object . Request tokens, response tokens, total number of tokens. Most people never look at it . Here is an example of the AI response that I pinned so you can see what it looks like. The data goes into the token usage extraction node —a tiny piece of code that extracts these numbers and writes them directly to a separate tab in the table. The point of this block is not to run it separately, but to copy this template into any AI agent node, and then each of your requests to the AI will be tracked by cost. Let's run both. First, the metrics recorder, execute—and that's it. Total number of runs, error rate, average time—it's all recorded. And since one of our test runs failed, look, the notification in Telegram comes immediately. Now the token tracker, run it, and you see that the request, response, and total tokens are neatly recorded and ready to be summed up. That's it , that's the whole system. No expensive monitoring platforms , no complicated settings, just scheduled checking , a spreadsheet as a log and dashboard , and Telegram notifications as an early warning system. It's truly one of those things that takes 20 minutes to set up once and then quietly saves you from disaster in the future. The one when the workflow has been imperceptibly failing for 2 days, and you only find out about it because the client asks where the automation went . If you are serious about automation that will work long-term, not just as a demo but as a reliable tool in production, this level of monitoring is a must. Set it up once for your most important processes and forget about it until it alerts you . Write "monitor" in the comments and I'll send you this workflow along with a spreadsheet template so you can get it up and running today. And if you want more solutions like this that make your automations ready for real work, not just for demos, join the School community, link right below this video. See you in the next video.
Generated algorithmically for Search Engine
Indexing.