Defining nested parameters manually in backend workflows

Hey everyone!

I’m trying to define parameters manually and get data from a webhook. I can’t use detect data (long story). How can I define nested parameters from a webhook in a backend workflow?

Here is an example, one of the fields I’m trying to target is “amount” but it’s nested in “data”. So it’s supposed to be data.object.amount

I tried different variations, but nothing worked so far

{
  "id": "evt_3NwQXUG7Lf1pCZ9k1N1K0xi8",
  "object": "event",
  "api_version": "2023-08-16",
  "created": 1696270243,
  "data": {
    "object": {
      "id": "ch_3NwQXUG1Lf8pCZ1k1YvytJFW",
      "object": "charge",
      "amount": 4999,
      "amount_captured": 4999,
      "amount_refunded": 0,
      "application": null,
      "application_fee": null,
    }
  }
}

Hi,

In the Parameter Definition select "Detect Request Data’
image

Click on Detect Data button, and initialize the webhook.
While initializing the webhook you will add the URL something like this
website/version-test/api/1.1/wf/api-name/initialize.

This will give you a response and you can select each data type. Similar to while setting up in the API connector.

Once your data types are set, you can change the webhook to URL and remove /initialize.

Hope this helps.
Animisha

Hi @animisha45,

Thanks for your reply! As I mentioned in my post, I can’t use Detect Data because Bubble doesn’t allow access to URL querystring parameters when Detect Data is used. I want to access the querystring parameter when a webhook is sent. That’s why I’m using manual definition. The problem with manual definition is that I’m unable to access all the data in the JSON payload. I tried different approaches, but none have worked so far.

I see.
Can you tell what webhook you are using? Perhaps I will also try to see if I can work on a solution.

I’m using Stripe and Shopify webhooks

I see. I recently worked with Stripe Webhooks for subscription events and customer events. It was a breeze.

Hey @Abdullah.b
Have you solved this somehow?
I’m having a problem with a similar thing (not in Stripe though) and face the issue you mentioned:

Hey @getcollectif , sorry for the late reply. I haven’t found any solution yet.

I talked with the support — it’s not possible.

1 Like

Hello!
We can’t directly retrieve query string values from a webhook POST to a Bubble workflow endpoint. As an alternative, I’ve set up a webhook in Zapier to capture the query strings. Then, I forward the combined raw body to the Bubble webhook.