Created
August 22, 2020 01:57
-
-
Save iaindooley/4502c581c67275ffd6bdfb821dc73fe3 to your computer and use it in GitHub Desktop.
Extract email information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function extractEmailInformation(notification) | |
{ | |
var created = new Notification(notification); | |
//eg. using BenkoDesk, card title is like: | |
//From Name <user@example.org> "Subject" | |
if(/.+ <(.+)> "(.+)"/.test(created.name()) | |
{ | |
created.setCustomFieldValue("Email",parts[1]); | |
created.setDue(Trellinator.parseDate(parts[2])); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment