Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created August 22, 2020 01:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/4502c581c67275ffd6bdfb821dc73fe3 to your computer and use it in GitHub Desktop.
Save iaindooley/4502c581c67275ffd6bdfb821dc73fe3 to your computer and use it in GitHub Desktop.
Extract email information
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