A fully automated stand-alone flow injection immunoanalysis (FIIA) device for the determination of cephalexin in milk is developed with a main focus on the investigation of the influence of the sample matrix. The system is based on principles of flow-through immunoassays and on sequential addition of the assay components to an immunoreactor. Protein G is immobilised on the surface of the immunoreactor serving as affinity matrix for the polyclonal anti-cephalexin antibodies. A cephalexin–alkaline phosphatase conjugate is mixed with the analyte-containing sample and binds in a competitve manner to the corresponding antibodies in the immunoreactor. After substrate addition enzymatically generated p-aminophenol is detected at a carbon electrode at +150 mV vs. Ag/AgCl. One assay cycle takes 16 min including regeneration of the immunoreactor. The large excess of protein G allows for more than 150 regenerations without significant loss of signal height. Due to the high specificity of the anti-cephalexin antibodies, other -lactam antibiotics like penicillin, amoxicillin and cloxacillin do not interfere in the measurements, even when added at 10 mg l–1. To deactivate alkaline phosphatase present in milk, samples are heat-treated for 3 min prior to measurements. Cephalexin recoveries from two milk samples are 90 and 110%. The detection limit in milk is 1 µg l–1 (mean relative standard deviation of 3%), less than the maximum residue level of 4 µg per kg milk fixed for some -lactam antibiotics in the European Union. The device is suitable for fast quantitative data generation from consecutively measured samples and thus adds to analytical screening methods.