Hello all! At one point, using a combination of custom code and Make webhooks, we were able to redirect to unique links via form submission. I’m trying to do so again, but am running into a lot of trouble. Here’s my current workflow:
Pre-requisite: add the following code into Settings > Custom Code > Code Inside Header:
User submits a form. Softr form settings should not be “Open Page.”
On submission, Softr sends the info to a Make webhook, like so:
Make receives the webhook.
Make then issues a 200 webhook response, with a redirect to a given site, like so:
What’s then supposed to happen is that the script added to the custom header above watches for the operation’s success, and then redirects to the website listed in Make. That’s not happening, though.
I’ve built this workflow before, but for some reason now I can’t get it to work. Can anyone spot something I’m missing or an error I’m making, or can anyone confirm that the above code is no longer functional with the React update?
I have multiple forms on the same page and it appears the script only works on the 1st form created? The redirect doesn’t work for me on form2 and form3.
@artur Is there a way to make this redirect happen within a modal? Its works when the redirect happens from a page but not when a form is submitted within a modal. I thought maybe it was Stripe blocking the opening of a payment link in a modal, so I switched the URL to google to test but that would not open in the modal either, so I’m assuming this is something I can workaround with the custom code in Softr? Attached is a screenshot of what the redirect inside the modal looks like. Any help sorting this out would be greatly appreciated!
@artur I’m noticing that whenever I have a webhook response module in Make, Sofrt will continually retrigger the initial wehbook every minute until it times out. So Make is getting triggered twice per form submit, and no response received. This only happens (I think) when the Make flow takes over 60 seconds to complete. When I remove the webhook response from the end of the Make flow entirely, the form only triggers once.
If the entire Make flow takes <60 seconds, the webhook response is correctly received by Softr.
So it must be something to do with timeouts? But I thought webhook timeouts were 120 seconds. Is this a bug?
@EnigmaXXIII I tried it out and it did send only one and the request took 75 seconds. Do you have anything visual to show? that could help me.
BTW keep in mind typically there is a preflight request and real request when it comes to calling this party APIs in case it helps.