Watcher: Conditional in Actions block?

I'm sure I've seen this functionality in an example somewhere recently (maybe X-Pack examples?) but I can't seem to find it:

Is it possible to place a simple conditional in the Actions block, something like

if(businessHours){"notify-slack":      "slack": {
        "message": {
          "to": [
            "#day-channel"
          ],
}
} else if(onCallHours){"notify-slack":      "slack": {
        "message": {
          "to": [
            "#on-call-channel"
          ],
}
}

And can anyone point me to examples where it's used?

Hey,

there is an example (the second one on the page) at the action overview page https://www.elastic.co/guide/en/x-pack/5.6/actions.html

We need to work on docs there and outline this feature better. Sorry for the confusion!

--Alex

Ah awesome, thank you! Don't know how I missed that!

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