You can. There are actually several choices. Here are three:
-
You can use RM as you have suggested.
-
You can create/use a driver for your zigbee outlet that automatically turns it off after a configurable number of milliseconds/seconds. I did this for the zigbee outlet I used because I was told that it would be more reliable to implement auto-off in the driver rather than in RM which is a very large app.
-
Finally, @asj has provided a collection of small, very efficient apps. One of them "when_on_then_off.groovy" is perfect of this situation. It works very well and has the advantage of being small and efficient.
P.S. Welcome to Hubitat!