Please follow Questions Guideline #11, by properly formatting the configuration you have posted.
Running the automation manually whether through the “Run” option in the breadcrumbs menu or by using the automation.trigger action skips the trigger and conditions… so the event data requirements that you have set up, like initial: true, are not checked at all.
You should be using a trigger-based Template sensor, not an automation for the first step.