Skip to main content

Module map

Module map 

Source
Expand description

Map operator — transforms the payload via Tera templates

The map operator takes a JSON template where string values can contain Tera expressions (e.g., {{ owner.name }}). At execution time, the FlowContext variables are injected into the Tera context and each string value is rendered as a template.

The rendered result is stored as the _payload variable in the context, which is then used by the deliver operator to send to sinks.

- map:
    template:
      title: "{{ owner.name }} started following you"
      body: "You have a new follower!"
      icon: "follow"
      data:
        follower_id: "{{ source_id }}"

Structs§

MapOp
Compiled map operator