Forum Documentation Showcase Pricing Learn more

Typeform API troubles

TypeForm API Requirements

Our build uses TypeForm forms to collect information from respondents. That information needs to be collected (either from the Response API or through the webhooks) and saved within our build as outlined below.

For each individual respondent’s submission, the payload contains two lists, questions
and answers.

Both lists need to be saved to the database and tied to the form submission id, as the questions can change over time and the answers need to be able to be matched with the historical question they were paired with.

To summarize, each respondent’s form submission needs to be saved with one form submission id (and associated info like date/time) and two lists of arbitrary length, the first containing the list of questions and the second containing the list of answers. The data needs to be able to be compared based on all answers (across all respondents) per individual question id.

Where we’re running into trouble

What we’ve been able to do is get Bubble to save the data in the first part of the payload correctly using a Workload API endpoint that the TypeForm webhook is pointed to, but struggle to get Bubble to save the individual items in the two lists.

Any ideas on what we could be doing wrong?

Can you show the API’s answer (how you received endpoint data) and how both lists are processed?

1 Like

Hi @JohnMark

Both lists are not processed. We can get the Typeform webhook payload delivered to bubble but can’t get the bubble workflow api to properly save the data.

Here’s the test payload itself.

{
“event_id”: “01DECV8SDSHY3R0W9HPX5R3RX1”,
“event_type”: “form_response”,
“form_response”: {
“form_id”: “atZjaw”,
“token”: “01DECV8SDSHY3R0W9HPX5R3RX1”,
“landed_at”: “2019-06-27T16:11:05Z”,
“submitted_at”: “2019-06-27T16:11:05Z”,
“definition”: {
“id”: “atZjaw”,
“title”: “Bubble Test”,
“fields”: [
{
“id”: “JaM7Pyd4NaAM”,
“title”: “How old are you?”,
“type”: “number”,
“ref”: “589e79a4-5f93-4fcf-9f96-686a2e36d0e7”,
“properties”: {}
},
{
“id”: “VFkIonKmeCMs”,
“title”: “How many cars have you owned?”,
“type”: “number”,
“ref”: “7c850c0d-559d-465a-8702-0c6906795c17”,
“properties”: {}
},
{
“id”: “zXo5PXOuXyyl”,
“title”: “How much money do you have in the bank?”,
“type”: “number”,
“ref”: “9f0efa57-7154-4c2c-ab63-b958f7eb4280”,
“properties”: {}
},
{
“id”: “Famyl8ZTVTIl”,
“title”: “How much money do you have in pennies?”,
“type”: “number”,
“ref”: “91f7fd8e-51a1-4ebd-8569-1e19791e5598”,
“properties”: {}
},
{
“id”: “JGTUwtYneatG”,
“title”: “How much money do you have in nickels?”,
“type”: “number”,
“ref”: “5272deed-23e1-4b0a-90ff-386e4111599f”,
“properties”: {}
},
{
“id”: “OhDKTo7kM1PU”,
“title”: “How much money do you have in dimes?”,
“type”: “number”,
“ref”: “79622b01-5172-47a4-a6d8-421bb5e0c7d9”,
“properties”: {}
}
]
},
“answers”: [
{
“type”: “number”,
“number”: 42,
“field”: {
“id”: “JaM7Pyd4NaAM”,
“type”: “number”,
“ref”: “589e79a4-5f93-4fcf-9f96-686a2e36d0e7”
}
},
{
“type”: “number”,
“number”: 42,
“field”: {
“id”: “VFkIonKmeCMs”,
“type”: “number”,
“ref”: “7c850c0d-559d-465a-8702-0c6906795c17”
}
},
{
“type”: “number”,
“number”: 42,
“field”: {
“id”: “zXo5PXOuXyyl”,
“type”: “number”,
“ref”: “9f0efa57-7154-4c2c-ab63-b958f7eb4280”
}
},
{
“type”: “number”,
“number”: 42,
“field”: {
“id”: “Famyl8ZTVTIl”,
“type”: “number”,
“ref”: “91f7fd8e-51a1-4ebd-8569-1e19791e5598”
}
},
{
“type”: “number”,
“number”: 42,
“field”: {
“id”: “JGTUwtYneatG”,
“type”: “number”,
“ref”: “5272deed-23e1-4b0a-90ff-386e4111599f”
}
},
{
“type”: “number”,
“number”: 42,
“field”: {
“id”: “OhDKTo7kM1PU”,
“type”: “number”,
“ref”: “79622b01-5172-47a4-a6d8-421bb5e0c7d9”
}
}
]
}
}

Hi @anthony2

  • You probably found the answer here
  • and some plugins:

  • Have you tried the Detect Request Data? and then choose a list of things?

Hi @johnMark

We did try detect request data and it did identify the data types correctly but that’s not the issue we’ve been running into. Still doesn’t save the data and we couldn’t get the system set up to save it.

We did however notice in your post there is a second Typeform API but the documentation in the plugin just points to developer.typeform.com and we have no idea how its supposed to be used.

Hi @anthony2

What you trying to accomplish is to use https://developer.typeform.com/webhooks/

Run from Bubble your endpoint with Detect Data. It open the Detecting Request Data window. You see INITIALIZE, you have to remove it later from Typeform webhook.


Create inside Typeform a webhook with your Bubble link. You have to setup INITIALIZE the first time, and remove it from here after.


Webhook from Typeform.


Then send request from Typeform (test one), and Bubble window will appeared. Choose the fields you need. Here I took only the essiential to see if it is working.



The test is working.

2 Likes

That got it @JohnMark – You’re a lifesaver. Thanks so much!

1 Like

@anthony2 You’re welcome.