Hi all,
I am having a bit of trouble with the email action. Here's my .yml config
xpack.notification.email.account: outlook_account: profile: outlook smtp: auth: true starttls.enable: true host: smtp-mail.outlook.com port: 587 user: user@domain password: *****
Here is my code in watcher
{
"trigger": {
"schedule": {
"interval": "10s"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"myindex"
],
"types": [],
"body": {
"size": 0,
"query": {
"query_string": {
"query": "Date:[* TO now-7d]"
}
}
}
}
}
},
"condition": {
"compare": {
"ctx.payload.hits.total": {
"gte": 0
}
}
},
"actions": {
"send_email": {
"email": {
"account": "outlook_account",
"profile": "outlook",
"to": [
"Name <user@domain>"
],
"subject": "Possible Malfunctioning Codes",
"body": {
"text": "There are {{ctx.payload.hits.total}} codes that have not checked in in the last 7 days."
}
}
}
}
}
And here is the error I have
"id": "send_email", "type": "email", "status": "failure", "reason": "IllegalArgumentException[no account found for name: [outlook_account]]"
I saw this thread: Automated Report Failing and it has the exact same issue as I do but I can not replicate his success with the same steps. I am worried I am somehow doing something wrong in the .yml. Please help!
Thanks!