Unable to create task

When trying to create a task via influxhost:8086 from the samples like this one:

option task = {name: "downsample_5m_precision", every: 1h, offset: 0m}

from(bucket: "example-bucket")
    |> range(start: -task.every)
    |> filter(fn: (r) => r._measurement == "mem" and r.host == "myHost")
    |> aggregateWindow(every: 5m, fn: mean)

i get an error in the options line:

Avoid using `task` as an identifier name. In some InfluxDB contexts, it may be provided at runtime.

when i remove the line i get an error that task is undefined. What am i doing wrong here ?

when you create the task in tasks, the option task = {name: "downsample_5m_precision", every: 1h, offset: 0m} is generated automatically when you save the task, no need to type that line.

Thx, yes, a have read that. However, i get an error that task is not defined when trying to save.