FlowDSL Node Catalog

JSON → Event

Map an arbitrary JSON document to one of the system's declared events using configurable field mappings.

Overview

PropertyValue
Node IDredelay/json-to-event
Kindtransform
Moduleevents-flowdsl
Repogo-flowdsl
Module refevents
Handlergithub.com/redelay/go-flowdsl/nodes.JSONToEvent
Iconlucide:wand-2
Color#8b5cf6
Tagsjson, transform, mapping, event, publish

Description

Consumes a JSON document from an upstream node and transforms it into a typed Redelay event, optionally publishing it to the event bus.

Mapping rules are expressed as JSONPath-style key/value pairs:

text
{
  "entity_id":      "$.customer.id",
  "payload.email":  "$.customer.email_address",
  "payload.status": "$.status || \"pending\""
}

The eventName setting selects the target event — its payload schema is resolved from the live AsyncAPI spec so Studio can validate mappings.

Behaviour:

  • missing required payload fields → emitted on the error port
  • when publish is true, the transformed event is Published on the bus in addition to being emitted on the event port
  • timestamp/correlation_id/actor are auto-populated if not mapped

Inputs

  • message — The source JSON document to transform.

Outputs

  • event — The constructed Redelay event envelope.
  • error — Emitted when the mapping fails (missing required fields, invalid JSONPath, etc.).

Settings

PropertyTypeRequiredDefaultUI GroupDescription
actorIDstring—json-to-eventEventActor ID set on the emitted event when not overridden by mapping.
actorTypestring (system|user|service|external)—externalEventActor type set on the emitted event when not overridden by mapping.
eventNamestring ()yes—EventThe Redelay event to construct. Populated at runtime from the module registry.
mappingobjectyesmap[]MappingObject mapping target event fields (dotted paths on the envelope, e.g. payload.email, entity_id) to JSONPath expressions on the input document. Use || for a literal fallback value.
publishboolean—falseDeliveryWhen true, the constructed event is published on the bus in addition to being emitted on the output port.
strictboolean—trueDeliveryWhen true, missing required payload fields produce an error packet instead of a partial event.

Example

yaml
# Use this node in a flow:
nodes:
  - id: my_step
    name: My Step
    kind: transform
    action_ref: redelay/json-to-event
    config:
      actorID: json-to-event
      actorType: external
      eventName: "value"
      mapping: {}
      publish: false
      strict: true