Session 6 of 15
Loops, Batches and Error Handling โ Resilient Automations
Iterator, aggregators and Repeater for working with lists; Sleep and rate limits; and error handlers (Break, Resume, Ignore, Rollback, Commit) with incomplete executions โ so the automation doesn't fall over at two in the morning.
โฑ๏ธ 3 hours๐ ๏ธ A payment-reminder system with batches, delays and error handling
๐ฏ 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.
๐งช Today's scenario โ a live run
๐๏ธ The agenda
- 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
Iterator โ array โ bundles
- Iterator: array โ a bundle per item
- Every module after it runs N times
- Credits are multiplied
- Think about Bulk first
Aggregators โ bundles โ one
- Aggregator: many โ one
- Source module
- Array / Text / Numeric / Table
- Group by
Repeater, Sleep and rate limits
- Repeater = a for loop
- Sleep up to 300 seconds
- A run time limit
- Pagination with a Repeater
Error handlers โ what happens when something fails
- Ignore / Resume / Break / Rollback / Commit
- Break + Retry for temporary errors
- Incomplete executions
- Turned on in the scenario settings
Error types and how to recognize them
- Connection / RateLimit / Data / Token
- A Router by error.type
- error.message in the alert
- A handler for every external module
Building together: payment reminders
- A daily schedule โ Search โ Filter
- A Router by days late
- Sleep + update lastReminder
- Break on Gmail + a summary
โ๏ธ Understanding check
๐ To sum up
- 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.
๐๏ธ Time to practice!
The session project: A payment-reminder system with batches, delays and error handling