As I said in my previous post, ìnput.config() works very differently in scripting app compared to in an automation action script. You also cannot use input.recordAsync in an automation script.
In order to get the script to work, you would need to rework most of your script. Everything that has squiggly red underlines would need to change. If you want more personal advice on how to do this, you can book a meeting.
On the other hand, it looks like you are just trying to timestamp a record with the time an automation has run. You may be interested in my Automation Helpers Scripts. One of the scripts output a timestamp that can be used in a later Update Records action.