Lynn asked me to repeat this post here:
Using Camphor Essential Oil for running off gnats
What I do is about two weeks before I know I am bringing a container inside, I put a drop of Camphor on a rock that I sit on the soil in the container. I repeat every three or four days to chase the little buggers off as they hatch and viola, when it is time to bring them in, no gnats!
I have used it on houseplants as well. I don't know where those nasty little gnats come from but I get them at least twice a year. Well, I did anyway; now I don't get them at all. Every week or two (I don't always remember to do it) I put a drop of Camphor on the rock. I have eliminated my household gnat problem with this method.