Were there any references to robots/mechanical automatons or anything else approaching contemporary sci-fi in old fiction?

by blatantHyperbole

I feel as though humans have always looked forward to the future and envisioned fantastic impossible societies, but I've never heard of any culture producing any science fiction which approaches our level of metal men, flying cars, and cities in the clouds.

Mostly, I feel like the stories we still know were about gods and magic, with very little faith in technology. Are there any notable exceptions?

VariableCausality

This may not be exactly what you're looking for, but Lucian's True History has been considered - somewhat controversially - as one of the first "science fiction" stories, and dates to the 2nd century CE. However, this pretty far outside my bailiwick so I'm not overly clear on the current state of the debate surrounding the work.