We present a structurally flexible copper-iodide-pyridine-based coordination polymer showing drastic variations in its electrical conductivity driven by temperature and sorption of acetic acid molecules. The dramatic effect on the electrical conductivity enables the fabrication of a simple and robust device for gas detection. X-ray diffraction studies and DFT calculations allow the rationalisation of these observations.