Provided is a compound represented by formula (I) [wherein each symbol is as defined in the description] or a pharmaceutically acceptable salt thereof. This compound has an excellent TRPA1 antagonistic activity, which makes it possible to provide a TRPA1 antagonist and a medicine that is useful for preventing or treating diseases associated with TRPA1.