The traditional drip coating approach for sensor fabrication encounters several drawbacks, notably uneven film deposition, material wastage and vulnerability of sensitive materials to detachment, which hinder the attainment of high-quality sensor devices. Herein, we reported a polypyrrole-cerous stannate (PPy-Ce2Sn2O7) sensor by insitu electrochemical deposition of the composite on interdigital electrode. The obtained sensor device can be directly utilized for gas-humidity detection at room temperature (RT, 25 degrees C). A systematic characterization including SEM, TEM, XRD, FTIR and XPS have been conducted to confirm the composites' morphology and composition. The effects of deposition condition and proportion ratio within the PPy-Ce2Sn2O7 on sensing performance were investigated. The optimal PPy-Ce2Sn2O7 exhibited considerable sensitivity of 3.85 and 1.25-80 ppm NH3 and 40 ppm NO2 at RT, respectively. Additionally, the sensor showed a limit of detection (LOD) of 74.8 ppb and 3.2-fold as well as 2.5-fold increase in response to 100 ppm NH3 when compared to pure PPy and Ce2Sn2O7. The influence of humidity on the electrical signal of the PPy-Ce2Sn2O7 is opposite to that of ammonia but similar to that of NO2. Intriguingly, the sensor exhibited an ultra-high response of 4392857 to 80 % relative humidity (RH), and it was successfully used for humidity warning and blowing monitoring. The sensor's excellent sensing performance is attributable to the large surface area of PPy, abundant oxygen vacancy sites of Ce2Sn2O7, and synergistic effect of the p-p heterostructure. This work provides a foundation for the development of easy to prepare, low-cost and highly sensitive gas-humidity sensors.