SUPER-SUB Farid El Alagui scored a stoppage-time winner as Brentford edged a five-goal thriller against Dagenham.
The former Falkirk striker came off the bench to send the Bees into round two with a brace, while Martin Fillo also scored his first club for the club as the hosts came from behind to seal victory.
Brentford made 10 changes from the side that drew at Port Vale on Saturday, with Rosler handing debuts to Jack Bonham, Javi Venta and Ben Nugent.
The Bees started brightly, Jake Reeves flashing a volley the wrong side of the post.
However, they were behind on 15 minutes when Nugent, under pressure from Daggers striker Rhys Murphy, deflected Josh Scott's shot beyond Bonham into the net.
The linesman flagged for offside, but referee Pat Miller awarded the goal after consulting his assistant.
Brentford continued to dominate despite the setback, but they were fortunate not to fall further behind when Murphy sprung the offside trap, only to drag his effort wide.
The Bees had another let off five minutes after the break when Scott crashed a header against the bar with Bonham in no man's land.
Rosler brought on El Alagui on his return from injury, who was booked moments later for diving.
However, the Moroccan levelled the scores on the hour mark when he scrambled the ball home from close range.
And the hosts were ahead shortly after when Stuart Dallas sent Fillo in the clear, and he fired his shot across Chris Lewington into the bottom corner.
But Daggers levelled 10 minutes from time when Bonham failed to come for a long ball into the box, with Scott on hand to slam home the equaliser from Brian Woodall's knock-down.
Fillo was denied the chance to win it when he was scythed down by Scott Doe, with the Dagenham defender escaping with a yellow card.
But from the resulting free-kick, Lewington had to be at his best to keep out Sam Saunders' thumping effort.
However, the finally landed the decisive blow deep into added time when El Alagui powered home Scott Barron's inswinging free-kick.
BEES: Bonham, Venta, O'Connor (Craig 46), Nugent, Barron, Oyeleke (El Alagui 54), Reeves, Dallas, Saunders, Fillo, Hayes.
Subs (not used): Button, Clarke, Pierre, Adams, Norris.
Follow me on Twitter .