Ir para o conteúdo

Lição 3 · Triggers and Nodes

Nodes and Connections in n8n

Understand node types, connections, per-item execution, useful node settings like Execute Once and Always Output Data, sticky notes, and pinned test data in n8n.

Every n8n workflow is made of two things: nodes that do work and connections that carry data between them. When something behaves strangely, the explanation is almost always in how one node received items from another. This lesson gives you the model you will use in every later lesson.

Kinds of nodes

Node families

Trigger nodes Start a run
App nodes Talk to a service
Core nodes Logic, data, HTTP
AI nodes Models, memory, tools
1 / 2
  • Trigger nodes begin a workflow. A workflow needs at least one.
  • App nodes (also called integrations) perform operations in a particular service, such as creating a spreadsheet row or sending a chat message. Many have an operation dropdown: get, create, update, delete.
  • Core nodes are service-independent tools such as If, Merge, Code and HTTP Request.
  • Cluster nodes appear in AI workflows: a root node with smaller sub-nodes attached beneath it. See the AI Agent node.

There are also community nodes, written by other people. They run code on your instance, so treat them like any third-party software. Check who publishes them and whether you need them at all. In the 3.x line, unverified community packages are turned off by default.

How data moves

A connection goes from an output of one node to an input of the next. Some nodes have several outputs: If has true and false, and Switch has one per rule. Some nodes accept several inputs, such as Merge.

Nodes run along the connections. A branch that receives no items normally does not run at all. This surprises beginners who expect every node to execute every time.

By default a node performs its job once for each input item. If five items reach a "send email" node, you send five emails. That is powerful and sometimes dangerous.

JS Stand-in: one node, many items

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Useful node settings

Next to a node's parameters there is a settings tab. These options matter most:

Setting What it does
Execute Once Handles only the first input item and ignores the rest
Always Output Data Sends an empty item when the node would output nothing
Retry On Fail Runs the node again after a failure (error handling)
On Error Chooses what happens if the node fails
Notes A comment for the next person

Use Always Output Data carefully. An empty item can make a later node run with missing values. In n8n 3.0, nodes with several outputs, such as If and Switch, add that empty item only when every output is empty.

Keeping the canvas readable

  • Rename nodes with verbs: Get open orders, Filter overdue.
  • Add sticky notes to explain why a section exists.
  • Arrange left to right and keep error paths below the main path.
  • Disable a node temporarily instead of deleting it while experimenting.

Pinning data while you build

Running a node that calls an API again and again is slow and may use up quotas. Pinning saves a node's output so later test runs reuse it instead of calling the service again. Pinned data is for development: production executions fetch real data. You can also edit pinned data to test odd cases, such as an empty name.

Python Stand-in: cache a node's output while developing

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Common mistakes

  • Forgetting that a node runs per item and sending a hundred messages instead of one summary. Aggregate items first, or use Execute Once on purpose.
  • Assuming a skipped branch failed. It may simply have received no items.
  • Installing community nodes without checking who maintains them.

Reading a node's run

When you open a node after a run, compare three things: the number of items in, the number of items out and the field names. A node that receives five items and returns one is combining them, filtering them or failing quietly. A node that returns more items than it received is splitting lists or finding several matches. If you are unsure what a node will do, give it two clearly different items, such as A and B, and follow them through. Small, recognizable test values make mistakes obvious in a way that real data does not.

Check your understanding

Quick check · 3 questions

of 3 answered You scored / 3 · perfect!

  1. 1. Six items reach a node with default settings that posts a chat message. What usually happens?

    Most nodes run once for each input item.
  2. 2. What does Execute Once do?

    The setting handles only the first input item and ignores the rest.
  3. 3. What is pinned data for?

    Pinning avoids repeated calls while you build and test.

Summary

  • Triggers start runs; app, core and AI nodes do the work.
  • Connections carry items, and most nodes run once per item.
  • Execute Once and Always Output Data change that behavior, so use them deliberately.
  • Name nodes clearly and pin data to develop safely.

Next: Manual, Schedule and App Triggers

Seu progresso fica salvo neste navegador. Não precisa de conta.