From 4db6c923685d70c2e26e42851c712644d1a46fda Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Tue, 28 Mar 2023 22:50:43 +0200 Subject: [PATCH] Add date header to imap custom event data (#26769) --- source/_integrations/imap.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/_integrations/imap.markdown b/source/_integrations/imap.markdown index 3ce6e534263..7a769bb4daa 100644 --- a/source/_integrations/imap.markdown +++ b/source/_integrations/imap.markdown @@ -71,6 +71,8 @@ sender: description: The `sender` of the message subject: description: The `subject` of the message +date: + description: A `datetime` object of the `date` sent headers: description: The `headers` of the message in the for of a dictionary. The values are iterable as headers can occur more than once. @@ -96,6 +98,7 @@ template: Search: "{{ trigger.event.data['search'] }}" Folder: "{{ trigger.event.data['folder'] }}" Sender: "{{ trigger.event.data['sender'] }}" + Date: "{{ trigger.event.data['date'] }}" Subject: "{{ trigger.event.data['subject'] }}" To: "{{ trigger.event.data['headers']['Delivered-To'][0] }}" Subject: "{{ trigger.event.data['headers']['Subject'][0] }}" @@ -108,7 +111,7 @@ template: ## Example - keyword spotting -The following example shows the usage of the IMAP email content sensor to scan the subject of an email for text, in this case, an email from the APC SmartConnect service which tells whether the UPS is running on battery or not. +The following example shows the usage of the IMAP email content sensor to scan the subject of an email for text, in this case, an email from the APC SmartConnect service, which tells whether the UPS is running on battery or not. {% raw %}