Auto Update Media Libary Script - Help or advice

I’d like to monitor a folder for new images and have them auto update to the library and set a Tag and expiry date from the name of the file.

At the moment I upload the media then have to go into each item and set a tag and expiry date manually. There is a layout with a dynamic playlist using the Tag to update it’s content which is working really well.

I’m after any suggestions on how best to implement an auto update of the media library via the API.
Guess I need to write a script but not sure where to start.
Also using node-red to do layout changes so maybe it’s something I could do in there?