Webhook POST response body capture

Hi,

Every time a new booking is created I have a webhook POST request that successfully creates a new resource to another place (basically creates a shortened version of the booking management url for that booking).

The remote server then creates the shortened link and sends it back (along with other things) in a response body. I already know how the response would look like I am not sure how to structure my post request to capture that response, filter out the short link and assign it to a field in the original booking.

@mtcp welcome to the Forum! I am not sure I follow your workflow here. You create a POST after booking with the shortened link for managing a booking. Then you want to parse this POST out with another system? Where are you trying to get this new link?

Hi and thank you for the reply. The idea is this:

I want to be able to send neat and short SMS messages that contain the booking management link. That link looks like this:

So I managed to send it using {MANAGE-BOOKING-LINK} shorthandcode to an outside service via a webhook that fires as soon as the booking is created. I am using a POST to the url shortening service. On my account there, I can see that the POST is received and the short url is created. I tested it and it works.

Now, I want to get back to youcanbook.me that shortened url, attach it as a value to a hidden or passthrough question for that booking so I can use it in my SMS’s. This is where my problem is.

The url shortening service returns a response when the short url is successfully created (I tested it with webhook.site) which is probably ignored by youcanbook.me?

Hope I was clear and thank you.

This one is tricky since our system cannot parse out a POST reply. You would need to explore using a tool like Make or Zapier to make the initial request to get the shortened URL. This then can be sent in an SMS to the customer. If you want to replace a Shorthand code you would have to PATCH the hidden form field with the shortened URL you get from your POST to that other system.