Tools – Set Variables

Estimated reading time: 3 min

This tool allows you to define, modify, and reuse data dynamically within your Flow.

Variables serve as temporary or persistent storage for values generated during execution. They can be referenced in later steps, combined with text, used in conditions, or processed by Wiresk Functions for calculations and transformations.

The Variables feature is available starting from the Essential Plan and above. Users on lower plans will not see this tool in the Flow Builder.

When to use

Use Set Variables when you need to:

  • Store dynamic data (for example, company names, URLs, or numeric values).
  • Pass data between Methods within a Flow.
  • Maintain counters, totals, or identifiers.
  • Combine stored data with functions for logic and computation.

Each variable consists of a key (its name), a value (its content), and configuration options that define how it behaves and where it’s accessible.

Input Options (Field Mapping):

  • Input: Allows dynamic inputs, e.g., from a Trigger or from Step responses. Input tab>uncheck “Show recommended” to see all fields).
  • Default Value: Select value from a defined list or specify a fixed attribute.
  • Manual input: Set a custom value by using the Lightning Bold feature (⚡ icon).

(*) required field

NameInternal label for this tool within your Flow.

MAP FIELDS

Set Variables

⊕ Element Map

(Add a repeating group of fields or Map it from an array. See Mapping Arrays).

Element 1: Represents the first variable.

Key

The variable name you want to create.

Value

The data assigned to the variable, mapped or entered manually.

Scope

Defines how long and where the variable is available. Refer to the scopes table.

Operation

Defines what Wiresk does with the variable (set, increment, decrement, etc.). Refer to the operations table.

Type

Defines the data type stored in the variable. Refer to the data types table.


ScopeDescriptionLifetime & AccessibilityTypical Use
ProcessExists only during the current Flow run. Cleared after the Flow finishes.Temporary (per run)Pass values between steps in the same execution.
FlowPersistent variable specific to one Flow. Retains values across multiple runs.Persistent (Flow-level)Store record counters or last processed IDs.
EnvironmentGlobal variable accessible by all Flows in the same environment.Persistent (Global)Store shared constants like tokens or URLs.

OperationDescriptionExample
Set variableCreates or updates the variable value.CompanyName = "Wiresk"
IncrementAdds 1 to a numeric variable.Counter = Counter + 1
Increment by valueAdds a specific number.Counter = Counter + 5
DecrementSubtracts 1 from a numeric variable.Stock = Stock - 1
Decrement by valueSubtracts a defined number.Stock = Stock - 10

TypeDescriptionExample
StringText value."CompanyName" = "Wiresk"
IntegerWhole number.OrderCount = 25
FloatDecimal number.Price = 49.99
Boolean (Yes/No)True or false value.IsActive = true

Variables are referenced manually in the format:

variables.{type}.{key}
ComponentDescriptionExample
variablesFixed prefix identifying variable references.variables
{type}Variable scope (process, flow, environment, or flow_environment).variables.process
{key}The key name created in the Set Variables step.variables.process.CompanyId

When inserting variables in another step, Wiresk uses dynamic mapping fields:

  1. Next to the field name, click the ⚡ lightning icon (it supports dynamic mapping).
  2. Type @ (this opens the dynamic mapping popup).
  3. In the popup, switch to the Manual tab.
  4. Enter your variable in the format: variables.{type}.{key} Example: variables.process.CompanyId
  5. Click Confirm to apply it.
  6. Open the gear icon (⚙️) next to the field name and set the mode to String interpolation.
    This ensures Wiresk interprets the variable dynamically during Flow execution.

When a field supports dynamic input, Wiresk lets you define how the value should be interpreted.

ModeDescriptionWhen to Use
DefaultReads static text or mapped values directly.Use for standard field mappings.
String interpolationAllows text mixed with dynamic values like variables.Use when typing variables.process.CompanyId.
Formula interpolationEvaluates Wiresk Core Functions or calculations that include variables.Use when combining variables with functions, e.g., =round({variables.process.Price}).

You can combine Variables with Functions when a field is set to Formula interpolation.

Syntax

=function({variables.{type}.{key}}

Example:

Suppose you created a variable in a previous step:

  • Key: key
  • Value: 1.4
  • Type: Float
  • Scope: Process

To round it using the Wiresk round() function:

  1. In the target field, type @ to open the dynamic mapping popup.
  2. Go to the Manual tab and enter: variables.process.key
  3. Click Confirm.
  4. Open the gear icon (⚙️) and select Formula interpolation.
  5. Enter the formula: =round({variables.process.key})

Wiresk reads the float value 1.4 from the variable and returns 1 when executed.

Examples with other functions:

upper(variables.process.CompanyName)
concat("https://", variables.process.Domain)
add(variables.flow.SalesCount, 5)

These examples:

  • Convert text to uppercase.
  • Concatenate static text and a variable.
  • Increment a Flow-level counter by 5.

Reference: Wiresk Core Functions

In this example, the Method Select (purpose: Check if the row record already exist) reads data from a MySQL table and uses a variable for filtering records.

Configuration:

  • Method: Select
  • Custom name: Check if the row record already exist
  • Entity: enriched_leads (from Kuration AI)
  • Matching Criteria: website_url Equals variables.process.CompanyWebsite

How it works:
This Method queries the enriched_leads table and checks whether a record exists where the field website_url matches the value stored in the CompanyWebsite variable.

The variable CompanyWebsite must have been defined earlier in the Flow using the Set Variables tool (Scope: Process).

Field setting:
Make sure the Matching Criteria field is set to String interpolation, so Wiresk resolves variables.process.CompanyWebsite dynamically at runtime instead of treating it as plain text.