This paper proposes a new methodology for the automatic characterization of the influent wastewater in WWTP. With this methodology, model components are automatically estimated by means of optimization algorithms combining a-priori knowledge of the expected wastewater composition with experimental information from the available measurement data. The characterization is carried out based on an extended model components list in which components are described by means their elemental mass fractions. This allows an easy establishment of relationships between model components with experimental data and also, to obtain a general methodology applicable to any model used for wastewater biological treatments. The characterization of the wastewater influent of Galindo-Bilbao according this methodology has demonstrated its validity and the easy application to the ASM1 model influent characterization.