"Up ahead you see..."
How to use this random dungeon trap concocter:
It is best to use this before players enter a new area or just as they are entering it. The traps often consist of things that you will need to describe to the players. The players might also be given the opportunity to notice something is amiss, and thereby find the trap before they trigger it.
You might be thinking that these traps are far too fiendish for anyone to devise without a really good reason. But you have failed to consider the paranoid mind of evil and powerful men. The traps are designed to let the master come and go as they please, but stop anyone else from getting in. In a tomb, the traps might serve as way to let the priests gain access for ceremonies, but to keep the tomb robbers at bay. Apparently trap building was a very important job back in medieval fantasy history. No doubt the greatest engineers of the day spent their lives doing little else.
Some of these traps will lead your guests away from your planned route. Various chutes, spells, and portals can send player characters off to parts unknown. A smart trap builder would send them to their immediate deaths, but in fantasy, they are instead sent to a place where survival is unlikely. Of course, unlikely heroes will always survive anyway.