Where is pandoc
installed? In your Obsidian folder? Probably not.
When you run from the terminal, you probably have the Pandoc install folder in your path
variable, which the terminal (actually something lower than that, but let’s just say the terminal for now) will check to see if it can find a file in when you don’t give it a full path to the Pandoc executable.
When you run it in Keyboard Maestro, it knows nothing about your normal path
variable, so when it tries to run Pandoc in your Obsidian folder, I expect it won’t find it and it will fail.
That brings you back to exactly what @dustinknopoff suggested above, and the details about the path
variable is what @drdrang was pointing you towards checking.
So, first thing’s first, change pandoc
to use the full path to wherever you installed Pandoc. That’s got to be your first thing to address and it is probably easier for you to just set that out at this point than populating a path
variable in Keyboard Maestro for a single use.