Hello community! Hope everyone is good.
I am having trouble with a Custom connector making a request to the Whatsapp Business API in order to send a text message. Easy as it sounds, the error seems to persist, says as follow:
The API 'whatsapp-5ffa150e7daae86389-5f7c8f2479de47eca0' returned an invalid response for workflow operation 'Send_Text_Message' of type 'OpenApiConnection'. Error details: 'The API operation 'SendTextMessage' requires the property 'body' to be of type 'Object' but is of type 'String'.'
request body:
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "+528134044875",
"type": "text",
"text": {
"preview_url": false,
"body": "text-message-content"
}
}
Peak Code:
{
"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 tried the solution of manually typing the boyd in the power automate flow to ensure the payload request is actually passing through as object, but no success. I am not very experienced in all this tecnicallity still in begginer levels but I do have read that power automate custom connector actually has some issues and workarounds.
Please help!
Thanks a lot in advance.