How to create scripts based on a code input from an external keypad

I’m trying to find a way to trigger scripts or automation based on a code entered on an exterior keypad, preferably something like a Schlage deadbolt lock

Ex 1.My house cleaner would have a code 1234. When she enters that code the alarm would disarm, the garage door would open, my security cameras would start recording, and I would get a notification on my phone. This code would only work on Wednesdays from 8am to noon.

Ex 2. My daughter would have a code 6789. When she enters that code the garage would open, alarm would disarm, and I would get a notification that she is home

EX 3. My UPS driver would have the code 4567. When that code is entered my garage opens then closes 30 seconds later.

Can this be done? My thought was to buy a smart deadbolt lock and just use the keypad portion, but I’m open to any other weatherproof keypad. I would need the keypad to send the code to HA, I wasn’t sure if smart deadbolts will do that.