FlowDSL Node Catalog
JSON → Event
Map an arbitrary JSON document to one of the system's declared events using configurable field mappings.
Overview
| Property | Value |
|---|---|
| Node ID | redelay/json-to-event |
| Kind | transform |
| Module | events-flowdsl |
| Repo | go-flowdsl |
| Module ref | events |
| Handler | github.com/redelay/go-flowdsl/nodes.JSONToEvent |
| Icon | lucide:wand-2 |
| Color | #8b5cf6 |
| Tags | json, 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
errorport - when
publishis true, the transformed event is Published on the bus in addition to being emitted on theeventport - 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
| Property | Type | Required | Default | UI Group | Description |
|---|---|---|---|---|---|
actorID | string | — | json-to-event | Event | Actor ID set on the emitted event when not overridden by mapping. |
actorType | string (system|user|service|external) | — | external | Event | Actor type set on the emitted event when not overridden by mapping. |
eventName | string () | yes | — | Event | The Redelay event to construct. Populated at runtime from the module registry. |
mapping | object | yes | map[] | Mapping | Object 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. |
publish | boolean | — | false | Delivery | When true, the constructed event is published on the bus in addition to being emitted on the output port. |
strict | boolean | — | true | Delivery | When 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