Webhooks and Dynamic Forms use

Hey guys!

Got a client right now who’s got a form on his website. Said form is essentially a product lookup that he’s got attached to a database, and it returns (currently through Zapier) a URL to the product that has been looked up. Only problem is that the URL has to be returned to him via Email or SMS, which is not ideal for his client base, who will lookup multiple products at a time. What we’re trying to do is edit the form so the “thank you” page of the form redirects to the URL that has been extracted from the product that’s been looked up. We tried it in Zapier and got as far as the URL getting pulled, but there doesn’t seem to be a step in Zapier that opens the URL after it’s been pulled. Is this possible to do in Make with webhooks?

I found this community post: Custom webhook -> how to disable opening new web page with ACCEPTED msg

That seems to show a successful webhook opening a new webpage that simply says “accepted” on it - is it possible to create a system that opens the product URL that is generated by the submission of the form?

Right now I’ve got a google forms module attached to send a webhook upon submission. The webhook successfully passes into the Make scenario and the second one is supposed to open the browser:


According to this video, if you use code 307/308 and add a key marked as “Location” with the value being the link, it should open automatically, but it is not currently doing so. Any suggestions on what to tweak here?

Welcome to the Make community!

This is correct, but ONLY if called from a web browser, and not from a server-to-server webhook call.

Can you provide a link to this form? What example data should we enter, and what should we see?

The webhook is sent from Google Forms backend, and NOT from the user’s browser. Therefore you cannot redirect the user’s browser to the webhook response, even if it valid.

2 Likes

Thank you! Pleasure to be here.

So in the video, the user had a 3rd party tool that they called a webhook from, which then did a few steps and then had a webhook response that made a new browser. What’s the difference between that and what I’m trying to do? Also, this guy seems to be asking to do the same thing at this link: Is it possible to redirect a webhook URL to a new URL - #4 by Donald_Mitchell

Here’s the form I’ve currently got going on: https://forms.gle/bMKAHySC3iD6mhX2A

The way I’ve set it up is to include this link (My Store
) in the answer to the third question at the bottom, just for testing purposes. Right now, I’ve got that answer being fed into the location key for the webhook response. SO in theory, if this proof of concept was working as I’d like it to, someone would feed a link into the third question, which would open in a new webpage shortly after the submit button has been pushed.

sorry, both links are not working, could you verify if they can be accessed in private browsing mode?

Apologies - google form is fixed. Destination shopify link is my client’s, so in the interest of responding quickly to you, you could replace it with any URL since it’s still proof of concept.

1 Like

It looks like Google Forms does not have the option to redirect users to another webpage after submission. They removed this functionality a while ago, and even Apps Script won’t allow you to do that.

Forms can notify a webhook, but whatever you are returning in the webhook response won’t be available to the user/web browser because it’s a one-way message.

You can try using another forms service instead of Google Forms.

2 Likes

Nice find!

Jotform can do it. Fillout.com can do it. As can many others.

4 Likes

Duplicated the form on Jotform and I see the feature to redirect, but how would I send the link back to the user after submission?

I run the same scenario from above with the updated webhook and the same checkmarks appear, but the page isn’t opening. Tried to open it via POST with an API call, but the error I get says the feature is down?

n

Sorry for the long answer, but this stuff was a little confusing when I had to start dealing with it.

Submitting the Jotform will send a POST to the URL you specify on the Thank You Page configuration page.
It needs to be a POST so you can pass the form data to it.
If it’s a GET, it sends nothing unless you hardcode it into the URL.
There doesn’t appear to be a way to put variables in the query string.

That URL will be a Make webhook URL, which now has access to the form’s variables.
Then, you use a Webhook Response with a 307 code and a Location header with the address you want to redirect them to.

The key is that the address you redirect to needs to be able to handle a POST - some don’t.
I think the Make redirect is going to cause the user that submitted the form to POST all that data in the form to the URL you redirect them to.

To try and get around this, use a 302 code instead of 307 or 308.
303 code might work at well in this case.

2 Likes

Hello @Mark_Bartel

I noticed that you opened a ticket with us and that the support team investigated this and gave you the following advice. I’m sharing it here for the benefit of the community. :arrow_down:

Make Support response:

The functionality to trigger a redirection would only work if the webhook address is visited/clicked on in a browser. For example in the form in question, the user who fills in the form will only be redirected if the webhook address has been linked to the ‘Submit’ button in the said form.

image

1 Like