Nexhat Ukehaxhaj, 57, of Dunkeld Road, pleaded guilty to attempting to engage in sexual communication with a child.
The details of the charge state that he sent messages to who he believed to be a boy aged under 16 discussing meeting the child for sex and asking for nude images.
Ukehaxhaj appeared at Barkingside Magistrates’ Court on Monday, April 7.
He was given a one-year sentence suspended for two years, meaning he will not see the inside of a cell unless he offends again during that time.
Ukehaxhaj was ordered to carry out 100 hours of unpaid work.
He will be on the sex offenders’ register for ten years and was given a sexual harm prevention order limiting his internet usage, as well as banning him from working with children.