To create Elasticsearch records from TheHive 5 without manual input, use a ready-made scenario.
You can launch this TheHive 5 + Elasticsearch integration in Scriptera: describe the task in plain words — the scenario is built, launched and monitored for you.