A simple holder for a standard microswitch to be used for limit switches.
3D-print it out of ABS or Nylon, it needs to give a bit when inserting (PLA would crack). Medium quality print suffices, I used 0,2 mm layer height @ 50 mm/s myself. Some extra temperature is recommended to prevent layers from separating at insertion. Needs just a bit of support under the slot-holder part.
Insert it into the V-slot perpendicularly to slot, push down and carefully rotate by 90°, so it is paralell to the slot. Should take a bit of force, but don't break off the little holder part. The hole should point in same direction as microswitch arm.
Install microswitch and secure it using 2 x 2,6 mm x 10-15 mm wood/plastic screw. The roller of the microswitch arm should be pointing towards the slot, this way the wheel of the gantry will push it squarely in the middle (see photo).
The hole in the base is meant for a 2,6 x 6 mm wood/plastic screw for additional fixing (it will spread the legs out and push them against the profile), but I did not need to use it, in my case all 6 holders were quite secure once inserted.