---
title: Planning an App and Setting Up Your n8n
privateVideoUrl: https://stream.mux.com/s5zXIswn1d007tVyelsubw7Fo900OOdcazYpHPqT4mI3U.m3u8
isPublicLesson: true
---

Welcome to Lesson 4. In Lesson 3, we went over the general steps for creating a workflow. This time we’re going to talk about an app we’ll build — one that chats with a task manager — and set up everything we need to make it happen, from n8n to Linear. By the end of this lesson, you’ll know what we’re building and have your environment ready.

## What We’re Building

Today, we’re starting to build an **AI agent workflow** that connects to a task management tool called Linear. This is super cool because it’ll let us chat with an AI to manage our tasks. For example, we can ask it to:

- Show us all the current tasks (or “issues,” as Linear calls them) in our task manager.
- Create new tasks/issues, like adding a team meeting with a description, and have it automatically save everything in Linear.

We might also look at some custom cases later, like handling specific GET requests. The best part? This isn’t as scary as it sounds. If we go step by step, it’s clear and gives you a solid foundation for building all kinds of n8n workflows.

## Step 1: Setting Up Node.js for n8n

Before we build, we need to set up our environment. First up, you need **Node.js** installed on your computer because n8n runs on it. Here’s the deal: it *only* works with Node.js versions 18, 20, or 22. If you use a different version, it’ll break, so double-check this.

To get started:

1. Go to the Node.js website and download the LTS (Long-Term Support) version that’s either 18, 20, or 22.
2. Install it by following the prompts — it’s quick.
3. Open your terminal (or command prompt on Windows) and type `node -v` to check the version. If it’s not 18, 20, or 22, grab the right one.

Once Node.js is set, running n8n locally is a breeze. The n8n team made it super simple — you’ll see how in a sec.

## Step 2: Running n8n Locally

Now that Node.js is ready, let’s get n8n running on your computer. I won’t bore you with tons of documentation details. But I will provide you a [link to the official documentation](https://docs.n8n.io/hosting/installation/npm) just in case. 

In our case, even though the official n8n docs are great, but all you really need is one command to launch n8n locally.

Here’s what to do:

1. Open your terminal.
2. Run this command: `npx n8n`

That’s it! This command downloads and starts n8n (it might take a minute the first time since it grabs a lot of files). When it’s done, you’ll see a message saying n8n is running, usually on port 5678. You can press `o` on your keyboard to start n8n instance, or ppen your browser and go to http://localhost:5678. If that port’s busy, you can change it by adding --port=5680 (or another number) to the command, like npx `n8n --port=5680`.

The first time you open n8n, it’ll ask you to create an account with an email, name, and password. Fill it out, and you’re in! This keeps your workflows secure. 

We’ll start building in n8n soon, but first, let’s set up Linear.

## Step 3: Setting Up Linear

Our AI agent will talk to **Linear**, a task management tool, so we need to get that ready. Linear’s pretty standard — it’s a clean way to manage tasks, though they call tasks “issues.” I’m not a fan of that name (they’re not problems, right?), so I’ll use “tasks” and “issues” interchangeably to keep things clear.

Here’s how Linear works:

- Tasks are organized under **teams**. Each team has its own set of tasks.
- By default, Linear shows an “Active” tab, but switch to the “Backlog” tab to see all your tasks at once.

Before we connect n8n to Linear, you need a Linear account and an API key. Let’s do that now so we’re not distracted later:

1. **Create a Linear Account**:
    - Go to linear.app and sign up for a free account.
    - Add at least one task in your workspace (e.g., “Test task”) to make testing easier later.
2. **Get Your Linear API Key**:
    - In Linear, click the top-left corner to open the menu.
    - Go to **Settings** > **Security and Access**.
    - Scroll down to the API section and click **New API Key**.
    - Copy the key and save it somewhere safe. If you lose it, just create a new one — no big deal.

That’s all for Linear setup! With your API key ready, we’re set to connect it to n8n in the next lesson.
