Abstract We demonstrate dissolved ammonia (NH3) sensing in complex mixtures using an optoelectronic sensor comprising a composite sensing material based on a metalloporphyrin zinc tetraphenylporphyrin (ZnTPP) and spectroscopic detection. The metalloporphyrin dye is incorporated within ion-exchange polymeric microbeads arranged in a microfluidic array. Spectroscopic analysis at multiple wavelengths allows sensitive detection in complex backgrounds. The sensor shows preferential sensitivity to ppm levels of concentrations of NH3 dissolved in water, as well as in human saliva, making it relevant for medical diagnostic applications (e.g. detection of stomach bacterial infections). The microfluidic platform and a miniaturized optical arrangement provide a potential for the development of a portable low-power sensor for detection of dissolved ammonia for a variety of applications.