We present molecular line and submillimeter dust continuum observations of the Lynds 870 cloud in the vicinity of IRAS 20231+3440. Two submillimeter cores, SMM1 and SMM2, are identified mapping the 870 micron dust continuum and ammonia emission. The total molecular mass is ~70-110 solar mass. The northern core is warmer and denser than the southern one. Molecular outflows are discovered in both cores. In the northern one a significant amount of low velocity (1.3-2.8 km/s) outflowing gas is found, that is hidden in the relatively broad CO lines but that is revealed by the narrower HCO+ spectra. While IRAS 20231+3440 is most likely the exciting star of the northern outflow, the driving source of the southern outflow is not detected by infrared surveys and must be deeply embedded in the cloud core. Large scale (~0.2 pc) infall motion is indicated by blue asymmetric profiles observed in the HCO+ J = 3-2 spectra. Red K_s band YSO candidates revealed by the 2MASS survey indicate ongoing star formation throughout the cloud. The calculated masses and the measured degree of turbulence are also reminiscent of clouds forming groups of stars. The excitation of the molecular lines, molecular abundances, and outflow properties are discussed. It is concluded that IRAS 20231+3440 is a ClassI object, while the southern core most likely contains a Class0 source.