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
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.
| Block | Setting |
|---|---|
| 1 File src |
|
| 2 Routing router |
|
| 3 Splitter split |
|
4email |
|
| 5 Telegram message telegram |
|
| 6 Data export valid |
|
Port connections
- src
out→ routerin - router
invalid→ splitin - router
else→ validin - split
mail→ emailin - split
chat→ telegramin
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
- Create your own test SMTP and Telegram connections; replace the address and chat ID only with approved test recipients.
- First check routing and table contents in preview; both channels must receive only O2.
- Perform a training run with real test credentials and check each destination's log and delivery through both channels.
- 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.