We can use" Process builder" to send out message whenever a lead is added as a Campaign Member in particular Campaign. We can also use fields of that Campaign Member as well as Campaign in that message.

Please follow below steps to achieve the same:

  1. Create a process and choose object as "Campaign Member". then specify the condition when you want to start the process.e.g When Campaign Member is created.

  • Now define the condition for the action group e.g. If the Campaign Lead Id is not null and Campaign Id starts with particular Campaign Id 

  • Then setup immediate action on this process as "Create a record" and Choose record as "SMS History" to send out message. Map the required details with SMS record as per your requirement and set SMS Text as formula to use merge fields as well as your own text in it e.g "Hi " + [CampaignMember].Lead.FirstName +   [CampaignMember].Campaign.Name 

    Once you set this up and activate the process, it will create SMS History record on process execution and will send out message with specified text.