Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Creating a Basic Trigger-Action Workflow | Introduction to n8n
n8n Overview

Creating a Basic Trigger-Action Workflow

Stryg for at vise menuen

To create your first automated process in n8n, you need to build a workflow that starts with a trigger and then performs an action. Begin by opening the n8n editor and clicking the "+" button to add a new node. In the node selection dialog, type Webhook or Schedule to find trigger nodes. Select your preferred trigger to add it to the canvas.

Once the trigger node is on the canvas, configure its properties. For a Webhook trigger, n8n provides a unique URL that listens for incoming HTTP requests. You can copy this URL and use it to trigger your workflow from external apps. If you select a Schedule trigger, you can set it to run at specific times, such as every hour or once a day.

Below is a screenshot showing how to add and configure a trigger node:

Adding a trigger node in n8n

After configuring your trigger, you are ready to connect it to an action node.

Webhook Trigger
expand arrow

Use when you want your workflow to start from an external HTTP request, such as a form submission or a webhook from another service;

Schedule Trigger
expand arrow

Ideal for automating tasks on a regular interval, like daily reports or hourly checks;

Email Trigger
expand arrow

Starts the workflow when an email is received; great for automating responses or processing incoming messages;

Manual Trigger
expand arrow

Lets you run the workflow manually for testing or one-off actions;

App-Specific Triggers
expand arrow

Some integrations (like Slack or Google Sheets) provide their own triggers to start workflows based on events in those apps.

Now, add an action node to perform a task when your trigger fires. Click the "+" button again, then search for an action node such as Send Email or Post Message. For example, you might choose the Email node to send an email when the trigger is activated.

In a real-world scenario, imagine you want to receive an email every time someone submits a contact form on your website. You would use a Webhook trigger to listen for form submissions, then connect it to an Email node that sends you the message details.

Connect the trigger node to your action node by dragging from the trigger's output to the action's input. Configure the action node with the necessary details, such as the recipient's email address and the message content.

Your basic trigger-action workflow is now set up.

Note
Note

Tip: Always test your workflow with sample data before going live. This helps you catch any issues and ensures your automation works as expected.

workflow.json

workflow.json

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 4

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Sektion 1. Kapitel 4
some-alt