Apple Shortcuts and Inserting Resulting Text into Markdown

I’m having trouble getting text from an Apple Shortcut run as a terminal command into a markdown document.

I’ve got a shortcut that reads my calendar and formats the daily events into markdown and makes links to meetings, etc. I’ve tried the GCalCLI but my work does not allow me to have Google Console access to do the OAUTH and frankly I’d like to keep my calendar stuff as local as possible. Here is a link to the shortcut itself.

The last shortcut statement is a “Combine List with New Lines” and if I run it from the terminal using

shortcuts run Agenda | cat 

I get the correct output.

But when I run it through the Obsidian Shortcut Launcher or set it up as a User Function in Templater, I get the following error in the console

VM109:82 Templater Error: Error with User Template daily_events 
 Error: Command failed: shortcuts run Agenda | cat

    at ChildProcess.exithandler (child_process.js:312)
    at ChildProcess.emit (events.js:315)
    at maybeClose (internal/child_process.js:1021)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286)

I have other user-defined functions in Templater that run just fine and output text to the file, so I’m not sure what the problem is.

Any suggestions?

Actually, I get NO ERROR from Obsidian Shortcut Launcher, the error is only from Templater but there is still no output from OSL. Just to clarify.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.