Activate contextual add-ins using regex based on headers in Outlook

Activate contextual add-ins using regex based on headers in Outlook
2

Upvotes

Upvote

 Sep 24 2021
0 Comments 
New

Contextual Outlook add-ins ItemHasRegularExpressionMatch only supports examining the Body and the Subject to determine if they should be activated.

https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/contextual-outlook-add-ins

(Other activation methods such as ItemIs, ItemHasAttachment, ItemHasKnownEntity do not allow examining the headers either).

 

It would be useful to have the ability to trigger contextual add-ins based on headers in the email also. On a match being found the add-in would provide the ability to insert a customized chunk of text to the body of the email to get user attention and provide some supplemental information to the email.

 

Example Use Case

User works in sales with multiple customers. User receives an email from an external customer. The email gets marked with a header "X-Customer: Coso Inc" before being sent to user inbox. Contextual add-in sees this header when user is browsing their Inbox and inserts text to start of email with a link to Customer profile information for convenient lookup.

 

"Email from customer: Coso Inc, click here for customer details".

* Inserted to top of email body in Read mode by add-in match.