tell application "Keyboard Maestro Engine"
set ObsidianURL to getvariable "ObsidianURL"
set taskName to getvariable "taskName"
end tell
tell application "OmniFocus"
tell front document
set newTask to make new inbox task with properties {name:taskName, note:ObsidianURL}
set taskID to id of newTask
end tell
end tell
return taskID
There should be a way to select text in Obsidian on your iPad and run a shortcut via the share sheet. Having OmniFocus shortcuts create the new task and return the task link may require you to go into Omnifocus automation scripting (JavaScript land).
Well, @Kullenej showed me the rabbit hole of the Obsidian Shortcut Launcher from MacStories. It actually works pretty well.
If you install the plugin and make a launcher you can direct it to this Shortcut
The only catch is that there is no way to manipulate the selected text automatically in Obsidian. You just need to wait for a second and then you can paste the link in place.
Hello @Isaac, just signed in to MPUTalk, because I have a problem while setting up the Keyboard Maestro-Omnifocus-Obsidian Task Workflow from your initial post here. Precisely, while executing the workflow, it puts not the ObsidianURL to the note field of the OmniFocus-Task. Instead it fills in the link to the task itself, what is nonsense, of course.
Am I doing something wrong? Sorry, I’m new to KeyboardMaestro and the whole automation thing, but your workflow is kind of what I was looking for!
whenever I had scratched my head working in KM, the answer has more often than not been the need to add a Pause somewhere. You may want to add a 0.2-second pause between the [Copy] block and [set Variable “taskName”] block.
That is the expected behavior. It changes the highlighted to that text that is a url link to the newly created omnifocus task. The new task in omnifocus inbox should have the obsidian return-link in the notes of the new task.
Yeah, but the screenshot above is the OF notes field… Of course there should be the return-link to obsidian. In Obsidian everything is fine, showing the link to the created OF task.
I’ll fiddle around with the KM workflow, must be a way to make this running.
Control U is the hot key for copy obsidian url. You should check to see if this true for your set up. You can set the hot key for whatever you want and just change the keystroke in KM