Skip to main content
images/morf.svg
This event source is deprecated and can no longer be selected when creating a new workflow. Existing workflows that use it keep working. New workflows should use Custom JSON Payloads instead, which exposes the same JSON under a body variable.
This is the original form of the Morf custom JSON event source. It accepts the same arbitrary JSON as the current event source, but it exposes the JSON to CEL differently: the top-level keys live under a variable named fields rather than body.

Events

  • MORF_API_PUSH_UPDATE

Accessing fields in CEL

Every key in your JSON is reachable from the fields variable with regular dot or bracket syntax, including nested objects and lists. Given the example payload on the right: There is no body variable on this event source. Likewise, fields does not exist on the current event source, so expressions are not portable between the two without renaming the root variable.

Missing keys and optionals

Accessing a key that is not present in the payload raises a no such key error rather than returning null. That is fine for action parameters, which treat a missing key as an empty value, but it will fail a filter or wait node. Use one of these forms when a key may be absent: fields.?foo is an optional value. It carries either a value or nothing, and it never errors. Call .orValue(fallback) to unwrap it with a default, or .hasValue() to test it.
JSON numbers arrive as CEL doubles because JSON has no integer type. Compare against 42.0 rather than 42 if you hit a type mismatch.