Menu
n8n Tutorial for Beginners: How to Build AI Automations for FREE (Step-by-Step)

n8n Tutorial for Beginners: How to Build AI Automations for FREE (Step-by-Step)

Charlie Chang

423,267 views 1 year ago Save 11 min 8 min read

Video Summary

This video tutorial guides viewers through building AI automations using N8N, a free, open-source automation platform. It emphasizes N8N's customizability and power, offering a method to self-host it on a VPS for significant cost savings compared to their cloud offering, which can cost $24/month. The tutorial covers setting up a self-hosted N8N instance, exploring its interface, importing pre-built templates, and building a custom workflow from scratch. A detailed example demonstrates creating a workflow that captures form submissions, stores them in Google Sheets, filters leads based on occupation, and sends personalized emails via Gmail, showcasing conditional logic and merging paths. The presenter encourages hands-on learning through building and importing templates to grasp the software's capabilities for both personal and business optimization.

A particularly compelling aspect highlighted is the ability to get N8N's premium features for free by utilizing the community version and self-hosting, potentially saving users 70-80% compared to paid plans. This cost-saving strategy, combined with N8N's extensive automation potential, positions it as a powerful tool for individuals and businesses looking to optimize workflows without substantial financial outlay.

Short Highlights

  • N8N is a free, open-source, and highly customizable automation tool, comparable to Zapier but with a stronger AI focus.
  • Self-hosting N8N on a VPS can save users significantly, potentially 70-80% compared to its $24/month cloud offering.
  • The platform allows automation of various tasks including emails, databases, social media, and AI chatbots.
  • Viewers can import pre-built templates from the N8N website to expedite workflow creation.
  • A practical demonstration builds a workflow: form submission -> Google Sheets -> filtering by occupation -> conditional Gmail alerts for engineers and doctors -> merging paths -> final email notification.

Key Details

Getting Started with N8N and Cost-Saving Self-Hosting [00:00]

  • N8N is presented as a free, open-source, and highly customizable automation platform ideal for building AI automations.
  • The video promises to show viewers how to get N8N for free by self-hosting on their own Virtual Private Server (VPS), a method that can save substantial costs compared to the $24/month cloud version.
  • N8N is described as more AI-focused and flexible than Zapier, with no subscription needed for the core functionality and the ability to be self-hosted.
  • The platform can automate diverse workflows, including emails, databases, social media, and AI chatbots.
  • Viewers are encouraged to adopt AI automations for business and personal life optimization.

"If you try and get N on their website, it costs like $24 a month, but I'll show you a really easy workaround."

Self-Hosting N8N on a VPS with Hostinger [01:38]

  • The tutorial details how to set up N8N on a VPS using Hostinger, emphasizing cost-effectiveness.
  • Viewers are directed to a specific landing page for VPS hosting, which includes a pre-built N8N template to save setup time.
  • Recommended VPS plans are KVM1 or KVM2, suitable for most users.
  • For significant savings, choosing a longer subscription period (12 or 24 months) is advised.
  • An additional 10% discount is available by using the coupon code "Charlie Chang."
  • The setup process involves entering billing information and completing the checkout.

"Make sure you get to this exact landing page because it's going to come with that nan template built in. That's going to save you a bit of time."

Installing and Activating N8N on a VPS [02:58]

  • Upon accessing the Hostinger dashboard, N8N should ideally be pre-installed as a template.
  • If not installed, users can navigate to "Operating System," search for "N8N," and select it to change the OS.
  • The installation of the new OS may take a few minutes.
  • After installation, users manage the app and set up their owner account by entering their email.
  • The community version of N8N can be activated with a free license key, obtainable by entering an email address and clicking "send me a free license key."
  • Copying and pasting this license key into N8N's activation section grants access to paid features.

"Now to activate all the paid features that we're getting for free using this community version of NAN, we're going to enter our email right here and click send me a free license key."

