Skip to main content
A Signal<T> is a typed reference to a value that will materialize during execution. Triggers and actions return signals immediately while Automate.ax obtains their concrete values later. Signals are not promises. Do not await them.

Access properties

Property access creates another signal:
This is shorthand for deriving those properties after email materializes. Chained access works across objects and primitive properties.

Transform values

Use .transform() for calculations that need the concrete value:
Transform functions are pure computations. Automate.ax records their input signals during composition and invokes them only after those values are available. Use the top-level transform function when one result depends on several signals:

Interpolate strings

Use the t tagged template to combine text and signals without resolving them early:
The result is a Signal<string> that depends only on the signals interpolated into the template.

Connect actions

Every action input accepts either its ordinary TypeScript value or a compatible signal. Passing a signal creates a durable dependency:
markAsRead becomes ready only after the search succeeds and its transform produces the message IDs.

Execution order

Signal dependencies—not line order—control readiness.
star and addLabel can execute independently. archive waits for addLabel because it consumes labeled; it does not wait for star.

Conditional paths

Use filter to keep a value only when it matches a predicate, or branch when two different sections should depend on a boolean signal:
Automate.ax still traverses the code deterministically, but only the selected signal path materializes during execution.

Closure and failure

A signal can emit a value, close without one, or fail. Ordinary dependent signals and actions propagate closure or failure instead of executing with a missing value. The closed(signal) and failed(signal) helpers expose those outcomes when an automation needs an explicit recovery path.
Generic JavaScript methods reached through signal property access can lose precise generic inference. Use .transform() when TypeScript reports an imprecise result such as Signal<unknown[]>.