Trigger automation if Alexa sets a device

I have an Alexa routine that locks the front door after a 15 seconds wait, giving me time to get out of the door. Is there a way to use the Alexa action as a trigger for an automation? The logbook has an entry such as:
Amazon Alexa send command Alexa.LockController/Lock for Front Door Lock by Home Assistant Cloud

You can create an input_boolean in HA and expose it to alexa through emulated hue domain. Then add this input_boolean to switch on with routine. This state of this input_boolean can be used to trigger automations in HA.