Respond to Webhook Redirect fails as undefined

Describe the problem/error/question

I have a workflow that starts with a user clicking a webhook link, then displays an n8n form, and lastly displays a second form after the first is submitted. This worked fine prior to upgrading to version 1.113.3 yesterday.

Now the user is getting the following response from the second “Respond to Webhook” node. It fails if I save the $execution.resumeFormUrl value first and it fails if I setup the node to specifically return a 302 response status with the Location header set.

{“code”:0,“message”:“Invalid value "undefined" for header "location"”}

What is the error message (if any)?

This is what the web browser displays instead of redirecting to the new url it should get in the location header.

{“code”:0,“message”:“Invalid value "undefined" for header "location"”}

Please share your workflow

Share the output returned by the last node

Note, to get to this final result you need to manually change the “…/step1” to “…/step2” in the address bar and hit enter when you get the error above. Otherwise, the workflow will never finish.

Form Submitted

Your response has been recorded

Information on your n8n setup

  • n8n version: 1.113.3 Community Edition
  • Database (default: SQLite): PostgresQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): container via AWS ECS
  • Operating system: The OS for the n8n.io/latest container

New Information

The second Response to Webhook node is returning an http response code of 500, Internal Server Error.

The error in the container log is:

Error in handling webhook request POST /form-waiting/161827/step1: Invalid value “undefined” for header “location”

I created this bug report for this question: Respond to Webhook Redirect fails as undefined · Issue #20336 · n8n-io/n8n · GitHub

hello @erockx

Why are you not using the Form nodes?

Because to use multiple form nodes, you must start with a n8n Form trigger and my workflow needs to start with a webhook because it’s being kicked off by a Slack button click that contains query data.

Also, the Wait node allows me to show json data in the field names. I don’t think I can do that in Forms.

Thanks,
Eric

well, yeah, something is not working. Seems the Wait node forget to add Location header after submitting the form.

Try the Form nodes. you can pass query to it as well

I still don’t think I can use the Form nodes because I to do some API’s calls before showing the form, which I represent in the “Do a bunch of stuff” NOOP node in the example workflow I originally provided.

Note in my original workflow, the webhook comes in, data gets retrieved, then the form is displayed to the user. It’s my understanding that the form trigger node must immediately display the form without the ability to go and gather the data I need to show in the form.

Thanks,
Eric

You can open a form without any fields (just a basic welcome text), then process whatever you need, then show the next form page based on your actions, and so on and so on

Got an email asking if this was resolved; no is has not been resolved. I created this support ticket for the problem as well: Respond to Webhook Redirect fails as undefined · Issue #20336 · n8n-io/n8n · GitHub.

I’d really like to avoid re-writing this workflow using forms. That would add an extra unnecessary click for my users, who use this workflow up to 100 of times a day.

This workflow has been working for months before something changed between versions 1.110 and 1.113 of the Community Edition.

Thanks,
Eric

The example Simplest way to create a Stripe Payment Link | n8n workflow template is also not working with the current version.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.