Right, looks like you can set a custom dictation command, which can trigger an Automator workflow (such as applescript).
Will have to look into this option further, but I'm not sure how this works with something like AirPods. AirPods has the double tap to invoke Siri feature, which is why I was considering that route. Also, in order for this to work, you have to enable the always on microphone listening part of Dictation, which I'd rather avoid.
Thanks for the tip though, that is a decent starting place!