See my reply to MacOS Shortcut update
I think I’ll be able to implement this either as a Shortcut or a Drafts action.