Tracking containment alerts: document fields in notification mail body

I set up a rule to send an email when a document contains a location (Point) that is contained in a specific area.
The rules triggers correctly the alert, but I haven't been able to add to the mail body field from the document.
The document is a json of this kind

  "_index": "index-2022.07.19",
  "_id": "2W1OFoIBvTe4_JXgv2Mc",
  "_version": 1,
  "_score": null,
  "fields": {
    "location": [
        "coordinates": [
        "type": "Point"
    "myLocation": [

I've tried the following notations:

item with id {{_source.myIDField}} entered the area at {{_source.myLocation}} 


item with id {{context.hits.0.myIDField}} entered the area at {{context.hits.0.myLocation}}

Any suggestion on how to read those field?

Thanks for any help you could provide,

are you using watcher or alerting?

Kibana Alerting

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.