send_msg_to_multiple_num_using_approved_template
Send WhatsApp messages to multiple contacts using pre-approved templates for consistent communication and bulk outreach.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template_id | Yes | ||
| contacts | Yes |
Implementation Reference
- Core handler function that performs the HTTP POST request to the WhatsApp template message endpoint using the provided template_id and list of Contact objects.def send_message_to_a_number_using_approved_template( template_id: int, contacts: list[Contact], ): return asdict( TitanMindAPINetworking().make_request( endpoint=f"whatsapp/message/send-template/", payload={ "recipients": [contact.model_dump() for contact in contacts], "template": template_id, }, success_message="message sent request created.", method=HTTPMethod.POST, ) )
- src/titan_mind/server.py:233-247 (registration)MCP tool registration for send_msg_to_multiple_num_using_approved_template, which delegates to the core handler in titan_mind_functions.@mcp.tool() def send_msg_to_multiple_num_using_approved_template( template_id: int, contacts: list[Contact], ) -> Optional[Dict[str, Any]]: (""" sends a message to a phone number using an approved whatsapp template. Args: template_id (str): id of the whatsapp message template, it is not the template name. contacts (Contact): a contact has three attributes: country_code_alpha(like "IN" for india), country_code(like "91") and phone_without_dialer_code """ + _titan_mind_product_whatsapp_channel_messaging_functionality_and_workflow) return titan_mind_functions.send_message_to_a_number_using_approved_template( template_id, contacts )
- Pydantic schema for Contact model used in the tool's contacts parameter.class Contact(BaseModel): country_code_alpha: str country_code: str phone_without_country_code: str