AsStringJSON

The AsStringJSON action converts a value into a JSON-formatted string. This is useful when you need to ensure a value is properly formatted as a JSON string, such as when building JSON objects or payloads dynamically.

AsStringJSON(
    val: str
)

Where:

  • val: The value to convert into a JSON string.

Example

{{Set(name="email", value=AsStringJSON(val=Concat("bookings+", "12345", "@newo.ai")))}}

{{SendMessage(message=email)}}
"[email protected]"

The above code snippet converts the concatenated string into a JSON-formatted string representation.