Timill Platform Documentation

Scripts

Backend scripts, scripted widgets and charts.

Scripts let you automate workflows and extend group behavior with code that runs on the server. Two engines are available: JavaScript and Gonja (a Jinja2-style template language).

Creating a script#

From the scripts section, create a script, choose the engine, and write your logic in the built-in code editor.

Triggers#

A script runs based on its trigger:

  • Manual — run on demand.
  • Schedule — run on a recurring cron schedule.
  • Event — run when something happens in the group (e.g., an item is created, updated, or deleted).
  • Save hook — run as part of saving an item, for example to validate or adjust field values before they are stored.

Scripted widgets and charts#

Scripts can also power custom scripted widgets and scripted charts on pages and dashboards, producing the data (or chart configuration) that the widget renders.

Secrets#

Scripts can reference group secrets (API keys, tokens) by name without exposing the raw value in code. Manage them in the Secrets section.

Tips#

  • Use a save hook for validation and computed fields so the rules apply no matter how an item is edited.
  • Keep credentials in Secrets and reference them by key — never hard-code keys in a script.