Workflow parameters

Variables

Variables allow you to select data within your workflow. There are two types of variables: global variables and special variables.

  • Global Variable Selector: allows you to select workflow-wide variables such as Begin step inputs and Action step outputs. You are also able to select values such as NOW (a variable timestamp for when the node is being executed), Null, True, and False.

  • Special Variable Selector: This allows you to select variables from a nested array. Special variables need to be used within array manipulation tools.

Constant and Calculated Values

  • Number: A static number or formula. You can use {} to input variable parameters into a formula. Click + Parameter to add new parameters. The order of the parameters matches up with the order of {} entered in the formula. For example, to convert a value from cents to dollars, your number formula would look like this: {}*0.01.

  • Text: A static string or a string with variable inputs. You can use {} to input variable parameters. Click + Parameter to add new parameters. The order of the parameters matches up with the order of {} entered in the string. For example, to insert someone's first name in a string, your text would look like this: Hello {}, Thank you for being a customer! See Text Manipulation

  • Boolean: A value of true or false.

  • Null: A null value.

Flow Control

Flow controls allow you to build out decision logic within Decision steps and Action steps.

  • If: Creates a boolean statement with a left and right comparison.

  • And: Groups together IF statements where all need to be true to pass.

  • Or: Groups together IF statements where only one needs to be true to pass.

  • Switch: Allows you to build "if, then, default" logic where there is a condition tested and an output based on whether a condition is met.

IF statements and SWITCH statements are operated on in top-down order.

Dates and Datetimes

  • Date: A date value.

  • Datetime: A timestamp with a timezone (defaults to your local time).

  • Timedelta: To be inserted in a number parameter. This allows you to define a value of milliseconds, microseconds, seconds, minutes, hours, days, and weeks to be added or subtracted from a date or datetime.

  • Format Date or Datetime: Allows you to insert a date or datetime and the format you'd like it to be converted to.

  • Create Datetime from String: Allows you to insert a string representation of a datetime and format it how you'd like.

  • Convert Timezone of Datetime: Allows you to insert a datetime and convert it to a designated timezone.

Refer to this article for timezone codes: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Text Manipulation

Text manipulation parameters can be added before a text variable or text constant.

  • Left Strip: Allows you to specify characters to strip from the left side of a string.

  • Right Strip: Allows you to specify characters to strip from the right side of a string.

  • Strip: Allows you to specify characters to strip from the leading and trailing ends of a string.

  • Splitlines: Splits a string into an array of strings on the newline character. This enables text lists that can then be used as arrays or used in simple comparison. Split lines only enable exact comparisons. If used in the right comparison, use an "Includes" comparison. If used in the left comparison, use a "Contains" comparison. Strips whitespace from the leading or trailing ends of each line.

  • Uppercase: Converts a string to all uppercase.

  • Lowercase: Converts a string to all lowercase.

  • Capitalize: Converts a string so that the first letter is uppercase and the rest is lowercase.

Array Manipulation

An array is a data structure that stores a list of elements, typically of the same type, where each element is accessible by an index. Middle is able to accommodate arrays within synced data and Action inputs and outputs.

An example of an array is a list of line items in an invoice. This list of line items would appear as an array, along with other fields in the invoice, such as the invoice ID and sale date.

When arrays are involved in your data you will need to use array manipulation parameters to parse out the data you need. Array manipulation tools can be used together to perform multiple functions to an array.

Array manipulation tools often user Special Variables to access array objects.

  • Map Array: Allows you to take an array and map it into a new object or array of objects.

  • Reduce Array: Allows you to take an array and output a single text or number value. Accommodates accumulation so that you can add up numbers or compile strings from multiple array objects.

  • Filter Array: Allows you to filter an array based on decision criteria. This criteria is applied to each object in the array.

  • Sort Array: Allows you to sort an array's objects based on field within the array. Reversing the sort with a date or datetime will sort the array from newest to oldest.

  • First Match in Array: Allows you to output a value from either the first object in the array or the first object in the array that matches the defined criteria.

  • Count Array: Counts the objects in a array. When used in conjunction with an array filter this allows you to know if and how many objects in the array meet the filter criteria.

  • De-duplicate Array: De-duplicate an array based on an array field.

Advanced Parameters

Advanced parameters are most often used in the context of an action, such as an action that passes in an array of objects. You can also use advanced parameters to create lists of values, such as a list of strings to use within array manipulation.

  • Construct Object: Create a new object (typically an object that's defined within an action).

  • Construct Array: Create a new array.

Special

Controls to delete, move, and duplicate parameters.

  • Move Child Back: Move a parameter and all its children up

  • Move Child Forward: Move a parameter and all its children down

  • Insert Sibling Node Parameter Before: Insert a new parameter above the selected parameter

  • Insert Sibling Node Parameter After: Insert a new parameter below the selected parameter

  • Duplicate to Sibling Node Parameter Before: Duplicate the selected parameter above the selected parameter

  • Duplicate to Sibling Node Parameter After: Duplicate the selected parameter after the selected parameter

  • Insert Parent Node Parameter Above: Insert a new parameter on top of the selected parameter

  • Delete: Delete the selected parameter

  • Delete this and all its children: Delete the selected parameter and all its children

Last updated

Was this helpful?