Executing X-Callback-URLs

Hi Keyboard-Maestros,

first of all, thank you very much for the tremendous community you have built here. I've been reading the forums for quite some time and have already been able to save valuable hours (even though I'd say I'm still rather new to the whole topic).

I just ran into an issue I can’t quite figure out – I would like to run an x-callback-url in the background. Potentially with AppleScript or via the Terminal? Is that possible?

For example, the URL could be:

to create a new Sheet in Ulysses.

I’m currently working with a workaround (pasting the x-callback-url into Alfred and executing it from there), but I would prefer to avoid the visible action.

Thank you very much for your help!

I ran across a similar issue a few weeks ago. After googling, I cobbled together a solution that works. More experienced folk will undoubtedly have better ideas. Yes, works in Applescript. In my case, I used variables that came from a KM prompt for user input action to load some info into my callback url. You should be able to adapt this by finding the applictionID for ulysses…

tell application "Keyboard Maestro Engine"
set title to getvariable "newnotetitle"
set body to getvariable "newnotebody"
end tell

set xurl to “x-devonthink://createText?title=” & title & “&text=” & body & “&destination=[linkID]”

tell application id "DNtp"
open location xurl
end tell


Just got back to this issue again and it seems like it's working now. Here's an example on how to add your clipboard into a new Ulysses sheet that's placed in your Inbox.


Can you use the AppleScript variables the you set previously in the "Open URL" action?

I figured it out. you can do a tell to keyboard maestro in applescript to set KM variables.


tell application "Keyboard Maestro Engine"
   setvariable "my_street_address" to primeAddrStr
end tell

Then use %my_street_address% in KM.