Using Parameters & Dynamic Data
Using Parameters and Dynamic Data
Parameters are the core of how workflows interact with data. They allow each task (or node) in your workflow to receive input — whether it's hardcoded, calculated on the fly, or passed in from earlier steps.
What Is a Parameter?
A parameter is a piece of information passed into a task handler or routine. It’s how a node knows what to act on. For example, which submission to update, which user to notify, or what ID to retrieve.
You can pass parameter values in a few different ways:
- Static values (e.g., fixed strings or numbers)
- Dynamic values calculated at runtime
- Values returned from previous nodes
- Combinations of the above using Embedded Ruby
Parameters can be configured using the low-code parameter selector or by writing Embedded Ruby (ERB) directly. The examples below focus on ERB so you understand what's happening behind the scenes, even when using the low-code experience.
Example: Dynamic Submission Value
Let’s say you have a question on a form called First Name. You want to pass that value into an email handler. You’d use:
<%= @values['First Name'] %>This tells the workflow engine to inject the value of the First Name field from the triggering submission.
Embedded Ruby (ERB) Format
Embedded Ruby allows you to mix static text with dynamic logic. When using the low-code parameter selector, the platform generates these expressions for you automatically. You can always switch to manual editing if needed.
"Hello, <%= @values['First Name'] %>!" This would output something like:
Hello, Jordan!
You can use any valid Ruby expression, including conditional logic, string manipulation, and calculations.
Common ERB Inputs
| ERB Variable | Description |
|---|---|
@values['Question'] | Answer to a form question |
@submission['id'] | Metadata about the triggering submission |
@user['username'] | Username of the triggering user (if applicable) |
@form['name'] | Name of the form being submitted |
@space['slug'] | Identifier of the space where the event occurred |
@result['someKey'] | Output from a previous node |
Kinetic Platform Source Parameters
When a workflow is triggered by a Kinetic Platform source, these predefined parameters are automatically available:
- Event – The action that triggered the workflow (e.g.,
Submitted,Updated) - Form – Information about the form
- Form Attributes – Custom metadata attached to the form
- Kapp – The kapp name and slug
- Kapp Attributes – Metadata specific to the kapp
- Space – Space name and slug
- Space Attributes – Space-level metadata
- Submission – Submission details, such as ID and timestamps
- Submission Previous – The prior version of the submission (when available)
- Values – Answers to form questions
- Values Previous – Previous submission answers (when available)
Pro Tip: Combine Static and Dynamic Text
Need to build a dynamic subject line?
"Ticket for <%= @values['First Name'] %> – Submitted on <%= @submission['createdAt'] %>"Best Practices
- Use clear question names and avoid special characters in form fields when referencing them in ERB
- Test dynamic values thoroughly using the Runs tab and sample submissions
- Use
.nil?and.empty?to guard against missing values - Combine static and dynamic data for better context in integrations and notifications
What’s Next?
Updated 7 months ago
