Getting Started

Your First Workflow

Step-by-step tutorial to build your first n8n workflow from scratch, covering triggers, nodes, connections, and testing.

Getting startedBeginner5 min read

In this guide you will build a simple workflow that runs on a schedule, fetches data from a public API, and sends a notification. By the end you will understand how to create workflows, add and connect nodes, test executions, and activate a workflow for production use.

Step 1: Access n8n

You need a running n8n instance. Choose whichever option suits you:

n8n Cloud

Sign up at app.n8n.cloud. The free trial gives you immediate access to the workflow editor -- no installation required.

Docker (self-hosted)

Run n8n locally with a single command:

docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n

Once the container is running, open your browser and navigate to http://localhost:5678.

npm

If you prefer Node.js directly:

npx n8n

This starts n8n on port 5678 by default.

Note

The Docker method persists your data in a named volume (n8n_data). If you use npx n8n, data is stored in ~/.n8n by default.

Step 2: Create a new workflow

  1. After logging in, click Add workflow (or the + button) in the top navigation.
  2. You will see a blank canvas with a single Start node or a prompt to add a trigger. This is where you will build your automation.
  3. Give the workflow a name by clicking the title at the top -- something like "My First Workflow".

Step 3: Add a Schedule Trigger

Every workflow begins with a trigger -- an event that starts the execution.

  1. If you see a trigger selection panel, search for Schedule Trigger. Otherwise, click the + button on the canvas and search for it.
  2. Select Schedule Trigger and configure it to run every hour (or any interval you prefer for testing).
  3. Close the node configuration panel.

Tip

During development you do not need to wait for the schedule. You can run the workflow manually at any time using the Test workflow button.

Step 4: Fetch data with an HTTP Request node

Next, add a node that retrieves data from a public API.

  1. Click the + handle on the right side of the Schedule Trigger node.

  2. Search for HTTP Request and select it.

  3. Configure the node:

    Field Value
    Method GET
    URL https://jsonplaceholder.typicode.com/posts/1
  4. Click Test step to execute just this node. You should see a JSON response containing a sample post with userId, id, title, and body fields.

Step 5: Send a notification

Now add a node to do something with the fetched data. For this example, use a simple Send Email or a messaging node. To keep things dependency-free, we will use the Set node to simulate an output, but you can substitute Slack, Discord, email, or any other notification node.

  1. Click the + handle on the HTTP Request node.

  2. Search for and add a Set node (or your preferred notification node).

  3. In the Set node, add a field:

    Field Name Value (expression)
    message New post fetched: {{ $json.title }}
  4. Click Test step. The output should show your message field populated with the post title from the API.

Info

Expressions in n8n use double curly braces {{ }}. Inside them you can reference data from the current or previous nodes using $json, $node, and other built-in variables.

Step 6: Test the full workflow

Click the Test workflow button in the top-right corner of the canvas. n8n will execute every node in sequence, starting from the Schedule Trigger. After the run completes:

  • Each node displays a green checkmark and the number of output items.
  • Click any node to inspect its input and output data.
  • If a node fails, it shows a red indicator with the error message.

Step 7: Activate the workflow

Once you are satisfied that the workflow runs correctly:

  1. Toggle the Active switch in the top-right corner of the editor.
  2. Confirm activation when prompted.

The workflow is now live. The Schedule Trigger will fire at the interval you configured, and n8n will execute the workflow automatically each time.

Warning

On self-hosted instances, n8n must be running continuously for scheduled workflows to fire. If you started n8n with docker run --rm, the container (and your workflows) will stop when you close the terminal. For persistent operation, use docker run -d or a process manager.

Recap

In this guide you:

  1. Started an n8n instance (cloud or self-hosted).
  2. Created a new workflow and added a Schedule Trigger.
  3. Connected an HTTP Request node to fetch data from an API.
  4. Added a Set node to transform the output.
  5. Tested the workflow manually and then activated it.

From here you can extend this workflow -- swap the Set node for a Slack or email node, add error handling, or chain additional processing steps. See Cloud vs. Self-Hosted to decide how you want to run n8n long-term.

For more workflow examples and tutorials, see the official n8n courses and documentation.

Want this running in your stack?

I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.