
Announcements
Hello, community!
I hope everyone is doing well. I’m encountering an issue with a custom connector while trying to make a request to the WhatsApp Business API to send a text message. The workflow fails, and the error message I receive is:
The API operation 'SendTextMessage' requires the property 'body' to be of type 'Object' but is of type 'String'.
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "+528134044875",
"type": "text",
"text": {
"preview_url": false,
"body": "text-message-content"
}
}
The Peak Code I’ve implemented looks like this:
{
"inputs": {
"host": {
"connectionName": "shared_whatsapp-5ffa150e7daae86389-5f7c8f2479de47eca0",
"operationId": "SendTextMessage",
"apiId": "/providers/Microsoft.PowerApps/apis/shared_whatsapp-5ffa150e7daae86389-5f7c8f2479de47eca0"
},
"parameters": {
"Content-Type": "application/json",
"body": {
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "+528134044875",
"type": "text",
"text": {
"preview_url": false,
"body": "text-message-content"
}
}
},
"authentication": "@parameters('$authentication')"
},
"metadata": {
"operationMetadataId": "d7a777b3-6349-4835-b1ea-b760528a0baa"
}
}
I’ve tried manually typing the body in the Power Automate flow to ensure it’s passed as an object, but the error persists. I’ve also read that Power Automate custom connectors sometimes have compatibility issues and require workarounds. Can I try WhatsApp Plus APK as it have additional features.
As a beginner, I’d appreciate any guidance or suggestions to resolve this issue.
Thank you so much in advance for your help!