Code Mode is the JavaScript transform mode inside Hooksbase Automations. It lets a project upload versioned code that runs after routing and before the final dispatch snapshot is stored.
Use Code Mode when JSONPath or Handlebars transforms are not enough:
- normalize provider payloads into a stable agent contract
- redact fields before the agent receives the event
- add derived routing-independent fields
- inspect runs, logs, and bounded result previews
Naming
The public feature is Automations. Code Mode is the runtime mode inside Automations, not the top-level product name.
Replay behavior
When Code Mode runs during delivery, Hooksbase stores the resulting dispatch snapshot. Retries and replays use that snapshot instead of executing the latest active version again.
See also: Automation, Payload transform, and Replay.
Related terms
- Automation
Versioned event-path logic that runs before a delivery reaches the destination.
Read - Payload transform
Per-webhook JSONPath extraction or Handlebars JSON template applied before dispatch.
Read - Dispatch snapshot
The transformed payload at the moment of dispatch, persisted so replays remain correct under config change.
Read - Routing rule
A priority-ordered condition that selects which destination handles an event.
Read