N8N Interface Overview: Workflows, Credentials, and Executions [04:04]

  • The N8N interface is introduced, starting with the "Workflows" tab where all created workflows are listed.
  • The "Credentials" section is where users connect their accounts to various APIs, enabling N8N to interact with different applications.
  • The "Executions" tab displays a log of all workflow runs; a new account will have no executions initially.
  • Users can start building workflows from scratch using the workflow builder.
  • The first step in a workflow is typically a trigger, with options like "on chat message" or "on form submission" available.
  • Actions are added via a "+" button, forming a chain of operations that execute after the trigger.

"This is basically where we can create workflows as well as create credentials. Once we start creating workflows, they're going to show up in this workflow tab here."

Exploring N8N Templates and Importing Workflows [05:31]

  • N8N offers a vast library of pre-built automation templates that can significantly speed up workflow creation.
  • These templates are categorized and searchable, for example, by specific apps like Google Sheets or by AI functionality.
  • An example of an advanced AI template, an "AI powered short form video generator" using OpenAI, Flux, Cling, and 11 Labs, is shown.
  • Users can import these templates directly into their N8N dashboard by clicking "use workflow" or copying the template to their clipboard.
  • For imported templates, a user guide often provides instructions on necessary API keys and login credentials.

"If you go to the N website, I'm going to come here to product and then go to templates. And you'll be able to see that there are tons and tons of pre-built templates out there."

Setting Up Credentials for N8N Integrations [08:07]

  • It is crucial to add credentials to connect N8N with external services.
  • For example, an OpenAI account with at least $5 loaded and a generated test API key is required for AI integrations.
  • Users will need to create credentials for each app or service they want to connect, such as Google Sheets or Gmail.
  • While creating credentials for self-hosted N8N can be slightly more complex than N8N cloud, numerous tutorials are available to guide users.

"As you build more and more workflows, you'll want to create more and more credentials because every credential is going to allow you to connect to a new app or service."

Building a Custom Workflow: Form Submission to Email Alerts [09:27]

  • A step-by-step tutorial demonstrates building a custom workflow: capturing form submissions, processing them, and sending emails.
  • The workflow begins with a "on form submission" trigger, allowing users to define form fields like "first name," "last name," "email," and a dropdown for "occupation."
  • The "test step" function allows users to submit the form and view the output data, which can be "pinned" for repeated testing without re-entry.
  • The next action is to "append or update row in sheet" using Google Sheets, mapping form fields to spreadsheet columns.
  • A "column to match on" (e.g., email) is set to update existing rows rather than creating duplicates if a user submits the form multiple times.
  • A "filter" step is introduced to exclude certain entries (e.g., "student" occupation) from proceeding to the next stage.

"What we're going to do is we're going to give it a quick title. Test form. We don't need a description. Let's do a bunch of form elements for this test form."

Implementing Conditional Logic and Merging in Workflows [14:59]

  • A "switch" node allows for multiple routing paths based on specific conditions.
  • For instance, the workflow can be set up so that if "occupation is equal to engineer," one path is taken, and if "occupation is equal to doctor," another path is taken.
  • Each path can lead to different actions, such as sending a specific email via Gmail.
  • After following different conditional paths, a "merge" node can bring these paths back together into a single flow.
  • This allows for subsequent actions that apply to all processed leads, regardless of their initial conditional route.
  • The example concludes with sending a final notification email to a "leads" inbox, indicating a new lead has been processed and messaged.

"This basically allows us to have a multiple routes from what happened. So actually I'm going to come back here. I'm going to test this again. Unpin and test."

Conclusion: Mastering N8N for Enhanced Productivity [17:26]

  • The best way to learn N8N is through active building and importing templates.
  • Self-hosting N8N on an affordable VPS is highly recommended for significant cost savings (70-80%).
  • N8N offers extensive resources, including a forum, Discord community, and use case examples.
  • Regardless of the setup (cloud or self-hosted), N8N provides immense potential for automating life and business processes.
  • The presenter encourages viewers to explore N8N's capabilities further and subscribe for more content on entrepreneurship, AI, and finance.

"The amount of things you can automate within your life and business is absolutely insane. I really recommend taking some more time to learn about all the things you can automate."

Other People Also See