Read a webhook from Shopify

Hi,

I’m trying to receive and create new thing in bubble from Shopify webhook.
I have created the endpoint and created the webhook in Shopify but when I use the “detect data” option (meanwhile I send the test webhook) nothing will happen.

Here some image of my test:

Here in Shopify

Here in Bubble

The strange thing is that I have also tried to don’t use the “detect data” and just create a new thing with a pre-determinate value and when I send the request from Shopify the webhook work and a new thing is added in bubble database.


So in some way looks like that the webhook is working but I don’t know how to use with data from Shopify.

Please, can someone help me?
Here the documentation from Shopify

Thanks,
Alessandro

Try these steps …

  1. Set the url in shopify to …/wf/new_order/initialize , as you have done.

  2. Press the button in Bubble “Detect data”. A popup will come up.

  3. Click “Send test notification” in shopify. Bubble will receive it and treat it as a template to create a data structure (hopefully). This can take a couple of minutes.

  4. Set the url in shopify to …/wf/new_order . I.e. take off the initialize for normal sending.

Hi @mishav, thank for your replay.
I have just tried your steps (that was as I did before, happy for this!) but after 10 minutes waiting in the popup still nothing, I have tried more then one time for long session, nothing happen

Do you know which can be the problem?
I really don’t think the problem is the webhook from Shopify because I just tried Zapier from Shopify to Google Sheet and is working fast.

Edit:
I also just tried to use zapier in the middle: Shopify->Zapier webhook->bubble
But even in this case is not working. No error in Zapier but no result in bubble popup.


Thanks,
Alessandro

Maybe the webhook request doesn’t include a content-type header? Or maybe the message is gzipped? idk why Bubble would ignore the message though.

A possible workaround is to set manual parameters, add a parameter called ‘id’. If you can retrieve the event id, you could make an API call to shopify and retrieve the rest of the event details.

Thank you for your replay.
I have tried to use the manual parameters but nothing arrive inside Bubble.

So I have started to think about some authorization problem and maybe I think that before I can read the webhook in Bubble I need to verify it.
I have found some info regarding it on this page (around end of the page): Create an app
here a little extract:

I’m not sure if this is the problem.
If yes I really don’t know how to implement this check and send the replay to Shopify to verify the webhook.

Any idea?

Thank you,
Alessandro

Do you see anything in the server logs?

What do you mean, the endpoint didn’t get invoked, or it did get invoked but didn’t see the parameter?

If the parameter is set as mandatory, it will reject the request if it wasn’t able to retrieve the parameter.

There isn’t an automatic verify option, so you need to read the webhook first before being able to verify it.

Turn on ‘Include headers in the detected data’ to retrieve the signature digest. Bubble has a text function to create a HMAC SHA256 digest which you can compare to the received one. This will be useful when the endpoint can read the message body properly.

Actually if it can capture the headers, it might help understand what is going on, for example if there is a missing context-type.

you mean the plugin from Zeroqode ?

HMAC SHA256 digest …

No, that plugin is not secure for hashing with a server secret, because its done client-side.

I mean Bubble’s built-in text function, which works in API workflows.

(choose something that returns text) : formatted as …

image

image

1 Like

Hey @mishav where is that function in Bubble’s workflows?

Hi , is the problem solved, I have the same problem .

Hello, I have the same problem but I tried this and I got this answer, maybe that’s why it doesn’t work.
If you solved the problem feel free to share the solution for those who will have the same problem