← Example scenarios

One summary for every address

Checks a list of addresses in turn and sends a single message with one line per address.

What the scenario looks like

Срабатывание по расписанию
Список адресов▶
По каждому адресу▶▦
Запрос▶
Строка отчёта▶
Сводка▶
Сводка в Telegram▶
Сводка отправлена▶
Template▶
Wait all▶
  • Execute + Data
Open in your workspace →

With five sites, one notification per site becomes a stream nobody reads. Here the check walks a list and the result arrives as one message: a line per address, green or red.

What is inside

  1. Scheduled trigger — the entry.
  2. List of addresses — a code node returning a plain array of strings. Adding a site means adding a line; no rewiring.
  3. For each address — the loop. The lower part is its body: it runs once per address, and the report line comes back into the End port.
  4. Summary joins the collected lines into one message; Summary to Telegram sends it.

Inside the loop body the templates read inputs, not nodes. The difference is not cosmetic: {{ nodes.probe.output }} points at the last finished iteration, so from the second address on the report would repeat one line. With a single address you cannot see it.

Two kinds of failure, and they differ

A site that answers with an error does not stop the sweep: its status code lands in the summary as a red line. But an address that is not there at all — the domain does not resolve, the connection is refused — has no answer, so that check fails.

The Error branch hangs off the check itself, inside the loop body, and its line joins the summary with the rest. The sweep carries on: a dead address costs one red line, not the whole run. On the loop instead it would do the opposite — the first dead address would end the sweep, and you would learn nothing about the others that time.

Both branches meet at a barrier before the End port, so exactly one line comes back per pass, whichever of the two ran.

What to set up for yourself

  • The list of addresses in the code node.
  • The shape of a line in the report and no-answer nodes: currently a marker with the address and status, or a marker noting there was no answer at all.
  • The chat in the send node.
  • When to bother you. The summary is sent every time. To be told only when something is red, add a branch on the summary’s contents before the send.

What to connect

A Telegram bot and the Schedule target. Addresses are checked one after another, so a long list is a long run: twenty addresses at a ten-second timeout take over three minutes in the worst case.