Search code examples
macosapplescriptevernote

How to append html anchor (link) to evernote note


How can I append a html anchor (clickable link) to an Evernote note? The following gives me just the text in the note. Thanks.

set myLink to "<a html=\"" & currentTabUrl & "\">" & currentTabTitle & "</a>"
tell curnote to append html "<br/>" & myLink & return

Solution

  • I am not having any problems, just append as html not text. Here is the code...

    #
    # Based on https://dev.evernote.com/doc/articles/applescript.php
    #
    
    tell application "Evernote"
        set notebook1 to notebook "AppleScriptNotebook1"
        set mynotes to (get every note in notebook1 whose title is "Test")
        if (count of mynotes) is equal to 1 then
            set note1 to item 1 of mynotes
            tell note1 to append html "<br>"
            tell note1 to append html "<a href=\"https://google.com\">link text</a>"
        end if
    end tell
    

    Here is what it looks like and link worked just fine...

    Evernote with URL