Skip to main content

core.transform.reshape

Define the exact scalar, object, or list output you want from workflow data.
core.transform.reshape evaluates expressions anywhere in the input value. Use it to extract fields, rename keys, hardcode values, and compose new objects or lists from trigger data and earlier actions.

Inputs

value
any | array[any] | object
required
The value to reshape

Examples

Return one value
- ref: extract_owner_email
  action: core.transform.reshape
  args:
    value: ${{ ACTIONS.get_alert.result.data.owner.email }}
Build a new object or list
- ref: build_summary
  action: core.transform.reshape
  args:
    value:
      alert_id: ${{ TRIGGER.alert_id }}
      severity: ${{ TRIGGER.severity }}
      owner: ${{ TRIGGER.owner.email }}
      labels:
        - triage
        - security
Use expressions and functions inline
- ref: normalize_alert
  action: core.transform.reshape
  args:
    value:
      id: ${{ TRIGGER.alert_id }}
      title: ${{ TRIGGER.title || "Untitled alert" }}
      severity: ${{ FN.lowercase(TRIGGER.severity) }}
      source_ip_version: ${{ FN.check_ip_version(TRIGGER.source_ip) }}
      created_at: ${{ FN.to_isoformat(TRIGGER.created_at) }}