Skip to main content

webhooks.foreach

Iterates over an array of objects and processes an output based on each element in the array. Works similarly to JavaScript's forEach method.

NameTypeDefaultDescription
foreachOptionalobject-An object that contains the foreach properties.

foreach Properties

NameTypeDefaultDescription
appendRequiredstring-The values to append to the output_key.
Properties from the object can be referenced and added to the output_key by using the following syntax: %{this.property_name}.
The this keyword is used to reference the current object in the array.
input_keyRequiredstring-The key to be used to access the current element in the array.
maxOptionalnumber-The max amount of elements that are iterated over in the array. This will start at the beginning of the array.
output_keyRequiredstring-The key that can be referenced in the output of the foreach iteration. The values that are stored from append will be stored in this key.