Custom Scripts & Flows

Two ways to automate work beyond what a form and an approval chain can do on their own.

ℹ️ Who is this for? Both features here are configuration/admin-level tools, not something every user touches day to day. Custom Scripts require writing Python; Flows are no-code but are still set up by a System Admin or SmartTable Admin, not an end user filling in entries.

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)

HookRuns
Before SaveJust before an entry's data is written — can modify or reject the save
After SaveRight after an entry is saved
Before SubmitJust before an entry is submitted
After SubmitRight after an entry is submitted
Before DisplayJust before an entry's Display/Print/PDF view is rendered — can inject computed values
After Get EntriesRight after the entries table is fetched — can post-process the list
Notification ActionWhen a user takes action (approve/reject) on a notification
Scheduled / CronOn 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
⚠️ Scripts run with real access A script can read and write real data and call out to external systems. Only System Admins can create or edit scripts, and every run is logged. Treat script authorship the same as any other trusted-code change — review it before it goes live.

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

  1. 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.
  2. Add nodes on the visual canvas — each node is one step (e.g. send a notification, update a field, branch on a condition).
  3. Connect the nodes in the order they should run, including branches for different conditions.
  4. 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.

💡 Custom Script vs. Flow — which one? Reach for a Flow first — it's visual, no code, and covers most "when this happens, do that" automation. Drop down to a Custom Script only when you need something a Flow's node types can't express, like a bespoke calculation or a call to an external API with custom logic.