Ideas for Synology webhook to call HA automations

Looking for some creative automation suggestions. I use a webhook from Synology surveillance to launch an HA automation to confirm it is dark then turn on certain lights and then turn them off after like 10 minutes. Problem I am having is when the camera is detecting motion there are so many webhook calls that it overruns the automation which is set mode 10 parallel actions. Trying to figure out the best way to initiate the automation (when camera motion first detected), then 10 minutes after camera motion has no longer been detected, call an automation to turn off the lights.