I've had both a colonoscopy and an endoscopy.
For the endoscopy, which was about 25 years ago, they gave me meds to relax me but unfortunately didn't read the notes and gave me a benzodiazepine. I get a paradoxical reaction to benzos, so instead of doping me, they put me in headless chicken mode, restless, sleepless, struggling to stay put etc. Despite that, it went smoothly, so I can imagine that without that reaction it would go even better.
Quite recently I had a colonoscopy. I had to use an enema at home and the instructions were clear and it was easy to do. For the procedure, there was some sort of gas I could inhale if I wanted, but I didn't need it. I thought it might be uncomfortable, maybe even painful, because my internal organs don't lie at quite the right angle, with a very wonky womb, which can give me horrible cramps when food/faeces reach my sigmoid colon towards morning, but I barely felt it. It was quick and painless. It was also very much more dignified than I expected.
Mind you, I had a bit of a bonus with the colonoscopy. I warned them before I went that I have poor hearing, and the doctor introduced himself both in words and in sign, to see which was more helpful. I thought that was really lovely.