Create Evernote Note from Selection @EN Macro (v9.0.6)

MACRO:   Create Evernote Note from Selection @EN

-~~~ VER: 1.0    2020-08-31 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Create Evernote Note from Selection @EN.kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.




  • Create Evernote Note from Selection


  1. First, make sure you have followed instructions in the Macro Setup below.
  2. Select the text in any document of any app that you want to use for the Body of the Note.
    • By default, the first line will be used as Note Title
  3. Trigger this macro.
  4. A KM Prompt will be displayed to confirm creation of Note, and to change the Note Title and/or Notebook if desired.
  5. The New Note will be opened in a Window so you make make further edits.


  • Carefully review the Release Notes and the Macro Actions
    • Make sure you understand what the Macro will do.
    • You are responsible for running the Macro, not me. ??

Make These Changes to this Macro

  1. Assign a Trigger to this macro.
  2. Move this macro to a Macro Group that is only Active when you need this Macro.
  3. ENABLE this Macro, and the Macro Group it is in.
    (all shown in the magenta color)
    • Set Variable “Local__EvernoteNotebook” to Text “inbox”
      • Change to the default Evernote Notebook Name.


  1. KM 9.0+ (may work in KM 8.2+ in some cases)
  2. macOS 10.11.6 (El Capitan)+
  3. Evernote 7.14+

TAGS: @EN @Note


  • Any Action in magenta color is designed to be changed by end-user


very interesting macro. thank you.

How on earth does the regex .+ which matches a sequence of one or more characters, result in the top line only being copied to the clipboard as title ?
There should be as many matches as there are lines of text.

1 Like

The KM RegEx Search provide ONLY the FIRST match.
So, in this case, it is the first line.
FYI, ".+" matches all characters EXCEPT the new line characters.
That why just the first line is returned.

1 Like

Thanks, works great

this works great and I then want to add the hyperlink of the page from safari to the EN note. I make these kind of temporary notes, so I added the following below your macro. it stalls at the last stage. the hyperlink doesn't get added. see the steps that I am absolute novice, so please excuse

Activate Safari
Type the ⌘L Keystroke
Type the ⌘C Keystroke
Activate Last Application
Type the Return Keystroke
Type the ⌘V Keystroke

You can easily get the Safari and Chrome page URL and Title using these tokens:
FrontBrowser tokens.

I have used the FrontBrowser token below to make it more general (it will use Safari if Safari is frontmost), but you can change if you like:

Here's the Action that you can download and insert:

Set Variable to Text Action (v9.0.6)

Set Variable to Text.kmactions (484 B)

Many thanks. That was very helpful.

1 Like

Works but.....

If you use this to capture from other sources ie. Txt, pdf, etc it puts the Title and URL of the Current Browser that is open. If Safari is closed it puts:

Not Running
Not Running

thank you !
My apologies for the delay. Somehow, everything is breaking down at home: appliances, plumbing, electrical problems, etc

The macro is provided as an EXAMPLE to help get you guys started.
It is NOT intended to be a robust, complete solution.
So feel free to mod as you need to work with your workflow.

Understood. I appreciate what you have provided and was just letting others know. Working with what you have provided to see if I can add this ability or just use two versions one for Safari and one for other sources.

No problem. We have a saying in Texas: "When it rains it pours." :wink:
Not always true, of course, but sometimes . . .

very good expression ! I will remember it !

thanks very much for the script @JMichaelTX .

Obviously you are the expert and I am an amateur. I created many versions of create new evernote note KM macros over the years because Evernote is so crucially important for me with 12,000+ notes and all my essential data, which is thanks to your help.

The numbers in my comments refer to those on the annotated image below.

1- . in terms of workflow, I think that from the start, there should be 2 macros. One macro which stores all notes into a .inbox notebook (which the user will process later) and another macro which includes moving the note to the user's notebook of choice at the time the note is created. Someone who stores everything in .inbox need not be asked where to store the note. I personally try to avoid the EN .inbox notebook at all costs because I know that I lack the discipline to file notes at a later time and I end up with bloated inbox. I file all (90+%) my notes at the time I create them.

