How to update custom variable in grafana 10

Hello,

I have a problem and found a solution by using custom grafana variables.

Normally with flux i cannot get more than 1000 variable values as dashboard variable filter.

But if i define 8000 variable values by creating custom variable on grafana manually, dashboard filter can search all 8000 values and bring in the selectbox.

So i have to use manuel custom variable in grafana.

Now my problem is updating this custom variable in certain time period. Probably everyday.
How can i update custom grafana variable value dynamically everyday.

A script will run and write new custom values seperated by “,” like this : “Server1,Server2,Server3,…,Server7998,Server7999,Server8000”

I need to fill below area with my scripts dynamically.

[Screenshot from Dashboard/Settings/Variables]
image