Forum Academy Marketplace Showcase Pricing Features

Webhook: POST and then GET

I’ve got a need to setup a Webhook with an external service. The external service handles the URL and subscription via the following:

  • POST to their API with a callback URL
  • External service provides a parameter in the return URL
  • External service provider sends a GET to the callback URL and expects a response back in 2 seconds that includes the parameter + Status Code of 200 back
  • On success, returns Subscription code

This seems straightforward, but I’m struggling to get it to work… I’ve tried the following:

  1. POST via API (this works)
  2. Callback URL to backend workflow (as /wf/ call) trying to collect parameter from the WF, but it doesn’t like the parameter name as there’s a . in it “hub.challenge”
  3. Create a thing, call the POST API, callback directed to /obj/ backend workflow with unique id of thing called out, getting hub.challenge from URL, modify thing… this seems right, but isn’t working

I’m getting a fairly non-helpful Status 400 error from the external provider.

Any help on this? Be greatly appreciated!

Have you tried changing the parameter name? Or is that a parameter named by the third part service?

It’s by the 3rd party service unfortunately

Did you make sure the parameter is checked as a “query string”?

On the back end workflow?

Should I be going with the callback to the /wf/ call or via an /obj/?

1 Like

From my experience, wf and using a query string. Obj is only if you’re trying to return specific data “things” from what I’ve understood

Edit: I’m sleepy. Obj is for modifying and creating data

Edit2: if parameters are coming from a url, they are “query strings” and need to be labeled as such in Bubble. Hope that helps!

It does, here’s my challenge though… the backend workflow needs the parameter named as “hub.challenge”. Bubble won’t accept the . below:

I can define that with the “.” in the Return Data from API call:

But my guess is that since the initial isn’t defined correctly with the “.”, it’s not grabbing the parameter from the URL. Is there another way to do this?

Appreciate the help!

Hmm I’ll be at my computer in 10 minutes and will test it out. Is there an option to escape the “.” With a “\” or maybe replace it with the URL encoded version of “.” as “%2E”

Edit: you can also try using the “detect parameters” feature. Click where is says “Manual definition” for Parameter definition and change it to “detect” or however it is worded. Then run the we hook once and it should automatically find the parameters

I put that in and now seems I’m getting a different error, so maybe making progress?

I tried putting in the Return Data from API, code as a parameter and 200, but didn’t like that.

Here’s the developer info if it helps at all: Strava Developers

Can you check your log to see what was sent when this backend workflow is triggered?

One other issue: I don’t think Bubble backend workflows can work with GET. You may have to use a third party solution such as Integromat. I ran into a similar error just a few days ago where the third party webhook wanted the JSON response without the “status”: “success” key and only expected the response body.

1 Like

So I have this working with Pipedream; however the issue with that is it doesn’t seem to support multiple users, just the initial one. Maybe I need to work more there, but I was hoping for an “all in one” solution around this.

The logs don’t seem to help much:

Should I expect the POST command in the logs to show all that’s sent? This doesn’t seem to show the parameters that I have in the API call. I’ve also tried as both “Action” and “Data”.

I don’t think Bubble has the capability to handle this webhook. I would explore integrating with Integromat. There are a couple good forum posts on how to do that.

  1. Send POST via Bubble to Strava
  2. Set the callback URL to integromat
  3. Send a POST request to bubble for whatever unique user data you need
  4. Modify and filter the response as needed in Integromat
  5. Return the proper response to Strava via integromat

Thanks, I’ll give that a go. Appreciate your help!

My pleasure. One note regarding Integromat: I could not get it to link with Bubble via their “native bubble connection” setup. I just ended up calling whatever Bubble API workflow I needed using the http request action.

1 Like

Did some work on this and think I’m making progress finally. Issue I think is since it’s multi-step, back to the redirect URL, that I’m not picking up all the values.

So the flow is:

  1. Initiate POST (done)
  2. GET goes to redirect (done and paramenters detected)
  3. Webhook response returns 200 & code back to Strava (this seems to be correct)
  4. Response back to “original subscription POST request” with the subscription ID. I’m not sure if this is coming back to the Bubble link or the redirect URL. I’ve put in the route step in the Integromat flow to pick up whether “value” is empty. Since the detection flow is coming after the get steps, I’m not sure that Integromat automatically picked up the id or not…

Am I on the right track on this?

Wouldn’t the webhook feed the http request and then use the data from the http request to feed the response? Why are you use a router?

Also, I’m not entirely clear on what should happen once Strava receives the response from Integromat.

EDIT: Are you even using any data from Bubble after the initial POST to strava?

So the way I understood it…

Hits the redirect URL with the GET command and the code (this is the first step)
Need to return the code & status 200 back from the GET (this is the webhook response)
Strava is supposed to them return a subscriber ID. I had this as the branch off the router making a POST to Bubble to create a new thing with the subscriber ID

Somewhere I’m not getting the Strava response back from the webhook response. It’s like I need a second listener to get that after the Webhook response or am I misunderstanding this flow?

I think you just nailed it. The action you built here is to respond to the GET which confirms that you have permission to do this (I think). You will need a second webhook to listen for the next response to then send the subscriber ID to Bubble via the data API. This would be a backend workflow to modify a user or whatever data “thing” you are storing the subscriber ID in. Remember to check that you are allowing the data API to access this data “thing” and that the privacy settings allow it to be modified via API.

From Strava:
“Once you have successfully created a webhook events subscription by responding to the callback validation, you will receive a response to your original subscription creation POST request. This response will include the id of the newly created subscription. If creation of a new subscription fails, this response will instead include error information.”

It seems like that subscriber ID should be returned to the original POST from Bubble… hmm… I wonder if you should change the workflow to the following… bear with me:

1. Send Bubble POST to INTEGROMAT (Webhook #1), NOT Strava
2. Have Integromat initiate the request for subscriber creation (via Webhook #1) but set the redirect URL to Webhook #2.
3. Deal with the validation on the Integromat side (Webhook #2)
4. Capture the response in Webhook #1 and send it to Bubble via a “obj” backend workflow to write the subscriber ID to your database.

I’m sure there is probably a way to do this all in one webhook… but I’m not the best with Integromat and this is the first thing that comes to mind.


Scratch all that… you just need to reinitialize the API workflow where you’re sending the POST and it should now capture the subscriber ID.