Redirecting and sending a webhook simultaneously

I currently have a development where customers have to click a button to accept a proposal.

That button is linked to Airtable to a formula containing URL of a webhook+recordid.

The button is working perfectly, the problem is that it redirects to the webhook URL.
I would like to be able to automatically redirect to a new SOFTR page called “congratulations” and trigger the webhook in the background to update the status from Active to Accepted.

Is there any way to do this?

Thanks!

Hi!
The webhook comes from Make?

Yes, sorry, I forgot to give that information.

The automation is mounted in Make

Ok, so you need to add a webhook response module.
Just to be clear, does your workflow look like this (more or less)?

  1. Make Webhook
    Then
  2. Airtable update or create
    ?

Here is a workflow to delete an item in Softr, with a button click.

The important part for you is the last module: webhook response.
In your case I think it would be an update action in Airtable, am I right?
It doesn’t change anything.
With this workflow type (in your case, with an “update a record”), the webhook will trigger the action in airtable, then airtable update will be displayed to Softr. Meanwhile, your user will be sent to a congratulations page. Thanks to a webhook response. If you aready have set your congrats page :point_down:

Here is the setup (just change the destination url, “Value”, and you’re set)

Thank you very much!

I have done a test redirecting with a basic HTML code and it has worked perfectly!

The scenario is the same as yours, but with an update to record

I am going to try to configure the webhook response module with the congratulations page sending name parameters for example.

Thanks for the help and quick response!

You’re welcome!

I am doing something wrong.

I have created the “congratulations” page and configured the module just like your example.

In this case I am doing something wrong.

The example with html code had worked, but when I put the final url I’m not getting it to work.

Where can be the error?

Thanks!

Key = Location

1 Like

@matthieu_chateau and @RafaPG , excellent examples - I am attempting the same, but what should the ‘On form submit’ be set to in Softr?

Workflow:

  1. User submits form, triggers the Make webhook
  2. Updates are made to Airtable, and another Webhook response returns the 302 and redirect
  3. Softr however does not interpret the response correctly and throws a ‘Something went wrong!’ error

Note that the ‘detailUrl’ itself is valid (including ‘https://’)

I suspect that it’s the ‘ON FORM SUBMIT’ in Softr that’s not configured correctly, but neither ‘Do nothing’, ‘Open external URL’, or ‘Open page’ seems to work.

Alternatively, should I use the script as mentioned in Redirect via Webhook After Form Submission - #12 by artur instead? The value of the URL to be redirected to will be dynamic, but hoping to do without custom code.

Much appreciate your thoughts!

Did you choose “send to make” in the softr form block?

What is not working in your workflow exactly? The redirect?
Or when the form is sent, there is a “something went wrong” and nothing is sent to make?

Can you click, as a first test, in the first module, on “redetermine data structure” ?
All must be set up in Make before testing in live. Otherwise Make will bug, that’s a classic mistake

The Destination is set to ‘Send to Make’, and it correctly goes through the Make scenario.

However, it is the redirect itself that fails indeed. I’ve tried both a ‘302’ Webhook response with a ‘Location’ parameter and URL value, as well as a ‘200’ response with a body:

{"redirect":"https://www.etc.com"}

Wondering if it’s the On Form Submit action that causes this to fail?

Hi @irestmycase!

Let’s see if this can help you.

Let me explain my flow:

Airtable:
I have a field in Airtable with the formula Concatenate( Webhook+parameters by query string+recorid).

In softr, I have configured the button to use an external url (Airtable URL field) as it is generated dynamically with the parameters.

My Make use case:

Edit: In Make, the final url is the destination URL, of the web where I want the client to finish its journey. In my case “Welcome”.

I hope you can solve the doubt.
Best regards!

Ah, got it. Thanks for the extensive explanation! I don’t have the Airtable field with the webhook URL and the parameters as these are user-specific. As a result I don’t have an ‘External URL’ to redirect to.

With this in mind, I have used the approach as detailed in Redirect via Webhook After Form Submission - #5 by Nickshas instead. The custom script awaits the webhook response, and redirects the user to the new location instead.