I like the Shortcuts app on my MacBook, but clicking a shortcut in a menu doesn’t fit in a script. macOS has a shortcuts command for that, and Apple documents it in the Shortcuts user guide.
shortcuts list
shortcuts run "Combine Images" -i ~/Desktop/*.jpg -o ~/Desktop/combined.png
shortcuts list prints every shortcut by name. shortcuts run starts one; put the name in quotes when it has spaces. -i (--input-path) passes files as input, wildcards included, and -o (--output-path) writes the result to a file. Apple’s own example is exactly this one: combine a bunch of JPGs into one picture.
Because the command exits 0 on success and 1 on an error, it fits in shell scripts, cron-style launchd jobs and things like a Git hook. You build the fiddly part (resize, convert, send a message) once in Shortcuts and call it from anywhere.
Caveats: if the shortcut asks for input, the command waits for you, so a script that runs unattended hangs there. Build those shortcuts without questions. And a path you pipe in is treated as text. Use -i when you mean a file.
Further reading: Apple: Run shortcuts from the command line