Automated messaging to leads

Automated messaging to leads

How to implement an automated messaging functionality to new leads who came from social network?