Custom Scripts & Flows
Two ways to automate work beyond what a form and an approval chain can do on their own.
Custom Scripts
A Custom Script is a small piece of Python code, stored in the platform and run automatically at a specific point in a smarttable's lifecycle — no separate deployment, no server access needed. Use it when a form field, a formula, or an approval step isn't enough: sending a message to an external system, running a calculation too complex for the Formula Engine, or generating data from another smarttable on the fly.
When a script runs (hook points)
| Hook | Runs |
|---|---|
| Before Save | Just before an entry's data is written — can modify or reject the save |
| After Save | Right after an entry is saved |
| Before Submit | Just before an entry is submitted |
| After Submit | Right after an entry is submitted |
| Before Display | Just before an entry's Display/Print/PDF view is rendered — can inject computed values |
| After Get Entries | Right after the entries table is fetched — can post-process the list |
| Notification Action | When a user takes action (approve/reject) on a notification |
| Scheduled / Cron | On a recurring schedule, independent of any entry being saved — for periodic sync/cleanup jobs |
What a script can do
Scripts run against a controlled API, not raw database access:
- Read/write smarttable data — query and update entries in this or other smarttables
- Send notifications — trigger the same in-app/push notification system described on the Notifications page
- Call external services — make HTTP requests out to another system
Where to manage scripts
Scripts are written and tested in a dedicated in-app code editor (a full syntax-highlighted Python editor, not a plain textarea) — accessible to System Admins from the admin tools menu. Each script can be run manually as a one-off test before being wired to a hook point.
Flows
Flows are a no-code, drag-and-drop way to automate a sequence of steps — build it visually as a flowchart instead of writing code. Use a Flow when you need "when X happens, do Y, then Z" without wanting to write a Custom Script for it.
How a Flow works
- Pick a trigger — what starts the flow. Supported today: a record being created or updated on a chosen smarttable, run manually, or triggered by an incoming webhook.
- Add nodes on the visual canvas — each node is one step (e.g. send a notification, update a field, branch on a condition).
- Connect the nodes in the order they should run, including branches for different conditions.
- Publish the flow to make it live. A published flow can be paused and resumed at any time without losing its configuration.
Reviewing runs
Every time a flow runs, it's logged as a Run with a full step-by-step record of what each node did — useful for confirming a flow behaved as expected, or diagnosing why it didn't. Runs that include an approval-style step pause and wait for a person to act, the same way a notification-driven approval does elsewhere in the platform.