Forum Academy Marketplace Showcase Pricing Features

Help on first attempt receiving data via webhooks

This is my first attempt to receive data via a web hook. I’m trying to keep it simple by only choosing a few parameters and I just want to see it stored in the application data. I keep testing it but no data is saved. Any suggestions?

Dev Environment: https://bubble.io/page?type=api&id=cloudcanary&tab=tabs-2

The endpoint: https://cloudcanary.bubbleapps.io/version-test/api/1.1/wf/statuspage

API Workflow:


StatusPage.io example JSON:

{
“meta”:{
“unsubscribe”:“http://statustest.flyingkleinbrothers.com:5000/?unsubscribe=j0vqr9kl3513”,
“documentation”:“http://doers.statuspage.io/customer-notifications/webhooks/
},
“page”:{
“id”: “j2mfxwj97wnj”,
“status_indicator”: “critical”,
“status_description”: “Major System Outage”
},
“incident”:{
“backfilled”:false,
“created_at”:“2013-05-29T15:08:51-06:00”,
“impact”:“critical”,
“impact_override”:null,
“monitoring_at”:“2013-05-29T16:07:53-06:00”,
“postmortem_body”:null,
“postmortem_body_last_updated_at”:null,
“postmortem_ignored”:false,
“postmortem_notified_subscribers”:false,
“postmortem_notified_twitter”:false,
“postmortem_published_at”:null,
“resolved_at”:null,
“scheduled_auto_transition”:false,
“scheduled_for”:null,
“scheduled_remind_prior”:false,
“scheduled_reminded_at”:null,
“scheduled_until”:null,
“shortlink”:“http://j.mp/18zyDQx”,
“status”:“monitoring”,
“updated_at”:“2013-05-29T16:30:35-06:00”,
“id”:“lbkhbwn21v5q”,
“organization_id”:“j2mfxwj97wnj”,
“incident_updates”:[
{
“body”:“A fix has been implemented and we are monitoring the results.”,
“created_at”:“2013-05-29T16:07:53-06:00”,
“display_at”:“2013-05-29T16:07:53-06:00”,
“status”:“monitoring”,
“twitter_updated_at”:null,
“updated_at”:“2013-05-29T16:09:09-06:00”,
“wants_twitter_update”:false,
“id”:“drfcwbnpxnr6”,
“incident_id”:“lbkhbwn21v5q”
},
{
“body”:“We are waiting for the cloud to come back online and will update when we have further information”,
“created_at”:“2013-05-29T15:18:51-06:00”,
“display_at”:“2013-05-29T15:18:51-06:00”,
“status”:“identified”,
“twitter_updated_at”:null,
“updated_at”:“2013-05-29T15:28:51-06:00”,
“wants_twitter_update”:false,
“id”:“2rryghr4qgrh”,
“incident_id”:“lbkhbwn21v5q”
},
{
“body”:“The cloud, located in Norther Virginia, has once again gone the way of the dodo.”,
“created_at”:“2013-05-29T15:08:51-06:00”,
“display_at”:“2013-05-29T15:08:51-06:00”,
“status”:“investigating”,
“twitter_updated_at”:null,
“updated_at”:“2013-05-29T15:28:51-06:00”,
“wants_twitter_update”:false,
“id”:“qbbsfhy5s9kk”,
“incident_id”:“lbkhbwn21v5q”
}
],
“name”:“Virginia Is Down”
}
}

I then received an email from StatusPage (initiator of the web hook) that said they detected a problem and deactivated the web hook given they didn’t receive a 200 response within 30 seconds of initial connection.

Just tested with hurl.it. Worked fine. New entries are being created in your database.

Thanks for the help! I’ll note hurl.it as a tool to help in the future.

So my bubble app can receive the data but somehow it’s not reading the JSON properly. Any idea what that might be? I’m assuming that StatusPage sent the POST given that I got an email suggesting that it didn’t work and that they never received the 200 error.

So my bubble app can receive the data but somehow it’s not reading the JSON properly.

How do you know the data isn’t being read properly? What error are you getting?

I didn’t see any entries after I had triggered events via StatusPage.io and then I got an email from the folks at StatusPage.io saying that their post didn’t work and they didn’t get the 200 response. I see entries in the database now but I believe those are ones you entered?

Yes, those are the ones I created. Does status page have some way to test their webhooks? If so, I’d start there. Also, formatting your “created_at” as a text doesn’t look correct.

Your problem is simple.

Some of the fields you are trying to recieve are nested. And thus your endpoint returns a none 200 status code because it can’t find the values you told it to look for.

Bubble at this time can’t read nested fields.

See this link if you want to know more

1 Like

Thank you, I was suspicious of that. I tried making all of my parameters empty, made the call via StatusPage.io, and sure enough a blank entry was made in my database. So the webhook is working; I just can’t get to the parameters properly.

I posted in your other thread interest in pitching in on prioritizing this development. In the meantime, I guess I need to research in Zapier or other tools on how to flatten the JSON so I can pass the data. :frowning: