Transform event
Rewrite an event inside an event flow before it is branched on or routed: set, copy, map, template, merge and append fields, for every event or only those that match a condition.
A Transform event node rewrites the event as it passes through an event flow. Every node after it works with the new values: a Branch condition tests them, and Route to alert source hands the rewritten event to the alert source.
Use it to fix an event before anyone is paged by it:
Turn a tool's own severity words into an ilert priority.
Put the environment in the summary, so the alert says where it comes from.
Add a label or a runbook link that the tool never sends.
The node is available on every account that has event flows.
Add a Transform event node
To confirm it works, send a test event to the flow and open its logs. The node's entry lists every field it changed. See Check what a node changed.

Quick start
Each chip adds one rule, which you then complete.
Prefix summary
Uses Template on context.event.summary, prefilled with [PREFIX] {{context.event.summary}}
Set priority
Uses Set value on context.event.priority
Add labels
Uses Merge properties on context.event.labels
Add links
Uses Add to array on context.event.links
Add details
Writes a table of properties into context.event.details, which holds text. ilert rejects this rule when you save. To add custom details, change Target field to context.event.customDetails and Operation to Merge properties
How the node runs
If the node has a condition, ilert evaluates it once, before any rule. An event that does not match passes through unchanged, and the log shows Skipped. A condition that fails to evaluate also lets the event pass unchanged, without a Skipped entry.
The rules run from top to bottom. Each rule sees what the rules above it wrote: a rule that reads
context.event.summarygets the summary an earlier rule rewrote.The next node gets the rewritten event.
A rule that fails does not stop the node or the flow. The log records an error that names the rule, and the next rule runs. Some mistakes are not errors and change nothing, such as copying from a field the event does not have. When a rule seems to do nothing, check the log.
Two fields can be overwritten after the node. If a Route to alert source node overrides the escalation policy or the notification priority, it replaces the routingKey or priority a transform set.
Fields you can write
Target field offers the event's own fields under Event properties, followed by the custom fields found in the sample payloads of the flow's integrations. You can also type a path.
context.event.summary, context.event.details, context.event.alertKey, context.event.routingKey
Text
Set value, Copy from field, Template, Map values
context.event.eventType
ALERT, ACCEPT or RESOLVE
Set value, Copy from field, Map values
context.event.priority
HIGH or LOW
Set value, Copy from field, Map values
context.event.severity
1 to 5, shown as SEV1 to SEV5
Set value, Copy from field, Map values
context.event.labels
Key-value pairs
Set value, Merge properties
context.event.customDetails
The event's custom payload
Set value, Merge properties
context.event.customDetails.<path>
Any value
All six, unless the path contains the name of an event field, such as severity or labels. Then the editor offers that field's operations
context.event.links, context.event.images, context.event.services, context.event.comments
Lists
Set value, Add to array
A few things to know about these fields:
Event type changes what the event does.
ACCEPTandRESOLVEact on the open alert with the same alert key instead of creating one. A value that is not an event type is skipped and logged as an error.Priority must end up exactly
HIGHorLOW, in capitals. The node writes whatever a rule produces without checking or converting it, so check your mappings. A priority the event leaves the flow with replaces the alert source's own priority setting.Severity must be a number from 1 to 5. Any other value is skipped and logged as an error.
You cannot write a single label.
context.event.labels.teamis not a valid target: Merge properties adds labels and Set value replaces all of them.Custom details paths are created as needed. Set value on
context.event.customDetails.ticket.queuecreatesticketif the event has none. Write a dot inside a key as\., as incontext.event.customDetails.k8s\.namespace, and an array position as[0]. A path can otherwise contain only the letters A to Z, digits,_and-, so a key with a space, a colon, a slash or any other character cannot be written.
Reference event fields
A value can contain references to the event in double braces, such as {{context.event.summary}} or {{context.event.customDetails.env}}. Every operation renders them. That covers the text of Set value, the target values and default of Map values, the values of Merge properties and every field of an Add to array item. References use the ilert template language, so functions work too: {{context.event.customDetails.env.upperCase()}}.
Two fields read differently from how they are written:
The alert key reads as
incidentKey. As a target,context.event.alertKeyworks. As a Source field, in a reference or in a condition, writecontext.event.incidentKey:{{context.event.alertKey}}rendersundefined, and a condition oncontext.event.alertKeymatches nothing. Source field and the condition editor offeralertKeyall the same. In the logs, the field is calledincidentKey.A field the event does not have renders as the word
undefined. A template like[{{context.event.customDetails.env}}] {{context.event.summary}}turns into[undefined] Refund queue backlogfor an event withoutenv. Give the reference a fallback withorElse:{{context.event.customDetails.env.orElse("no env")}}.
Limit the node to some events
The condition is built the same way as a Branch condition: filter groups combined with AND and OR, or ICL in the code editor. Events that do not match pass through unchanged.
ICL compares text without regard to case, so context.event.priority == 'high' matches HIGH. In event flows, != nil cannot tell you whether a field exists, because it is also true for a field the event does not have. Test for the value you expect instead, such as context.event.customDetails.env == 'prod'.
Operations
Set value
Writes a fixed value into the target. The editor adapts to the field:
Event type, priority and severity: pick a value from the list.
Text: type it, with references if you like.
Labels and custom details: a Properties table of keys and values. It replaces all labels or all custom details. To add without removing, use Merge properties.
Lists: an Items list that replaces the entire list. With no items, the list is cleared. If every item turns out invalid once its references are filled in, the list is left as it was.
A path the editor does not know, such as a custom details path: the value is text by default. Use as object and Use as array switch the editor.
Copy from field
Copies the value of Source field into the target. If the event has no such field, the target keeps its value. Into a custom details path, any value is copied, objects and lists included. Into one of the event's own fields, only text, numbers and true or false are copied, as text; an object or a list leaves the target unchanged.
Template
Composes text from fixed text and references, using the ilert template language:
Map values
Looks up the value of Source field in a table and writes the matching Target value. Matching is exact and case-sensitive: Critical does not match a row for critical. When no row matches, the rule writes Default value (when no mapping matches).
Merge properties
Adds keys to context.event.labels or to custom details. A key the event already has keeps its value: an event that arrives with the label team: web keeps web even if the rule sets team to payments. Within custom details, nested objects are merged level by level, under the same rule.
To overwrite labels, use Set value, which replaces all of them.
Add to array
Appends items to a list, creating the list if the event has none. Each kind of list has its own fields:
context.event.links
URL and Link text, both required. The URL must start with http:// or https://, and is limited to 2,048 characters; the text to 512
context.event.images
Image URL, Link URL (optional), Alt text
context.event.services
ID or Service alias. A service with the same alias as one the event already lists, or the same ID when there is no alias, is not added again
context.event.comments
Creator and Comment. Comment is required
Items can contain references. An item that is invalid once its references are filled in, such as a link whose URL renders as undefined, is skipped and logged as an error. The other items are still added.
Check what a node changed
Open the flow, click View event flow logs, and select an entry to open Event flow log details. The Transform event entry shows:
Transformed fields: each field the node changed, as before → after. Lists and objects show their type and size, such as
ARRAY (0)→ARRAY (1), and custom details show only whether they changed.Transformed event: the whole event as it left the node.
Skipped, instead, when the node's condition did not match.
Error in and the rule's name, with the reason, once for each problem. A rule that skips three items logs three errors.
If no rule changed anything, the entry has neither Transformed fields nor Transformed event.
The Incoming event entry above it can show the event as it left the Transform event node rather than as it arrived. The values the event arrived with are the "before" values under Transformed fields.
![Event flow log details for one event in the Acme Checkout normalization flow. The Transform event entry lists Transformed fields: summary from Checkout p95 latency above 2s to [prod] Checkout p95 latency above 2s, priority to HIGH, links from ARRAY (0) to ARRAY (1), and labels from NULL (undefined) to OBJECT (1). Above it, the Incoming event entry already shows the rewritten summary and HIGH priority.](https://docs.ilert.com/~gitbook/image?url=https%3A%2F%2F3394882078-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-M76ygPnS4HUcFSX8ulm%252Fuploads%252Fgit-blob-edecd99d25670f856feca44a7966a599c4c56d3f%252Fevent-flow-transform-log.png%3Falt%3Dmedia&width=768&dpr=3&quality=100&sign=ad022ccc1a4c2afd1ff8cdc9cfdf85a2&sv=3)
Example: normalize events from a monitoring tool
A tool sends its severity as a word in a custom field, puts the environment in another, and links its runbook in a third:
YOUR_INTEGRATION_KEY is the key of the API integration on the flow's Incoming event node. One Transform event node with four rules makes the event ready to route:
Priority from severity
context.event.priority
Map values
Source field context.event.customDetails.severity; critical → HIGH, error → HIGH, warning → LOW; Default value (when no mapping matches) LOW
Environment in summary
context.event.summary
Template
[{{context.event.customDetails.env.orElse("no env")}}] {{context.event.summary}}
Team label
context.event.labels
Merge properties
team → payments
Runbook link
context.event.links
Add to array
URL {{context.event.customDetails.runbook}}, Link text Runbook
The event leaves the node with these changes, and the custom details are unchanged:
Summary
Checkout p95 latency above 2s
[prod] Checkout p95 latency above 2s
Priority
none
HIGH
Labels
none
team: payments
Links
none
Runbook, pointing at https://runbooks.acme.example/checkout-latency
Limits
Rules per node
30. The editor lets you add more, but ilert rejects the node when you save
Characters in a value, template or condition
4,096
Items per Add to array rule
50
Rows per Map values table
200
Properties per Set value or Merge properties table
299, counting nested values (300 for Merge properties on labels)
Items a Set value list writes
50. Any further items are dropped when the rule runs
Last updated
Was this helpful?