Am trying to integrate Survey Monkey with my app. Survey monkey(link) will post message whenever user completes their survey.
Survey Monkey triggers app webhook and this works perfectly. I see payload(data) in onExternalEventHandler differs from the actual because of change in content type(other than application/JSON).
Because of which not able to process payload data at the external event handler. @Hem Please look into this. As discussed adding payload sample for reference.
The following payload works fine, when i change content-type to application/json.
Actual Request
Content Type: **application/vnd.surveymonkey.response.v1+json**
payload:
{
"name": "Response complete",
"filter_type": "survey",
"filter_id": "1234",
"event_type": "response_completed",
"event_id": "1234",
"event_datetime": "2020-04-09T04:31:07.712348+00:00",
"object_type": "response",
"object_id": "1234",
"resources": {
"respondent_id": "1234",
"recipient_id": "1234",
"survey_id": "1234",
"user_id": "1234",
"collector_id": "1234"
}
}
Received as:
data:
'**{\n\t"name": "Response complete with json",\n "filter_type": "survey",\n "filter_id": "280425564",\n "event_type": "response_completed",\n "event_id": "1234",\n "event_datetime": "2020-04-09T04:31:07.712348+00:00",\n "object_type": "response",\n "object_id": "1234",\n "resources": {\n "respondent_id": "1234",\n "recipient_id": "1234",\n "survey_id": "1234",\n "user_id": "1234",\n "collector_id": "1234"\n }\n}**'