An automated, accurate and reliable way of acquiring and processing flow injection data for exact mass measurement using a bench-top electrospray ionization time-of-flight (ESI-TOF) mass spectrometer is described. Using Visual Basic programs, individual scans were selected objectively with restrictions on ion counts per second for both the compound of interest and the mass reference peaks. The selected "good scans" were then subjected to two different data-processing schemes ("combine-then-center" and "center-then-average"), and the results were compared at various ion count limit settings. It was found that, in general, the average of mass values from individual scans is more accurate than the centroid mass value of the combined (same) scans. In order to acquire a large number of good scans in one injection (to increase the sampling size for statistically valid averaging), an on-line dilution chamber was added to slow down the typically rapid mass chromatographic peak decay in flow-injection analysis. This simple addition worked well in automation without the need for manual sample dilution. In addition, by dissolving the reference compound directly into the mobile phase, manual syringe filling can be eliminated. Twenty-seven samples were analyzed with the new acquisition and process routines in positive electrospray ionization mode. For the best method found, the percentage of samples with RMS error less than 5 ppm was 100% with repetitive injection data (6 injections per sample), and 95% with single injection data. Afterwards, 31 other test samples were run (with MW ranging from 310 to 3493 Da, 21 samples in ESI+ and 10 in ESI- mode) and processed with similar parameters and 100% of them were mass-calculated to RMS error less than 5 ppm also.