A drug dealer at Leeds Festival mistakenly sent police a text message advertising his 'price list' for cocaine and ecstasy tablets.
Martynas Benosenko was caught with over £3,000 worth of Class A drugs in his rucksack after he was arrested at the festival in Bramham.
Leeds Crown Court heard Benosenko also sent a text message from his mobile phone advertising the sale of illegal drugs.
One of the text messages was went to a police-issue mobile phone.
Benosenko, 22, from Hyde Park, was also found in possession of 'business cards' which had 'Flavour Town LS6' printed on them.
Jessica Randall, prosecuting, said Benosenko was arrested at the festival in August 2018 after security staff spotted him smoking cannabis and acting suspicious in the grime tent.
His bag was searched and cocaine, which had a purity of 94 per cent, was found in the bag in 28 individual deals. A total of 67 MDMA tablets were also found in the bag.
Benosenko was found in possession of a small amount of cannabis.
The total street value of the drugs were £3,630.
Benosenko, of Autumn Place, Hyde Park, Leeds, pleaded guilty to two offences of possession of a class A drug with intent to supply and possession of cannabis.
Christopher Dunn, mitigating, said Benosenko had worked as a chef at TGI Fridays in Leeds but lost his job shortly before the festival.
Mr Dunn said Benosenko, a Lithuanian national, had "no idea" how seriously his offending was taken by the authorities in the UK.
He said: "He decided to go sell drugs at Leeds Festival while completely high.
"He thought it would be a good idea, not having a clue what he was getting himself into.
"To say this was a Heath Robinson operation would be something of an understatement,.
"He rocks up at the festival, takes a lot of these drugs himself, obviously turning attention to himself, and then sends his price list to the police.
"This is a man who lost his job and thought he could make a quick buck.
"He had no concept of the type of sentence that can flow from this offending."
Benosenko was jailed for three years and four months.
Recorder Joanne Kidd said: "When parents allow their children and young people to attend these festivals, it is often with a degree of trepidation.
"You set out to earn a significant amount of money and the young people at the festival are vulnerable to people like you preying on their vulnerability and stupidity.
"There is not a single festival of this size that goes on without young people collapsing, becoming seriously ill and, in some circumstances, dying.
"The fact that you chose this venue to ply your trade is an aggravating feature."