While technically not an electromagnet, it is possible to build a similar device that will weakly pull on copper and aluminum, and [Cylo] shows us how it works in a recent video you can see below.
It’s an electromagnet pendulum analog circuit ... took the time to highlight each part of the schematic in order to work through a complete explanation. In the end, this analog circuit should ...
in relay switches and door locks that can be controlled remotely; to hold open fire doors – the electromagnet switches off when a fire alarm is sounded and the doors close.