I’m trying to make an applescript that runs when I receive a mail from my local library. I get an confirmation that I’ve lent a book and when it should be returned.
I then want the script to get the title and date that is stated in the mail and then add a todo in Things 3 with the date as due date and also a scheduled date for 1 week earlier. And also the title of the book as the title of the todo.
I’ve been looking around for something like it but can’t really get it to work, the problem it to extract the information from the mail itself.
The mail looks like this
I want the script to take the title from “Titel:”
And the due date from “Återlämningsdatum:”
2017-03-22 18:43:55
MALMÖ STADSBIBLIOTEK
Stadsbiblioteket
Låntagarnummer: **********
Utlån
They are unfortunately using mail to Things so it doens’t support any due dates or schedules. It just appears in my Things inbox instead. So that doesn’t really do what I want to do.