Reaction-driven automation
Section titled “Reaction-driven automation”This pattern is for builders automating the routine work of an application — notifications, status updates, reminders, follow-up records. Read it after My First Application and Reactions & automation. By the end you will know how to shape a set of reactions so it does the right thing, once, and is easy to debug when it does not.
The problem
Section titled “The problem”Automation that grows by accident becomes impossible to reason about: a reaction that does five things, two reactions that fight over the same field, a loop nobody notices, a notification that silently stopped. Because reactions run in the background, the person whose click set one off is not told when it fails — so design mistakes stay hidden until a customer complains.
When to use it
Section titled “When to use it”Use reactions for work that must happen every time a defined thing happens, without anyone remembering to do it:
- telling the next person a record is waiting for them;
- keeping a field in step with the workflow (a status, a closing date);
- creating or updating related records;
- reminders and deadlines on a schedule;
- calling another system.
Do not use a reaction for something people should decide — that is a workflow action — or for a value that is really a calculation on the record — that is a calculated field.
How to build it in OSOS
Section titled “How to build it in OSOS”1. One reaction, one job
Section titled “1. One reaction, one job”Each reaction has exactly one action. Name it after the job, When … then … — for example When a ticket reaches Help Desk, notify the desk. To do two things on the same event, add two reactions; when their order matters, chain them (step 4).
2. Pick the event that matches the moment
Section titled “2. Pick the event that matches the moment”- Workflow moves are workflow events, not updates: On Entry Updated does not run when a record moves between steps. Use On Workflow Step Reached (to tell whoever acts next), On Workflow Step Exited or On Workflow Action Executed (to react to a particular decision).
- Use On Entry Updated with the specific fields to watch, so it runs only when one of them changes.
- Use Timer for “every morning” or “on this date”, and put repeating timers at quiet hours.
- Use On Time Exceeded, on the Time Monitoring sub-tab, for an overdue step.
See Choose the event.
3. Filter narrowly
Section titled “3. Filter narrowly”Under Filter, reuse a Saved Query or add conditions, so the reaction runs only for the records it is meant for. A reaction with no filter runs every time the event happens — and a Timer with no filter goes through every record.
4. Chain sequences
Section titled “4. Chain sequences”- Add the first reaction as usual.
- Add the next with the event Reaction Succeeded — or Reaction Failed to handle a failure — and choose the entity and the reaction it follows.
- Set its Execution Spaces to Triggering Space.
The follow-up must exist and be active before the first one runs. See chain reactions.
5. Make re-runs harmless
Section titled “5. Make re-runs harmless”A follow-up reaction may occasionally run twice for one run of the first, and a platform restart can cut a run short without redoing the rest. So:
- before creating a record, check — in the filter — that it does not already exist;
- prefer setting a field to a value over adding to it;
- do not assume an earlier reaction in the chain completed.
6. Choose who it acts as
Section titled “6. Choose who it acts as”Event Executor Type decides whose authority the action uses: System, Manager, or Executor (the person whose action set it off). Pick the smallest that does the job. If the entity has sensitive fields, choose the Sensitive Data Access Policy deliberately — see Where it runs and who it acts as.
7. Respect the loop protection
Section titled “7. Respect the loop protection”Each action runs only once per chain of events. Raise Loop Threshold only when a reaction genuinely must run again in the same chain, and make sure its filter eventually stops matching.
8. Check that it ran
Section titled “8. Check that it ran”- The Reactions tab
Since 1.10shows each reaction’s succeeded and failed runs since it was last changed. - System administrators see every run, with each action’s input, output and error,
in Administration › Monitoring › Reaction Logs
Since 1.10. - A view can show reaction runs in a record’s history: turn on Reaction history in its Entry history settings.
See Check that it ran.
Worked example: Customer Support and Recruitment
Section titled “Worked example: Customer Support and Recruitment”Customer Support — seven notifications, one job each. The Customer Support tutorial adds seven reactions, all Send Notification, each tied to one moment of the workflow:
| Reaction | Event | Goes to |
|---|---|---|
| New Ticket | On Workflow Step Reached · Help Desk | Technical Support Office |
| Reply to customer | On Workflow Step Reached · Processing Ticket | Created by |
| New ticket assigned to you | On Workflow Step Reached · Processing Ticket | Assigned to |
| Review Solution | On Workflow Step Exited · Processing Ticket (Review Solution) | Technical Support Office |
| The solution has been reviewed | On Workflow Step Exited · Help Desk (Send Solution) | Assigned to |
| Ticket Resolved | On Workflow Step Exited · Help Desk (Send Solution) | Created by |
| Service Evaluation | On Workflow Step Exited · Service Evaluation (Done) | Technical Support Office |
Notice the shape: “who must act next” uses Reached; “this decision was made” uses Exited with the action. Two reactions share an event and simply run side by side — no chain is needed, because their order does not matter.
Recruitment — keeping data in step. On the Jobs entity of the Recruitment tutorial, reactions do the routine work:
- three reactions set Job status to Open, Archived or Closed, each on the workflow decision that means it — so nobody types a status by hand;
- Send a new job to review runs On Entry Created and moves the job to Job review with Move Workflow To Step;
- Close the job on its registration deadline is a Timer with Interval
type Repeat and the Cron Expression
0 9 * * *— every day at 09:00 — filtered to jobs whose Registration deadline is today, and moves each to Complete Step.
The timer shows why the filter matters: without it, every job would be closed at 09:00.
Anti-patterns
Section titled “Anti-patterns”- One mega-reaction. A reaction cannot do several things anyway; trying to fake it with scripts or functions hides the logic. Split it, and chain when order matters.
- Reacting to approvals with On Entry Updated. It never runs on a workflow move. Use the workflow events.
- Raising Loop Threshold to “fix” a loop. The loop is the bug. Narrow the filter or the watched fields so the reaction stops matching its own update.
- Reactions writing fields people also edit by hand. The two overwrite each other and nobody knows which value is real. Let one side own each field — see the status example in Request and ticket lifecycle.
- Creating records without checking for duplicates. A follow-up that runs twice creates two. Filter on “does not exist yet”.
- Nobody watching the logs. A failed reaction tells no one. Make reviewing the Reaction Logs part of the first weeks after go-live — see Pre-go-live review.
Related pages
Section titled “Related pages”Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27