2- the copy command. I think that many people (me included) have grown frustrated with the EN editor, and use markdown editors instead. I now create all my notes in Markdown using the Bear app which I then copy to evernote. The Bear markdown editor is IMO opinion a gem. I write notes 10x faster than EN, with a much easier to read structure (headings, etc). My point is that the copy command should cover those using markdown editors where the command is “copy as RTF” instead of just copy. See snapshot below.

3- as far as the body is concerned, purely for aesthetics and ease of reading, I style the first line, thanks to the macro you created.

4- very elegant use of regex to set the title.

5 and 6-

the prompt for input allows the user to set the title and the notebook, and you end with an apple script which creates the note.

I see things a bit differently

  • the prompt for user slows down the workflow. I don't use it.
  • the script is nice, but is a bit slow, even when run as a file instead of a KM action.
  • when creating an Evernote note, my philosophy is to get into Evernote ASAP and cut the pre-Evernote steps to a minimum because:
  • I copy the first line and put it in the title field using your regex and 2 simple keystroke actions : ⌘L ( go to title field) and paste title. It seems awkward but does not end up being slower than the AppleScript)
  • once the note is created in Evernote, the user can modify the title as needed
  • I file (move) all my EN notes into notebooks at the time of creation. I have hundreds of notebook and there is no way that I would remember the EXACT names as required by your user input action. That's why I simply end the note creation process with “move note” ⌃⌘M to take full advantage of EN's suggestions, autocomplete, recognition of partial titles, etc. Just having a vague idea of the title (one or a few words in the title) is basically enough. EN helps you find it.

No problem. That's the great thing about KM -- each of us can customize to suit our own personal preferences/workflows.

If you have no need to confirm/edit the Title or NB before creating the note, then you can disable/delete if you wish. But I have to say that all you need to do is hit RETURN and the macro continues. So that can't be much of a slowdown.

We may have different approaches. When I capture info, I like to make sure at the moment of capture that the Note Title is something meaningful to me, and has the proper keywords (if any) in the Title to facilitate searches. Most likely I have just finished reading/reviewing the article that I have clipped, so the Title comes easy to my mind. Putting off review/edit of the Title to a later review of the Note seems problematic to me.

I don't know what is nice about the script -- I don't view scripts that way.
Either it works and is effective, or not.

IAC, I do NOT see the slowdown using a script that you do.
I just ran some tests using the script and using KM UI actions.
Here's the results:



The script was faster by 0.31 sec.

But I consider those essentially the same.

The script doesn't care what Evernote is currently doing.
The KM UI requires Evernote to be in a wait state with the proper window at front.
That makes it much more unreliable than the script.

But if using the KM UI is what you prefer, then you can certainly do that.

My Macro that uses KM UI is provided below.

My macro is only the most basic macro to create an EN Note.

It would be easy to get a list of your NBs, and allow you to choose the NB using the KM Prompt with List, which, IMO, is better than using the native EN NB selection process.

To be clear, I have little need for a macro like this. Most of my Notes come from Web clippings, where the EN Web Clipper analyzes the article and proposes the best NB and Tags to use. You can also easily search/select different NB, and add Tags while there.

I think we have a fundamental difference in our approach of creating/collecting Notes.
Like a lot of people, I much prefer the "inbox" approach that makes it easy to clip, create, quickly save a Note. Just like I used to do in the paper world, I wait until I have "free" time to file new notes. To me, "jumping up from my desk to file every Note as it comes in" would not be efficient, and would be a huge distraction for me. :wink:

I'm not saying that my approach is "right" and yours is "wrong". I'm just saying yours would never work for me.

Let me say again: The Macro I posted is the most basic macro to create an Evernote Note. It is just an example to help you guys get started. I fully expect everyone to highly customize and add-to my macro.


MACRO:   Create Evernote Note from Selection Using KM UI Actions @EN

-~~~ VER: 2.0    2020-09-08 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Create Evernote Note from Selection Using KM UI Actions @EN.kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.

I like your approach ie objective testing rather than my “intuition” of how fast a macro runs.

very good point

I think that for me at least, it's a very nice macro which serves as a starting point for customize to my needs and habits.
Very minor issue: you define a notebook but do not use the info subsequently

thanks very much!

1 Like