Aller au contenu

Leçon 4 · Triggers and Nodes

Manual, Schedule and App Triggers

Learn how n8n workflows start: manual runs, schedules and cron expressions, time zones, app event triggers, polling, and how publishing makes triggers live.

A trigger answers one question: when should this workflow run? Choosing the right trigger affects how fast your automation reacts, how much it costs to run and how easily you can test it. This lesson covers manual, schedule and app triggers. Webhooks and forms get the next lesson.

The trigger families

What starts a run?

Manual You, in the editor
Schedule A time rule
App event A service tells you
Webhook or form A web request
1 / 2

Some app triggers are push based: the service sends a request to n8n when something happens. Others poll: n8n asks the service at intervals whether anything is new. Polling is simpler to set up behind a firewall but adds delay and uses API calls even when nothing happens. Check each node's documentation to learn which kind it is.

Manual trigger

Use the Manual Trigger for workflows you run by hand and while building. It does not run on its own, so publishing a workflow with only a manual trigger gives you no automation. Older exports may mention a "Start" node; it was removed in n8n 2.0 in favor of the Manual Trigger. The old Cron and Interval nodes are gone in 3.0; use the Schedule Trigger.

The Schedule Trigger

The Schedule Trigger runs your workflow on a rule. You can choose intervals such as every few minutes, hours, days or weeks, or enter a cron expression for exact patterns.

A classic cron expression has five fields: minute, hour, day of month, month, day of week. n8n also accepts an optional sixth field for seconds at the start. Check the node documentation before you count fields.

TEXT
# minute hour day-of-month month day-of-week
0 8 * * 1-5      08:00 on Monday to Friday
*/15 * * * *     every 15 minutes
30 6 1 * *       06:30 on the first day of each month

Remember these points:

  • The new rule takes effect when you publish the workflow.
  • Times follow the workflow's time zone if set, otherwise the instance's time zone. Self-hosted instances default to America/New_York unless you set GENERIC_TIMEZONE.
  • Daylight-saving changes can move or repeat local times. For critical jobs, avoid the hour when clocks shift.

Reading a cron rule

This small program imitates how a scheduler checks whether a time matches a rule. It supports only *, numbers, ranges and */n, which is enough to understand the idea.

Python Stand-in: match times against a cron rule

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.

The results skip the weekend, exactly as 1-5 asks.

App triggers

An app trigger watches one service: a new email, a new issue, a new row, a payment event. Setup usually means choosing the event, selecting a credential and sometimes filtering. Some push triggers register a webhook with the service for you, so your n8n instance must be reachable from the internet over HTTPS.

Ask before building:

  1. Which exact event do I need? "Updated" can fire far more often than "created".
  2. What happens if the same event arrives twice? Design for duplicates, as shown in testing and reliability.
  3. What if n8n is offline for an hour? A poll may catch up; a push event may be lost or retried by the sender, depending on the service.

Test runs and production runs

While building, you run the trigger in the editor and see sample data. Once published, the trigger runs by itself and you check the Executions list. The two can behave differently, for example in time zone or the data a service sends. Always watch the first few production runs.

A very short schedule on a slow workflow can start a new run before the previous one has finished. Choose an interval much longer than a normal run, and guard against double processing.

Combining triggers

A workflow may have more than one trigger, for example a schedule for daily work and a manual trigger for testing. Each trigger starts its own execution. Keep the paths easy to follow, and check that both send data in the same shape.

JS Stand-in: two triggers, one shared path

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

No output.

Choosing an interval

Pick the slowest schedule that still meets the real need. If people read a report once each morning, running it every five minutes only creates noise, load and more failures to investigate. If a customer is waiting for a reply, polling once an hour may be too slow, and a push trigger or webhook is a better fit. Write the reason for the chosen interval in the workflow notes, so the next person does not shorten it without thinking about API quotas. Also decide what a missed run means: a daily report that did not run might need to cover two days next time, while a reminder that is a day late may be useless.

Practice

Write cron rules for: every weekday at 17:30, every ten minutes, and 09:00 on the first day of each month. Check your answers: 30 17 * * 1-5, */10 * * * * and 0 9 1 * *. Then test your first rule in the Python stand-in by changing the string and the start date. Finally, decide which of the three jobs would suffer most if one run were missed, and how you would catch up.

Check your understanding

Quick check · 3 questions

of 3 answered You scored / 3 · perfect!

  1. 1. What does 0 8 * * 1-5 mean in a five-field cron expression?

    Minute 0, hour 8, any day of the month, any month, weekdays 1 to 5.
  2. 2. How does a polling trigger find new events?

    Polling asks the service on a timer, which adds delay.
  3. 3. When does a changed schedule rule start to apply?

    Automatic triggers use the published version.

Summary

  • Triggers define when a workflow runs: manual, schedule, app event, or web request.
  • Schedules use intervals or cron rules, in the workflow or instance time zone.
  • App triggers either push or poll; know which one you use.
  • Publish to make triggers live, and watch the first production runs.

Next: Webhooks and Forms

Votre progression est enregistrée dans ce navigateur. Aucun compte nécessaire.