Possible to connect to Upnote?

would be great if there is a way to copy text , images by highlighting content (on web site or pdf page) to paste the content as a new note on UpNote

1 Like

Thanks for the great suggestion, that would require a new extension but should be straightforward if UpNote has the necessary mechanism for receivin text to make a new note. It’s just a case of me (or someone!) sitting down and making it. UpNote is on my big todo list of extensions.

thanks, I can see that your todo list is really quite long :rofl:

1 Like

So I’ve had a look at UpNote.

Unfortunately, it doesn’t have a Services or AppleScript interface. Nor does it expose any commands to Shortcuts. It does have a url scheme upnote: which might allow new note creation, but I can’t find any documentaton for it.

So we have to resort to nasty UI scripting with AppleScript:

#popclip
name: UpNote
icon: U
before: copy
applescript: |
  -- activate UpNote app
  tell application "UpNote"
    activate
  end tell
  
  -- poke it
  tell application "System Events"
    tell process "UpNote"
      keystroke "n" using command down -- new note
      repeat 100 times -- wait for window to actually appear
        if frontmost is true and number of windows is greater than 0 then
          keystroke "v" using command down -- paste
          exit repeat
        end if
        delay 0.05
      end repeat
    end tell
  end tell

(The above block is an extension snippet - select it to install the extension with PopClip)

I managed to find some info about the upnote://x-callback-url scheme by looking at the source code to its Chrome web clipper. So here is an improved version:

#popclip - upnote v2
name: UpNote
icon: U
capture html: true
javascript: | 
  const article = {
    html: popclip.input.html,
    title: popclip.context.browserTitle,
    url: popclip.context.browserUrl
  }
  const encoded = encodeURIComponent(JSON.stringify(article))
  popclip.openUrl('upnote://x-callback-url/clipper?article=' + encoded)

(The above block is an extension snippet - select it to install the extension with PopClip)

Let me know if it works well for you.

thanks for this. tried this but seems to open a blank note

would love to see this implemented!

Which one did you try (v1 or v2)?

thanks for your swift reply @nick. i tried the improved version, and get a blank output

just tried the original ver, it requires access to system events but seems to work. thank you for help coding this! it’s a very useful addition to popclip :slight_smile:

What should I request from upnote devs to add/open documentation about , exactly?

I’m going to reach to them and ask to make the implementation faster and more transparent for you

You’re an amazing dev btw !!

1 Like

Essentially we just need a documented and reliable way for a 3rd party app such as PopClip to create a new note in Upnote. The simpler the interface the better. The note content would tend to be “miscellaneous captured text” so would be best do go into some sort of “inbox” or “unfiled” area by default.

The 3 main ways that other notes apps do this are:

  • URL Scheme
  • System Service
  • AppleScript interface

Upnote does have a URL scheme but it is undocumented as far as I can tell. It seemed to work for me but other posters in this thread report that it didn’t work for them.

Hi,

The second version works great with Upnote. It is a godsend seeing how Upnote’s Webclipper is a little reluctant to work consistantly.

Iain