Tyler Griffiths, 22, targeted the Pellon Lane newsagents in Halifax on Sunday, February 10.
Griffiths, of Bower Street, Harrogate, entered the store with armed with a knife.
He demanded the cashier, a woman in her 20s, hand over money from the till.
Police managed to catch Griffiths after issuing a CCTV appeal.
Several members of the public called in with information which led to Griffiths being identified.
He was sentenced to 3 years at Bradford Crown Court on Friday, May 4.
Detective Sergeant Ross Wadsworth, of Calderdale CID, said: “We welcome the sentence imposed on Griffiths and although no one was injured in this incident, the use of a knife clearly caused concern in the community.
“We received a great response from the local community and further afield after publishing the appeal on our Facebook page so I would like to thank the public for their help in tracing Griffiths and ultimately helping us secure justice for the victim.”