Another man phoned police. Bob Smith wrote there were up to three men involved in the botched robbery with the others escaping in a car.
Adam North said he and Paull held the front door shut with the man trapped inside and waited for police to arrive.
"Actually it was me and my bro that held the offender inside until police arrived...there was only 1 man [inside] not 3 and armed with screwdriver!" posted North.
Paull wrote it was a stroke of good timing they spotted everything unfold.
"If I hadn't been looking out the window as we were on the way to work we wouldn't have seen it happening."
West Auckland locals have quickly praised the men for their heroic action on social media.
Posted Kimmi Cameron:"Well done Adam North need more people like you to keep our communities safe:)"
"Thank you very much guys for keeping our community safe," posted Becky Walker.
Police said they were called to a robbery at BP Kumeu at 6.10am after two males - one aged 16 and armed with a screwdriver - tried to steal cigarettes and cash.
The service station attendant tried to stop one of the robbers and suffered hand injuries.
St John Ambulance said they were called to the service station just before 6.30am and took one person to North Shore Hospital with minor injuries.
A 16-year-old had been charged aggravated robbery, aggravated injury, wilful damage and unlawfully gets into a motor vehicle.
Waitemata Police detective sergeant Megan Goldie said they were now hunting for the other person who fled the scene in a stolen red 1994 Honda Civic, registration ABD201.
People with information were asked to call Waitemata Police on 09 839 0600 or anonymously on 0800 555 111.