I was performing at an event and they had an exhibit about robots. Part of the exhibit was a timeline of robots on film. The list 1927’s Metropolis as the first robot to appear on film.

I always thought the fun magic fact was that it was Houdini put the first robot in a movie in his The Master Mystery which came out in 1919.

There could be some technicality about this as to why Houdini wasn’t listed. His robot was called an “automaton” and had a brain inside, so more of a cyborg than pure robot and at the end is revealed to not be a robot.
You can see the robot at the end of this clip:
You can find the whole movie in parts on YouTube.
-Louie