I have been looking to automate a seemingly simple task where I would like to capture emails from certain senders as PDF in my DEVONThink DB for future reference. It does not have to be DT, as long as I can a PDF file somewhere in my file system, I can then get Hazel to do all necessary file related steps.
Currently, I can achieve this manually via printing to PDF - however, this is a tedious manual process, and takes some time. I wonder if you are aware of any solution to this. Having searched on the forum I could not find a suitable solution.
So I would welcome your advice if this can be achieved with macOS tools - ideally, I would like this to be triggered automatically but I do not mind if I have to run the automation myself.
I haven’t tried it but if you use gmail/gsuite then you can use a script like this https://www.labnol.org/code/19117-save-gmail-as-pdf to save the email as a pdf in google drive and if you have google drive on mac you can make hazel watch that folder. I haven’t tried it myself but it seems like it should work.
I’ve been building something similar in recent times.
It’s still a work in progress, but so far I am saving emails + their attachments to Dropbox using Integromat.
I then have Hazel convert the HTML body of the mail to PDF using “wkhtmltopdf”.
Here is the Integromat flow (the bottom half is the part that saves the HTML or TXT body):