Skip to main content

NodeCategory

NodeCapabilities

NodeMetadata

Client-safe metadata (no executor). Used for UI rendering.
  • type (string, required): Unique node type identifier.
  • name (string, required): Human-readable display name.
  • description (string, required): Description shown in the editor palette.
  • category (NodeCategory, required): One of action, logic, integration, transform.
  • estimatedDuration (number): Estimated execution time in seconds.
  • capabilities (NodeCapabilities): Feature flags for the node.

NodeDefinition<TInput, TOutput>

Complete node definition. Extends NodeMetadata with schemas and executor.
  • inputSchema (z.ZodSchema<TInput>, required): Zod schema for validating node inputs.
  • outputSchema (z.ZodSchema<TOutput>, required): Zod schema for validating node outputs.
  • executor (NodeExecutor<TInput, TOutput>, required): Async function that executes the node logic.

NodeExecutionContext

Passed to every node executor.
  • userId (string, required): The user running the workflow.
  • campaignId (string): Optional project/campaign context.
  • workflowExecutionId (string, required): Unique identifier for this workflow run.
  • variables (Record<string, unknown>, required): All workflow variables (includes upstream node outputs).
  • resolveNestedPath ((path: string) => unknown, required): Resolve dot-notation paths like contact.email against variables.
  • services (NodeServices): Injected service implementations.

NodeExecutionResult<TOutput>

Returned by every node executor.
  • success (boolean, required): Whether execution succeeded.
  • output (TOutput): The node’s output data (must match outputSchema).
  • error (string): Error message if success is false.
  • nextNodeId (string): For conditional branching, which node to execute next.
  • needsApproval (NodeApprovalRequest): Request human approval before continuing.
  • notification (object): Emit a notification with title, message, and optional data.

NodeExecutor<TInput, TOutput>

NodeApprovalRequest

BaseNodeConfig / Approval / Notifications

Optional config any node can include:

NodeServices

All optional. Host applications inject implementations via context.services.

Service Interfaces