The present invention aims to provide a novel compound having a TRPA1 antagonist activity, a medicament containing the compound, TRPA1 antagonist, and a medicament possibly utilizable for the prophylaxis or treatment of a disease involving TRPA1.A compound represented by the formula (I):wherein each symbol is as defined in the DESCRIPTION, or a pharmaceutically acceptable salt thereof, and a medicament containing same and the like have a TRPA1 antagonist activity and are possibly utilizable for TRPA1 antagonist and the prophylaxis or treatment of a disease involving TRPA1.