League One Bristol City's quality shone through as they progressed to the area quarter-finals with a 3-1 success, but they were made to work hard by Mark Yates' side.
Goals from Wes Burns and Korey Smith put City in command before Terry Gornell pulled one back with a header to end his personal goal drought. Smith's superb second of the night ended Cheltenham's hope of an upset, but Cotterill knew his team had been in a game.
"I was very, very pleased with it," Cotterill said. "We had a 10 minute spell seconds before we dominated the ball, giving it away and we were punished for it.
"I think we were so much in control of the game, we became a bit sloppy and we have to stay on it so there is something to learn there.
"If we’d stayed on it, we’d have scored again, but at 2-1 we were on the back foot and Cheltenham worked us, so fair play to them.
"In the end, we deserved to win it, but if Cheltenham carry on playing like that, they will cause teams problems.
"It’s hard to get out of the bottom end at Whaddon Road and Cheltenham use the pitch, understand it and it’s a tough place to get a result.
"It’s a fantastic surface, which suited us and we really passed it around well. Anyone watching would have thought it was a good game and I don’t think too many would have turned over on TV."