If you would like to send an automated SMS when a new task is created or edited to meet a certain criteria, then you need to create the process builder to meet this requirement. The XML configuration needs to be created on the Object on which you are creating the task. You can refer to the following link for steps to create the XML configuration:
In this particular scenario, you can send automated SMS when the task is created on leads object and the XML configuration is also created on lead. Following are the steps to create the process builder:
1. Select "Task" as the object to start the process and the select the process to start only when the record is created.
2. Enter the criteria as per your requirement. In the following screenshot, I have set the criteria as the task subject should not "SMS Notification" and the task should be related to Leads object.
3. After saving the criteria, enter the immediate action as "Create a record" and select Task as the record type to create. Specify the value for the following fields while creating the task record:
- Description: Enter the XML configuration that you have created in order to send out the automated SMS. The configuration needs to be created on the Object from on which the task will be related to. In this case, the configuration is created on Leads object.
- Priority: Set the priority of the task as per your requirement.
- Status: Enter the status as completed if you would like the task to be added to the Activity History related list. Otherwise, set any other value if you would like the task to be added to Open activities related list.
- Subject: Enter the subject as SMS Notification
- Related To Id: It should be the task What ID.
- Name Id: Set the Name Id as task Who Id.