sir, there is no direct train from chennai to ooty but you can catch nilgiri[blue mountain express, 12671 ]which is from chennai to mettupalayam and from mettupalayam you can catch mettupalayam -ooty passenger train at 7:10am which takes 4h 50m.
the other option is bus and taxi . Mettupalayam is around 46 kms from ooty and can be reached via buses and taxis besides the famous toy train. Buses are available every 20 minutes and fare is Rs 17 from Mettupalayam to ooty and takes about 2 hours. Taxis are also available .