How to use JEXL in Peaka

Click here to see a detailed description of how to use JEXL in Peaka

Javascript Expression Language: Powerful context-based expression parser and evaluator.

In Peaka, JEXL empowers you to assign dynamic values to flows while seamlessly integrating with variables. This versatile feature extends to all property values, and for added convenience, you can access an expanded editing interface by simply clicking the arrow icon located on the right side of the property field.

Even properties typically represented as simple checkboxes can be transformed into JEXL editors with a single click of the expand icon button. Below, we present a selection of common examples demonstrating the practical application of JEXL:

Examples

  // addition
  {{sum(45, 99)}}
  // => 144

  // show name
  {{ "Hello " + my_name_variable}}
  // => 'Hello Can'

  // alternatively
  Hello {{ my_name_variable }}
  // => 'Hello Can'

  // convert the date
  {{convertLocaleDateString("Tue Aug 15 2023 10:23:41", "de",{
      weekday: "long",
      year: "numeric",
      month: "long",
      day: "numeric",
    })
  }}
  // => Dienstag, 15. August 2023
using-jexl-1

Using Variable in Webhook Response Flow Node

The webhook response flow node is designed to return a JSON object when you send a request to an external API. This functionality allows you to dynamically retrieve and integrate data into your workflows.

To include a variable in the body of the webhook response flow node, simply enclose the variable name within double curly braces, as demonstrated in the example below:

{{ getRecord_1 }}

In addition, we can easily access the value associated with the key 'name' in the object.

{{ getRecord_1.name }}

Please refer to the documentation on Flows for detailed instructions.

using-jexl-1
success-mail-img

You've joined our email list. Our newsletter will be delivered to your inbox every other week, with news from Peaka and the no-code world, as well as updates on the latest trends and developments in the data integration space!

success-mail-img

Thank you for your interest. We'll contact you soon.