How to set mapping to run on a daily basis?

My script sends data to Kibana on a daily basis on this format "xxxx-flat-2020-09-21"
I created an index pattern "xxxx-flat-*" which is working almost fine.
For each index I need to run this mapping below, otherwise, the 'UploadTimestamp' field, which has data type text by default, will display a data type conflict error.
Is there a way to configure in Kibana to perform this mapping on a daily basis automatically?

PUT /xxxx-flat-2020-09-21/hostinfo/_mapping
"properties": {
"UploadTimestamp": {
"type": "date"

Use an index template

A template that matches indices named "xxxx-flat-*" would be used at index creation to apply that mapping.


Your suggestion resolved the issue. Thanks @rugenl