Webhook 204 "no response" redirects to blank page on IOS

I have a webhook trigger set up on a webflow form that sends info to airtable and i don’t want to be redirected to the default page when a user presses submit.
So i went for 204 no response and have an animation to pop-up on my site when a successful submission occurs. Which works great, but on all IOS devices (phones/tablets) it redirects to a blank page instead. Android doesn’t have this issue apparently.
Can anyone help please?

Thanks!

Hi @cretubogdan

First off, welcome to the Pipedream community. Happy to have you!

You can customize the response of the workflow to redirect to another page, such as a /thank-you page set up on Webflow.

Then in the final step in your workflow, use a Node.js code step to return a 307 redirect with the Location of the URL you’d like to redirect the user to:

// To return a custom HTTP response, use $.respond() [requires HTTP trigger]
export default defineComponent({
  async run({ steps, $ }) {
    await $.respond({
      status: 307,
      headers: {
        Location: 'https://<your webflow website>.com/thank-you'
      },
    })
  },
})
1 Like

Hi Pierce,

You’re a lifesaver! Thank you!

I’ve been wracking my brain with this issue for a few days, and my Node.js skills are either bad or sad :).

Thanks!

1 Like