๐ฌWhat we learn today โ a short video
โก By the end of the session you will know
- An Iterator breaks an array into bundles; aggregators combine them back.
- A Repeater for loops and pagination; Sleep up to 300 seconds.
- Five error handlers: Ignore, Resume, Break, Rollback, Commit.
- Break + incomplete executions = runs that don't get lost.
- We built a resilient payment-reminder system.
A silent video of about half a minute: the session topic, the learning goals (also listed in the next section) and the scenario we build today.
๐The story of Etz va'Or (Wood & Light) โ Chapter 6: Who hasn't paid yet?
60 open orders, and 12 customers still haven't finished paying. Maya hates chasing money. We'll build a reminder system that goes through everyone, sends politely, doesn't crash when an API goes down โ and reports to her only what matters.
๐งต One story across the whole course: every session solves a real problem for the business. At the end โ a complete system.
๐ฏSession goals
- Break an array into bundles with an Iterator and understand its effect on Credits.
- Combine bundles with Array, Text, Numeric and Table aggregators.
- Create a loop with a Repeater and pause with Sleep.
- Know the five error handlers and when to use each one.
- Turn on incomplete executions and complete runs that failed.
- Build retries and an error-alert scenario.
- Build a payment-reminder system that is resilient to errors.
๐๏ธSession agenda (3 hours)
- 00:00โ00:15 Review: the CRM
- 00:15โ00:45 Iterator and aggregators
- 00:45โ01:05 Repeater, Sleep and rate limits
- 01:05โ01:20 โ Break
- 01:20โ02:00 Error handlers and incomplete executions
- 02:00โ02:15 Error alerts
- 02:15โ02:50 Building together: payment reminders
- 02:50โ03:00 Summary and practice
1Iterator โ array โ bundles
In session 2 we saw that an array inside a bundle is still one bundle. An Iterator (Flow Control โ Iterator) breaks it up: a bundle per item. All the modules after it run once per item.
๐ฐ An Iterator multiplies Credits1 email ร 3 files: Gmail (1) + Iterator (1) + Drive (3) = 5 Credits. With 50 files โ 52. Before an Iterator always ask: can this be done in one action (Bulk / API)?
2Aggregators โ bundles โ one
An aggregator does the opposite: it collects several bundles and outputs one. In every aggregator you choose a Source module โ where it starts collecting from (usually the Iterator or the search).
| Aggregator | Outputs | Use |
|---|
| Array aggregator | An array of collections | Bulk Add, Create JSON, passing to an AI agent |
| Text aggregator | One joined text | A list in a Telegram message/email |
| Numeric aggregator | A number (SUM, AVG, COUNT, MIN, MAX) | A total of debts |
| Table aggregator | A table (CSV/HTML) | Reports |
| Group by (in the settings) | A bundle per group | A summary per client/agent |
๐ก Search already outputs bundlesSearch Rows outputs a bundle per row โ you don't need an Iterator after it! An Iterator only when there is an array inside a bundle.
3Repeater, Sleep and rate limits
| Tool | What it does | Example |
|---|
| Repeater | Outputs N bundles with i = 1..N | Pagination: pages 1โ10 of an API |
| Sleep (Tools) | A pause of up to 300 seconds | Between WhatsApp messages |
| Break + Retry | A retry after X minutes | A busy API |
| Scenario settings โ Max cycles | The trigger runs several times in a row | Draining a big queue |
โ ๏ธ A run time limitA scenario run has a maximum time (depending on the plan, usually 40 minutes). A 5-minute Sleep ร 20 clients = 100 minutes โ it will fail. Instead of a long Sleep: a scheduled scenario that processes a small batch each time.
Pagination โ when the API returns pages
Repeater (Repeats: 10)
โ HTTP GET /orders?page={{1.i}}&per_page=100
โ Filter: length(2.data) > 0 โ stops when there is no more
โ Iterator (2.data) โ ...
4Error handlers โ what happens when something fails
When a module fails, the default: the scenario stops, the run is marked Error, and after several failures in a row โ the scenario is turned off. An error handler is attached to a module (right-click โ Add error handler) and decides what to do instead.
| Handler | What happens | When |
|---|
| โญ๏ธ Ignore | Ignores it, continues to the next bundle. The run is Success | An unimportant error (a log, an emoji) |
| ๐ Resume | Continues with a substitute value you define | A default when an enrichment API failed |
| โธ๏ธ Break | Saves the run in incomplete executions, optionally with automatic retries | An API is temporarily unavailable (429, 503) |
| โฉ๏ธ Rollback | Stops and undoes actions in modules that support transactions (ACID) | When it must be all-or-nothing |
| โ
Commit | Stops but confirms what was already done. The run is Success | "We did what we could" |
โน๏ธ Incomplete executionsFor Break to work, turn on Allow storing of incomplete executions in the scenario settings. The saved runs appear in the Incomplete executions tab โ you can fix the scenario and run it again from the point where it failed (Retry), or cancel.
5Error types and how to recognize them
| Error type | Example | Recommended handler |
|---|
| ConnectionError / 5xx | The server isn't available | Break with Retry |
| RateLimitError / 429 | Too many requests | Break with a long delay |
| DataError | A required field is empty, a wrong format | Resume / Ignore + an alert |
| InvalidAccessTokenError / 401 | The connection expired | An alert to a person (Retry won't help) |
| RuntimeError | A general error | An alert + Break |
Inside the error handler's route you can add modules before the directive โ for example a Telegram message with the error details: {{error.message}}, {{error.type}}. And you can put a Router inside the error route by type.
๐ก An error handler for every external moduleRule of thumb: every module that talks to the outside world (HTTP, email, CRM, AI) gets an error handler. Internal modules (Set variable, Router) โ almost never fail.
6Building together: payment reminders
- A daily 09:00 schedule, days of the week SunโThu.
- Search Rows: paid = no.
- Set variable daysLate =
{{{{round((now - parseDate(due; "DD/MM/YYYY")) / 86400000)}}}} (or dateDifference). - Filter: daysLate โฅ 1 AND lastReminder โ today.
- Router: 1โ7 gentle ยท 8โ14 second ยท 15+ Telegram to the manager.
- Sleep 2 seconds (don't flood Gmail).
- Update a Row: lastReminder = today.
- Error handlers: Gmail โ Break (3 ร 15 min); Update โ Resume.
- At the end: Text aggregator โ a daily summary on Telegram.
๐งชLab: simulations and examples
Three ways to see today's material in action: the scenario canvas runs the session's scenario like Make does (with a Credits count), the race compares manual work with automation, and the function playground shows real mapping examples.
๐ก Why in this order?Update the row only after the email is sent โ so a failed send is retried tomorrow.
๐ขA real-world case study
"Planet Digital" โ a marketing agency with 40 retainer clients. Collections were manual and forgotten in busy months; the average delay was 23 days. A graduated reminder scenario (gentle โ second โ a call from the manager) with Break on sending the email and incomplete executions. When the email provider went down for a day, not a single reminder was lost โ everything was sent automatically when it came back. Result: the average delay dropped to 8 days, and a cash flow of about ILS 180,000 came in earlier every month.
โFrequently asked questions
Isn't Ignore dangerous?
It's dangerous if you ignore important things. Use it only for negligible errors, and always with an alert if possible.
What's the difference between Break and Commit?
Break saves the run as incomplete for completion; Commit finishes it as a "success" and doesn't return to it.
Does Rollback really undo a sent email?
No. Rollback works only in modules that support transactions (like a data store). An email that was sent โ was sent.
Why don't I have an Incomplete executions tab?
You didn't turn on Allow storing of incomplete executions in the scenario settings.
โ๏ธQuick understanding check
โก๏ธWhat now?
You finished the lecture! Go to the practice page โ multiple-choice questions and tasks that build A payment-reminder system with batches, delays and error handling. Stuck? The help guide breaks every task into steps. Only after you have tried, peek at the full solution.