This is an improvement on one of my earlier pushpin magnet designs. Now the magnet is inserted during printing (instead of after) so there's no chance of it falling out. I used small (1/4" diameter, 1/8" height) neodymium magnets, which are definitely strong enough to hold up several pieces of paper on my whiteboard.
The design has a hole in one end for the magnet.
I'd recommend printing at least three at once, with the magnetic end facing up. If you have them far enough apart on the print bed, you can insert magnets into the unfinished pieces while the print head works on a different piece. Then it'll print over the magnets, and they'll be secured.