Read input, return output
Use input.event for the triggering event and input.actions for earlier outputs on this path. Return a JSON-compatible value, usually an object with named fields.
Write JavaScript directly; do not insert {{ }} templates into the script. The script cannot make network requests or access files and has one second to finish. Keep its returned output below 64 KB.
Each run starts fresh. There is no persistent state for a running total across different events; calculations are limited to the event and earlier outputs supplied to this run.
Example
This creates a concise summary while preserving amounts as text. It does not convert large token values to JavaScript numbers, which could lose precision.
return {
summary: `${input.event.value_decimal} ${input.event.token_symbol} transferred`,
link: input.event.explorer_tx_url
};Use and test the result
A later message can read {{ actions.transform_1.summary }} and {{ actions.transform_1.link }}. The output key is shown in the inspector.
Transform executes during Test run, so you can inspect its actual result. A script error, excessive runtime, or oversized output fails the action and stops the path unless Continue on error is enabled.