The present invention provides a process for the preparation of Vilazodone of formula (I) or its pharmaceutically acceptable salts comprises amidation of the Ethyl-5-{4-[4-(5-cyano-3-indolyl)butyl]-l-piperazinyl} benzofuran-2-carboxylate of formula (II). The present invention also relates to an improved process for the preparation of vilazodone of formula (I) or its pharmaceuticallly acceptable salts with cost effective and commercially viable process using green solvents comprising less synthetic steps and simple product isolation technique.