A covalent post-synthetic modification is applied in one of the most relevant polymers to obtain unprecedented switchable spin crossover (SCO) materials. We also demonstrate that this material can be used as a selective chemo-sensor for VOCs (particularly, formaldehyde) thanks to solid/vapor reactions occurring between the polymer and the corresponding vapor.