The disclosure relates to substituted indole-2-carboxamide and azaindole-2-carboxamide derivatives of structural formula (I) in the form of a base or of an addition salt with an acid, and also in the form of a hydrate or of a solvate, wherein the variables are as defined in the specification. Also disclosed is a process for the preparation of these compounds of formula (I) and their therapeutic use for preventing or treating pathologies in which receptors of TRPV1 type are involved. These compounds are suitable for preventing or treating pain, inflammation, metabolic disorders, urological disorders, gynaecological disorders, gastrointestinal disorders, respiratory disorders, psoriasis, pruritus, dermal, ocular or mucous irritations, herpes, zona, multiple sclerosis, depression and cancers.