text: I have taken Keflex for infection before I had a root canal on an infected tooth.  The key is to take the medication for at least a week before you go back to the dentist, so that the infection has time to be eliminated before any dental work is done.