Master n8n in 2 Hours: Complete Beginner’s Guide for 2025
By Jono Catliff
TechnologyAIBusiness
Share:
Key Concepts
- n8n: An automation platform that connects different applications to automate tasks.
- Workflows: Automated sequences of actions triggered by specific events.
- Nodes: Individual steps within a workflow, including triggers and actions.
- Triggers: The starting point of a workflow, initiating the automation.
- Actions: Tasks performed within a workflow after the trigger.
- Webhooks: A way to receive real-time data from external applications into n8n.
- HTTP Requests: A way to send data from n8n to external applications.
- AI Agents: Automated systems powered by AI models to perform tasks.
- RAG (Retrieval-Augmented Generation): An AI architecture that combines information retrieval with text generation.
- Vector Store: A database that stores data as numerical vectors for efficient similarity search.
- Embedding Model: An AI model that converts text into numerical vectors.
- Data Types: The format of data used in n8n, including text, numbers, booleans, dates, binary, arrays, and collections.
- Iterators: Nodes that process each item in an array individually.
- Aggregators: Nodes that combine multiple items into a single array.
- Expressions: Custom variables that change every time.
1. Introduction to n8n
- n8n is an automation platform designed to eliminate mundane tasks.
- Examples of automation include:
- AI agents for task management and data extraction.
- Web scraping for lead generation.
- Document generation with variable data.
- Real-time analytics for marketing, sales, and fulfillment.
- n8n is presented as a more economical alternative to platforms like Zapier and Make.com due to its pricing model based on workflow executions rather than individual modules.
- Users can self-host n8n for free or opt for paid plans.
2. Building Automation Scenarios
- The video focuses on building five practical automation scenarios.
- Scenario 1: Lead Generation for Service-Based Businesses
- When a lead inquires on a website, the system automatically:
- Adds the lead to a Google Sheet.
- Sends an email to the lead.
- Notifies the team to call the lead within 60 seconds.
- Calling within 60 seconds can increase conversion rates by 391%.
- When a lead inquires on a website, the system automatically:
- Scenario 2: Personal AI Assistant
- An AI agent provides daily reminders, calendar updates, and task management.
- Scenario 3: Sub-Agent for Lead Follow-Up
- A sub-agent sends daily reports of leads that haven't been called.
- Scenario 4: Webhooks and HTTP Requests
- Explores advanced functionality for receiving and sending data.
- Webhooks are used to receive data into n8n.
- HTTP requests are used to send data outside of n8n.
- Scenario 5: Advanced AI Agent with RAG System
- Builds an AI agent with a custom database.
3. Setting Up n8n
- Sign up for a free trial at nn.io.
- The user interface (UI) includes:
- Editor mode for creating workflows.
- Executions mode for viewing workflow history and debugging errors.
- Workflow toggle to turn automations on and off.
- Options to share, save, duplicate, download, import, and delete workflows.
- Workflows are organized into projects.
4. Creating a New Lead Workflow
- Trigger: Form submission using n8n's built-in form feature.
- Create a form with fields like first name, last name, email, budget, and message.
- The form trigger captures data when a user submits the form.
- Data can be viewed in table, JSON, or schema format.
- Action: Appending data to a Google Sheet.
- Connect n8n to Google Sheets using credentials.
- Select the target spreadsheet and sheet.
- Map form fields to corresponding columns in the Google Sheet.
- Use the "Match Column" feature to update existing rows based on email.
- Functions:
- Use expressions to add dynamic data, such as the submission date.
- Implement conditional logic using the
if
function to automatically reject leads based on budget. - Example:
{{ $json.budget == '1000+' ? false : true }}
- Data Transformations:
- Use the "Filter" node to remove leads based on specific criteria.
- Use the "Switch" node to route leads down different paths based on budget.
- Email Notifications:
- Send personalized emails to leads based on their budget.
- Notify the team of new leads via email.
5. Building an AI Agent
- Trigger: On chat message.
- Action: Advanced AI agent.
- Set up a chat model using OpenAI (requires a minimum balance of $5).
- Configure memory using window buffer memory to remember past messages.
- Add tools to enable the AI agent to perform tasks.
- Tool: Google Calendar Integration
- Use the "Create Event" action to automatically create calendar events based on user input.
- Use expressions to extract start time, end time, and summary from user messages.
- Example:
{{ $ai.start_time }}
- Tool: Google Sheets Integration
- Use the "Append Row" action to add tasks to a Google Sheet.
- Use expressions to extract task name, description, due date, and priority from user messages.
- Use the "Get Many Rows" action to search for tasks based on due date.
- Use the "Update Row" action to update task details.
- System Prompt:
- Provide the AI agent with instructions and rules to guide its behavior.
- Example: "All dates must be structured in this format: MM/DD/YYYY."
6. Creating a Sub-Workflow for Lead Reporting
- Trigger: Workflow executed by another workflow.
- Action: Get sheet rows from Google Sheets.
- Filter rows based on date, rejection status, and call status.
- Data Transformation:
- Use an array aggregator to bundle multiple leads into a single array.
- Code Node:
- Use JavaScript code to transform the array of leads into a plain text format.
- Example code:
let text = ""; for (const item of $input.all()) { const data = item.json; text += `Name: ${data["First Name"]} ${data["Last Name"]}\n`; text += `Email: ${data.Email}\n`; text += `Budget: ${data.Budget}\n`; text += `Message: ${data.Message}\n\n`; } return [{ json: { text } }];
- Email Notification:
- Send an email with the list of new leads.
7. Webhooks and HTTP Requests
- Webhook: A way to receive real-time data from external applications.
- Use Tally Forms to create a simple form and configure a webhook to send data to n8n.
- HTTP Request: A way to send data from n8n to external applications.
- Use an HTTP request to send data from n8n to a CRM like GoHighLevel.
- Use Request Catcher to test HTTP requests.
8. Building an AI RAG System
- Trigger: On chat message.
- Action: Download file from Google Drive.
- Set up Google Drive integration using client ID and client secret.
- Action: Extract text from PDF.
- Action: Add document to in-memory vector store.
- Use a default data loader to convert raw data into a format that the RAG system can understand.
- Use a recursive character text splitter to break the text down into smaller chunks.
- Action: Advanced AI agent.
- Use an embedding model to encode the message in the vector database.
- Configure the AI agent to use the in-memory vector store as its knowledge base.
9. Data Types in n8n
- Text: Strings of characters.
- Numbers: Numerical values.
- Boolean: True or false values.
- Date: Date and time values.
- Binary: Files, such as PDFs or images.
- Array: A list of items.
- Collection: A group of labeled information, such as a row in a Google Sheet.
10. Conclusion
- n8n is a powerful automation platform that can be used to automate a wide range of tasks.
- The video provides a comprehensive overview of n8n's features and demonstrates how to build practical automation scenarios.
- By following the steps outlined in the video, users can leverage n8n to streamline their workflows and improve their productivity.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "Master n8n in 2 Hours: Complete Beginner’s Guide for 2025". What would you like to know?
Chat is based on the transcript of this video and may not be 100% accurate.