Task and prerequisites

Find orders with a negative amount and send a concise report to a control group through two channels.

This example uses demonstration data and settings. Validate the expected result in your own environment before connecting production destinations. Identifiers demo_* are illustrative: select your own training connections or sources in the editor. The JSON below shows the block and connection structure, not a ready-to-transfer flow archive.

Use test recipients to verify message content and attachments before enabling the flow for its intended recipients.

Training input data

orders.csv

Order;Amount
O1;100
O2;-15
O3;50

Blocks, connections and exact settings

Explanatory diagramEnlarge ↗20. Exception notifications by email and Telegram. Example 20 topology: 6 blocks, 5 connections. Node identifiers and ports from the configured graph are preserved.
Flow diagram 20

Example 20 topology: 6 blocks, 5 connections. Node identifiers and ports from the configured graph are preserved.

Add the listed blocks in the designer, open each block's properties and set these values. Names demo_* identify training sources and connections.

BlockSetting
1
File
src
  • Role: source
  • Source: demo_notify_orders
  • Read settings:
    • Sheet: CSV
    • Range: A1:B4
    • First row is the header: так
    • Delimiter: ;
2
Routing
router
  • Mode: first
  • Default route: так
  • Routes:
      • Identifier: invalid
      • Label: Від’ємна сума
      • Selection conditions:
          • column: Amount
          • Operation: lt
          • Value: 0
          • Numeric comparison: так
          • value_mode: constant
3
Splitter
split
  • Branches:
      • Identifier: mail
      • Label: Пошта
      • Identifier: chat
      • Label: Telegram
4
Email
email
  • Connection: demo_smtp
  • To: [email protected]
  • Subject: UBC Data Bridge: винятки {{$date}}
  • Text: Потік {{$flow}}. Кількість винятків: {{$rows}}. {{$table}}
  • Format: text
  • time_zone: Europe/Kyiv
5
Telegram message
telegram
  • Connection: demo_telegram
  • recipient_type: auto
  • Chats: -1000000000000
  • Text: Потік {{$flow}}: винятків {{$rows}}. {{$table}}
  • parse_mode: none
  • silent: так
  • time_zone: Europe/Kyiv
6
Data export
valid
  • Format: csv
  • File name: valid_orders
  • Purpose: download
  • Delimiter: ;
  • Time zone: Europe/Kyiv

Port connections

  • src out → router in
  • router invalid → split in
  • router else → valid in
  • split mail → email in
  • split chat → telegram in
Complete graph configuration as JSON
{
  "version": 3,
  "nodes": [
    {
      "id": "src",
      "type": "file",
      "label": "src",
      "config": {
        "role": "source",
        "source_id": "demo_notify_orders",
        "options": {
          "sheet": "CSV",
          "range": "A1:B4",
          "header": true,
          "delimiter": ";"
        }
      }
    },
    {
      "id": "router",
      "type": "router",
      "label": "router",
      "config": {
        "mode": "first",
        "default_route": true,
        "routes": [
          {
            "id": "invalid",
            "label": "Від’ємна сума",
            "predicates": [
              {
                "column": "Amount",
                "op": "lt",
                "value": 0,
                "numeric": true,
                "value_mode": "constant"
              }
            ]
          }
        ]
      }
    },
    {
      "id": "split",
      "type": "splitter",
      "label": "split",
      "config": {
        "branches": [
          {
            "id": "mail",
            "label": "Пошта"
          },
          {
            "id": "chat",
            "label": "Telegram"
          }
        ]
      }
    },
    {
      "id": "email",
      "type": "email",
      "label": "email",
      "config": {
        "connection_id": "demo_smtp",
        "to": "[email protected]",
        "subject": "UBC Data Bridge: винятки {{$date}}",
        "body": "Потік {{$flow}}. Кількість винятків: {{$rows}}.\n{{$table}}",
        "format": "text",
        "time_zone": "Europe/Kyiv"
      }
    },
    {
      "id": "telegram",
      "type": "telegram",
      "label": "telegram",
      "config": {
        "connection_id": "demo_telegram",
        "recipient_type": "auto",
        "chats": "-1000000000000",
        "text": "Потік {{$flow}}: винятків {{$rows}}.\n{{$table}}",
        "parse_mode": "none",
        "silent": true,
        "time_zone": "Europe/Kyiv"
      }
    },
    {
      "id": "valid",
      "type": "export",
      "label": "valid",
      "config": {
        "format": "csv",
        "filename": "valid_orders",
        "destination": "download",
        "delimiter": ";",
        "timezone": "Europe/Kyiv"
      }
    }
  ],
  "edges": [
    {
      "source": "src",
      "target": "router",
      "source_port": "out",
      "target_port": "in"
    },
    {
      "source": "router",
      "target": "split",
      "source_port": "invalid",
      "target_port": "in"
    },
    {
      "source": "router",
      "target": "valid",
      "source_port": "else",
      "target_port": "in"
    },
    {
      "source": "split",
      "target": "email",
      "source_port": "mail",
      "target_port": "in"
    },
    {
      "source": "split",
      "target": "telegram",
      "source_port": "chat",
      "target_port": "in"
    }
  ]
}

Expected result

The training rows produce 1 exception, O2=-15. The invalid branch creates an email and a message containing count 1 and a table of that row. valid_orders.csv contains O1=100 and O3=50. Actual delivery is not expected with the placeholder addresses shown.

Run and verify

  1. Create your own test SMTP and Telegram connections; replace the address and chat ID only with approved test recipients.
  2. First check routing and table contents in preview; both channels must receive only O2.
  3. Perform a training run with real test credentials and check each destination's log and delivery through both channels.
  4. Repeat the check without negative amounts: the invalid branch must remain inactive and no messages should be created.

Common errors

  • [email protected] and -1000000000000 are placeholders, not configured recipients.
  • {{Order}} or {{$row}} makes a template row-dependent; the illustrated template uses the overall count and table.
  • Invalid or missing field names in tags stop message preparation.
  • silent=true disables Telegram sound; it does not cancel sending.
  • A failed delivery through one channel does not prove the other sent nothing: check individual statuses before retrying.