Written Malayalam is clearly documented from the 800s
A. Govindankutty Menon, 'Some observations on the sub-group Tamil-Malayalam: differential realizations of the cluster *ṉt,' Bulletin of the School of Oriental and African Studies 53(1), 1990, 87-99.