Incorrect Webhook Payload | Community
Skip to main content
Answered

Incorrect Webhook Payload


I’m using webhooks to fetch the entry info on submit. However, the payload send by Typeform is incorrect and is missing closing brackets.

Here is the payload I’m getting from Typeform:

{
  "event_id": "01F0FGCVTX5CZMHS9D5M4KYT4J",
  "event_type": "form_response",
  "form_response": {
    "form_id": "Hi1JKL",
    "token": "z43r7ao5q58gjjz2ysudz43r75kz4l4j",
    "landed_at": "2021-03-11T02:03:07Z",
    "submitted_at": "2021-03-11T02:03:38Z",
    "definition": {
      "id": "Hi1JKL",
      "title": "Feature Request Form",
      "fields": [
        {
          "id": "p3MzDSAyO0WC",
          "title": "Priority",
          "type": "dropdown",
          "ref": "804f1730-1a92-4083-b379-25ed5651dcda",
          "properties": {}
        },
        {
          "id": "eIorApWbt9jh",
          "title": "Business Impact",
          "type": "dropdown",
          "ref": "1733fb40-4fca-4025-b2f6-26f8d9f5a508",
          "properties": {}
        },
        {
          "id": "FHt4hjLCX6Zd",
          "title": "Email:",
          "type": "short_text",
          "ref": "66670e48-f721-4e3d-af3a-a3a9b8af9621",
          "properties": {}
        },
        {
          "id": "JVb7hYTnvnLd",
          "title": "Request one liner",
          "type": "long_text",
          "ref": "edf52b2f-46d5-4273-a346-1954d62fe219",
          "properties": {}
        },
        {
          "id": "G4IR3VG6xESP",
          "title": "Summary and Use-case",
          "type": "long_text",
          "ref": "e73e3702-ee9a-4338-a648-db76fd5c1bff",
          "properties": {}
        }
      ]
    },
    "answers": [
      {
        "type": "choice",
        "choice": {
          "label": "P1 - Show Stopper"
        },
        "field": {
          "id": "p3MzDSAyO0WC",
          "type": "dropdown",
          "ref": "804f1730-1a92-4083-b379-25ed5651dcda"
        }
      },
      {
        "type": "choice",
        "choice": {
          "label": "Production on hold"
        },
        "field": {
          "id": "eIorApWbt9jh",
          "type": "dropdown",
          "ref": "1733fb40-4fca-4025-b2f6-26f8d9f5a508"
        }
      },
      {
        "type": "text",
        "text": "saqlain.kali@contentstack.com",
        "field": {
          "id": "FHt4hjLCX6Zd",
          "type": "short_text",
          "ref": "66670e48-f721-4e3d-af3a-a3a9b8af9621"
        }
      },
      {
        "type": "text",
        "text": "Typeform Test",
        "field": {
          "id": "JVb7hYTnvnLd",
          "type": "long_text",
          "ref": "edf52b2f-46d5-4273-a346-1954d62fe219"
        }
      },
      {
        "type": "text",
        "text": "Zendesk tickek body",
        "field": {
          "id": "G4IR3VG6xESP",
          "type": "long_text",
          "ref": "e73e3702-ee9a-4338-a648-db76fd5c1bff"
        }
      }
    ]

My code is unable to parse the body as the JSON is incorrect. Am I missing anything here?

Best answer by Liz

Hi @Saqlain Kali Huh, that is weird. The responses should be passing through to the webhook. Our technical team will need to dive deeper into the issue and look at your account. Would you mind contacting them from your account email here? Thanks in advance! 

View original

4 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14890 replies
  • March 11, 2021

Hi @Saqlain Kali Thanks for including the payload - super helpful! Do you happen to have any changes to the form that haven’t been published yet? Usually that does the trick!


  • Author
  • Explorer
  • 3 replies
  • March 11, 2021

Thank you for the suggestion, @Liz. I created a new form but that is also sending the incorrect JSON. Here is the new webhook request
 

{
  "event_id": "01F0HBFKE9P1P6JF9001QJE2AM",
  "event_type": "form_response",
  "form_response": {
    "form_id": "F3I3Furg",
    "token": "m76s9g2wjjn3wx3ftym76s9ge3n4xgyc",
    "landed_at": "2021-03-11T19:15:25Z",
    "submitted_at": "2021-03-11T19:16:14Z",
    "definition": {
      "id": "F3I3Furg",
      "title": "Feature Request Form (copy)",
      "fields": [
        {
          "id": "8bHGTWkg7isj",
          "title": "Request Type",
          "type": "dropdown",
          "ref": "db8d78fb-4360-4e50-997e-4844d6b56a15",
          "properties": {}
        },
        {
          "id": "sobVy3jd5B6I",
          "title": "Request one liner",
          "type": "long_text",
          "ref": "edf52b2f-46d5-4273-a346-1954d62fe219",
          "properties": {}
        },
        {
          "id": "F75fRK6jZQPX",
          "title": "Summary and Use-case",
          "type": "long_text",
          "ref": "e73e3702-ee9a-4338-a648-db76fd5c1bff",
          "properties": {}
        },
        {
          "id": "OUhlWJeIOWDL",
          "title": "Priority",
          "type": "dropdown",
          "ref": "804f1730-1a92-4083-b379-25ed5651dcda",
          "properties": {}
        },
        {
          "id": "oBYC4WW6UFGZ",
          "title": "Expected Result",
          "type": "long_text",
          "ref": "ca64af29-5995-4296-a996-650683e14830",
          "properties": {}
        },
        {
          "id": "1V02faV4KACN",
          "title": "Actual Result",
          "type": "long_text",
          "ref": "b9b1f9fd-1122-4880-88a1-ddcb41f23665",
          "properties": {}
        }
      ]
    },
    "answers": [
      {
        "type": "choice",
        "choice": {
          "label": "Feature Request"
        },
        "field": {
          "id": "8bHGTWkg7isj",
          "type": "dropdown",
          "ref": "db8d78fb-4360-4e50-997e-4844d6b56a15"
        }
      },
      {
        "type": "text",
        "text": "This is Test",
        "field": {
          "id": "sobVy3jd5B6I",
          "type": "long_text",
          "ref": "edf52b2f-46d5-4273-a346-1954d62fe219"
        }
      },
      {
        "type": "text",
        "text": "This is test body",
        "field": {
          "id": "F75fRK6jZQPX",
          "type": "long_text",
          "ref": "e73e3702-ee9a-4338-a648-db76fd5c1bff"
        }
      },
      {
        "type": "choice",
        "choice": {
          "label": "P1 - Show Stopper"
        },
        "field": {
          "id": "OUhlWJeIOWDL",
          "type": "dropdown",
          "ref": "804f1730-1a92-4083-b379-25ed5651dcda"
        }
      },
      {
        "type": "text",
        "text": "expected result",
        "field": {
          "id": "oBYC4WW6UFGZ",
          "type": "long_text",
          "ref": "ca64af29-5995-4296-a996-650683e14830"
        }
      },
      {
        "type": "text",
        "text": "actual result",
        "field": {
          "id": "1V02faV4KACN",
          "type": "long_text",
          "ref": "b9b1f9fd-1122-4880-88a1-ddcb41f23665"
        }
      }
    ]

 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14890 replies
  • Answer
  • March 12, 2021

Hi @Saqlain Kali Huh, that is weird. The responses should be passing through to the webhook. Our technical team will need to dive deeper into the issue and look at your account. Would you mind contacting them from your account email here? Thanks in advance! 


  • Author
  • Explorer
  • 3 replies
  • March 13, 2021

Thanks, @Liz - I’ve reached out to the support. FYI here is the ticket ID:468274


Reply