Other Steps

Steps for sending emails, adding delays, executing sub-flows, custom code, and emitting events.

Other Steps

Additional step types for email, timing, sub-flows, raw code, and event-driven patterns.

Send Email

Sends an email using a configured email addon (SMTP or a provider like SendGrid).

To: vars.user.email
Subject: 'Your order #' + vars.order.id + ' has been confirmed'
Body: '<h1>Order Confirmed</h1><p>Thank you for your purchase!</p>'

The email addon must be installed and configured before using the Send Email step. See the Send Emails guide for setup instructions.

Sleep/Delay

Pauses flow execution for a specified duration. Useful for rate limiting, retry delays, or timed sequences.

Duration: 2000

This pauses the flow for 2 seconds before continuing to the next step.

Execute Flow

Calls another flow as a sub-flow, passing data in and receiving a result back. This enables modular flow design by breaking complex logic into reusable pieces.

Flow: validateOrder
Input: { items: vars.cartItems, userId: vars.userId }
Assign To: validationResult

Custom Code

Executes raw JavaScript code within the flow. Use this for logic that cannot be expressed with the built-in steps.

// Access variables, request, and environment
const items = vars.cartItems;
const total = items.reduce((sum, item) => sum + item.price * item.qty, 0);
const tax = total * 0.08;
return { subtotal: total, tax, total: total + tax };

Custom Code steps cannot be converted back to visual steps. Prefer built-in steps when possible to maintain full visual editing capability.

Emit Event

Emits a named event that can be consumed by event listeners, WebSocket channels, or other flows subscribed to the event.

Event: order.created
Data: { orderId: vars.order.id, userId: vars.userId }
Channel: 'user_' + vars.userId
Recipient email address or array of addresses.
Email subject line.
Email body content. Supports HTML.
Sender email address. Defaults to the addon configuration.
CC recipients.
BCC recipients.
Reply-to email address.
Time to wait in milliseconds.
The name or ID of the flow to execute.
Data to pass as input to the sub-flow. Accessible as `input` in the target flow.
Variable name to store the sub-flow return value.
JavaScript code to execute in the managed Spala runtime. Use documented flow variables like `input`, `params`, `query`, `headers`, `vars`, and `env`.
Variable name to store the return value of the code.
The event name to emit.
Data payload to include with the event.
Optional channel to scope the event to specific WebSocket subscribers.
Steps Reference
/reference/steps
Browse all step categories
Event Triggers
/triggers/event-triggers
React to emitted events with trigger flows
Background Tasks
/tasks/background-tasks
Run sub-flows asynchronously