muhadi 4 Posted October 13, 2019 Share Posted October 13, 2019 I was wondering if there's a way to save single email message as a new note in Evernote? I encountered some posts about Apple script from @DTLow but I have zero knowledge how it works. My wish is to have a friendly way to save some of my email into Evernote similar to the share sheet in iOS Link to comment
Level 5* DTLow 5,744 Posted October 13, 2019 Level 5* Share Posted October 13, 2019 I posted notes on using Applescript at https://discussion.evernote.com/topic/112316-scripting-on-a-mac-applescript/ You need to decide the design for your note in Evernote The screenshot shows the format I'm using I've attached a barebones script fileMailToEvernote.scpt It uses these code elements tell application "Mail" Interface with the Mail application set theMessages to selection Retrieve selected email messages repeat with theMessage in theMessages Pass through each email message set theMessageDate to the date received of theMessage set theMessageSubject to the subject of the theMessage set theMessageContent to the content of theMessage <insert code> end repeatend tell tell application "Evernote" Interace with the Evernote application set theNewNote to create note with text "....." Create a note <insert code>end tell 1 Link to comment
muhadi 4 Posted October 13, 2019 Author Share Posted October 13, 2019 Thanks I started to get a grab of the scripting. can you share the exact script that you used here for the email so I can adjust it to my liking Link to comment
muhadi 4 Posted October 13, 2019 Author Share Posted October 13, 2019 Thanks a lot. The working script will teach me how the flow is going along with the documentation You're a gem. Have a great day Link to comment
muhadi 4 Posted October 13, 2019 Author Share Posted October 13, 2019 I ran the exact script and there was a partially successful note but the generated table lacks the pdf & eml files. Am I missing something? like pointing the script to a designated folder while also getting this error Link to comment
Level 5* DTLow 5,744 Posted October 13, 2019 Level 5* Share Posted October 13, 2019 On 10/12/2019 at 7:42 PM, muhadi said: pdf & eml files ... like pointing the script to a designated folder To append these files to a note, they will have to be saved/retrieved to a folder I export the files using keyboard shortcuts (command-shift-s, ....) After doing this manually, the folder location is constant Here's sample applescript code for applying keyboard shortcuts: tell application "System Events" to keystroke "s" using {shift down, command down} delay 3 tell application "System Events" to keystroke return Then retrieve the files using tell application "Finder" to set the_files to name of files of folder POSIX file ("/Users/david/Desktop/...") >>while also getting this error Did you download Evernote from the app store? There's reports of sandboxing restrictions I'm using Evernote downloaded from www.evernote.com/download 1 Link to comment
muhadi 4 Posted October 13, 2019 Author Share Posted October 13, 2019 Just now, DTLow said: To append these files to a note, they will have to be stored somewhere I exported the files to /Users/david/Desktop/@Evernote/Evernote_Temp usingset theMessage to item 1 of theMessagestell application "System Events" to keystroke "s" using {shift down, command down}delay 3tell application "System Events" to keystroke returndelay 1tell application "System Events" to keystroke "p" using {option down, command down}delay 3tell application "System Events" to keystroke returndelay 5 Then retrieved the file usingtell application "Finder" to set the_files to name of files of folder POSIX file ("/Users/david/Desktop/@Evernote/Evernote_Temp") Thanks Link to comment
Level 5* JMichaelTX 4,118 Posted October 14, 2019 Level 5* Share Posted October 14, 2019 On 10/12/2019 at 8:23 PM, muhadi said: My wish is to have a friendly way to save some of my email into Evernote The easiest way is to just forward the Mail Message to your Evernote inbox address. You can see this address at https://www.evernote.com/Settings.action. It is the "Email Notes to" field. This ensure you get the rich text formatting of the Message, as well as images and attachments. 2 Link to comment
Level 5* DTLow 5,744 Posted October 14, 2019 Level 5* Share Posted October 14, 2019 15 minutes ago, JMichaelTX said: The easiest way is to just forward the Mail Message to your Evernote inbox address. Good point; the email feature is a useful service Downsides are; it's a premium feature, and we have no formatting options My preference is to archive emails in both .eml and .pdf formats 1 Link to comment
r1chowen 0 Posted February 28, 2020 Share Posted February 28, 2020 Hi there, very keen on having the ability to automate the sending of bulk sets of email into my Evernote account, but the mail app only allows you to do this either individually or by concatenating the multiple selected emails into a single note, which doesnt work for me (I need single notes linked to single emails to pump my email receipts into the same notebook as all other receipt material (scans etc.). I found this veritrope script which is old, but sort of works and gives quite a few nice options on import. Only problem is, while plain text imports fine, my html emails (for example PayPal receipts) do not import properly - the documentation suggests it should. I think it may be due image files or some html issues, but this is way beyond my skill level (both html and AppleScript!). Whilst I work on increasing by abilities, any chance of looking at the script to see where it is falling down (not surprising since it hasn't been updated since 2014!). The author hasn't responded unfortunately which is fair enough, hence asking here. Grateful for any advice people can give - thanks. Link to comment
r1chowen 0 Posted February 28, 2020 Share Posted February 28, 2020 Update to this - my Apple.com receipts import OK, but the Paypal don't - no idea why, but must be some peculiarities with formatting. Also, there must be a simple mod to the script that would allow the header info that is displayed in the note to match the width of the table columns to the the displayed note width? I can do this manually when viewing the note, but is there an autoscale property somewhere? Thanks! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now