There are many experienced contributors here that may have better ideas, I'd suggest you to have 3 programs (you may solve with 2, but this way you may find other applications also)
1- GD OPENED
NOTIFY
RUN PROGRAM 2 then path
2- GD TIMMER (normally disabled) no conditions
Wait x minutes
Notify GD still open
You may include here some repeat clause to keep informing you about the door.
I have a "growing counter" for this, first starts with 5, then doubles (10,20,40...) does not bother that much but still remembering you about it.
(Without considering any potential risk, you may here command the door to close, you should have to detect if is safe to close)
3 - GD CLOSED
STOP PrOGRAM 2
The program 1 will start the timer after notifying you, the TIMMER will keep running and notify you after some time. If the door close it will stop the TIMMER and no notification will be sent.
Enviado do meu iPhone usando Tapatalk