Context : IRAS 20343+4129 was suggested to harbor one of the most massive and embedded stars in the Cygnus OB2 association , IRS 1 , which seemed to be associated with a north-south molecular outflow . However , the dust emission peaks do not coincide with the position of IRS 1 , but lie on either side of another massive Young Stellar Object ( YSO ) , IRS 3 , which is associated with centimeter emission . Aims : The goal of this work is to elucidate the nature of IRS 1 and IRS 3 , and study their interactions with the surrounding medium . Methods : The Submillimeter Array ( SMA ) was used to observe with high angular resolution the 1.3 mm continuum and CO ( 2–1 ) emission of the region , and we compared this millimeter emission with the infrared emission from 2MASS . Results : Faint millimeter dust continuum emission was detected toward IRS 1 , and we derived an associated gas mass of \sim 0.8 M _ { \sun } . The IRS 1 Spectral Energy Distribution ( SED ) agrees with IRS 1 being an intermediate-mass Class I source of about 1000 L _ { \sun } , whose circumstellar material is producing the observed large infrared excess . We have discovered a high-velocity CO ( 2–1 ) bipolar outflow in the east-west direction , which is clearly associated with IRS 1 . Its outflow parameters are similar to those of intermediate-mass YSOs . Associated with the blue large-scale CO ( 2–1 ) outflow lobe , detected with single-dish observations , we only found two elongated low-velocity structures on either side of IRS 3 . The large-scale outflow lobe is almost completely resolved out by the SMA . Our detected low-velocity CO structures are coincident with elongated H _ { 2 } emission features . The strongest millimeter continuum condensations in the region are found on either side of IRS 3 , where the infrared emission is extremely weak . The CO and H _ { 2 } elongated structures follow the border of the millimeter continuum emission that is facing IRS 3 . All these results suggest that the dust is associated with the walls of an expanding cavity driven by IRS 3 , estimated to be a B2 star from both the centimeter and the infrared continuum emission . Conclusions : IRS 1 seems to be an intermediate-mass Class I YSO driving a molecular outflow in the east-west direction , while IRS 3 is most likely a more evolved intermediate/high-mass star that is driving a cavity and accumulating dust in its walls . Within and beyond the expanding cavity , the millimeter continuum sources can be sites of future low-mass star formation .