We present a novel nonenzymatic carbon nanotube sensor integrated in a microfluidic channel for the detection of sugars. The sensor is assembled as a liquid-gated field-effect transistor, with the transistor channel composed of 1 to 10 nanotubes, which are controllably functionalized with boronic acid receptors. The devices show sensitivity to glucose in a concentration range of 5 to 30 mM. Furthermore, by controlling the type of nanotube-receptor coupling (as covalent or noncovalent) and by deploying a sensitive impedance-based detection technique, we corroborate in detail the transduction mechanism of our affinity-based sensor. In the case of covalent coupling, charge carrier scattering along the nanotubes is the dominant mechanism. While in the noncovalent case, surface charge effects dominate. The identification of the mechanism along with the tunability of the chemical coupling and the cost-effective integration in microchannels constitute a solid basis for the entry of nanotube-based sensors in lab-on-a-chip applications.