2. Core Concepts: Nodes, Workflows, Triggers
All automation in n8n is built around three core concepts: Nodes, Workflows, and Triggers.
2.1. Nodes
Nodes are the individual building blocks of a workflow. They perform specific functions, such as fetching data, transforming it, or sending it to another service. n8n offers hundreds of built-in nodes (e.g., HTTP Request, Google Sheets, Email, Code, etc.).
2.2. Workflows
A Workflow is an automated process consisting of one or more nodes connected in a logical sequence. Data flows from one node to the next, with each node performing an operation on the data.
2.3. Triggers
Trigger nodes are special types of nodes that initiate a workflow. They ensure the workflow runs when a specific event occurs.
- Webhook Trigger: Runs the workflow when an HTTP request is sent to a specific URL.
- Cron Trigger: Runs the workflow at a specified schedule (e.g., daily, hourly).
- App-specific Trigger: Runs the workflow when an event occurs in a particular app (e.g., Slack, GitHub).
2.4. Creating Your First Workflow (Example)
Let\'s create a simple Webhook trigger workflow:
- In the n8n UI, click \'New Workflow\'.
- Add a \'Webhook\' node and connect it to \'Add Output\'.
- Add a \'Respond to Webhook\' node and connect it to the Webhook node.
- Click on the Respond to Webhook node to open its settings panel. In the \'Response Body\', enter a simple JSON object (e.g., `{ "status": "success", "message": "Hello from n8n!" }`).
- Activate the workflow and send a test request to the Webhook node\'s URL.
// Example Response Body for Respond to Webhook node
{
"status": "success",
"message": "Hello from n8n!"
}