Hi Greg,
Thank you very much for reply!
My original configuration with Test Url is:
request
{
"requestUrlTemplate": "https://cloudfunctions.googleapis.com/v1/projects/cf-genesys-dev-t7/locations/europe-west3/functions/gc_query_dedicated_skill:call",
"requestType": "POST",
"headers": {},
"requestTemplate": "{ "data": "$esc.jsonString(${input.rawRequest})" }"
}
response
{
"translationMap": {},
"translationMapDefaults": {},
"successTemplate": "${rawResult}"
}
When I test the function with this configuration everything is OK and I get result like this:
{
"skill": "FSD"
}
Then I made the corrections for Trigger Url:
request
{
"requestUrlTemplate": "https://europe-west3-cf-genesys-dev-t7.cloudfunctions.net/gc_query_dedicated_skill",
"requestType": "POST",
"headers": {},
"requestTemplate": "${input.rawRequest}"
}
(I cannot fully remove requestTemplate. I tried to remove, but aftrer saving I get it automatically back. That is why I left "${input.rawRequest}")
response is the same.
When test the function in this way, I get following error message:
{
"message": "The request could not be understood by the server due to malformed syntax.",
"code": "bad.request",
"status": 400,
"messageParams": {},
"contextId": "495868eb-bf0e-4340-91ef-ce1d006377d4",
"details": [
{
"errorCode": "ACTION.REMOTE_ENDPOINT"
}
],
"errors": [
{
"message": "REST call for action execute failed. Message: We were unable to process the response from the remote endpoint because it had a 'content-type' header of 'text/html; charset=utf-8' instead of the required value of 'application/json'. [495868eb-bf0e-4340-91ef-ce1d006377d4]",
"code": "BAD_REQUEST",
"status": 400,
"messageParams": {},
"details": [],
"errors": []
}
]
}
In the same time I see in Google Cloud, that the Function is executed correctly:
Default
2022-07-11T17:50:13.405372Z
gc_query_dedicated_skilldtf8twopmnde FSD
FSD
Debug
2022-07-11T17:50:13.407843979Z
gc_query_dedicated_skilldtf8twopmnde Function execution took 42 ms. Finished with status code: 200
Function execution took 42 ms. Finished with status code: 200
Still some issue in format, I believe.
Best regards,
Borislav