Form Trigger "Redirect URL" does not map field values (e.g. appid) in latest n8n

Hi n8n team,

I have encountered a persistent issue with the Form Trigger node’s “Redirect URL” feature, even after upgrading to the latest version of n8n.

Problem Description:

  • I created a form using the Form Trigger node, with fields named appid and secretkey.

  • In the “Redirect URL” setting, I want to use the value entered by the user for appid, like this:

text

Apply to 授权应用.json

用户授权{{ appid }}&scope=xxxx

  • However, after submitting the form, the redirect URL always has an empty value for appId, like:

text

Apply to 授权应用.json

…&appId=&scope=…

  • I tried using both {{ appid }} and {{field-0}} in the expression. The editor highlights {{field-0}} in green (as if it’s recognized), but the value is still not mapped in the redirect URL after submission.

  • The output JSON in the node shows the correct value for appid, but the redirect does not work.

What I have tried:

  • Upgraded n8n to the latest version.

  • Used both test and production form links.

  • Cleared browser cache and tried different browsers.

  • Tried different field names and variable expressions.

  • The problem persists regardless of these attempts.

Screenshots:

(I have attached screenshots showing the form setup, the output JSON, and the resulting redirect URL.)

Expected behavior:

The value entered by the user for appid should be correctly mapped into the redirect URL after form submission.

Actual behavior:

The redirect URL always has an empty value for appId.

Additional notes:

  • If I use a Webhook Trigger and a custom HTML form, I can map the variables and redirect as expected.

  • This issue seems to be specific to the Form Trigger node’s redirect feature.

Request:

Please help investigate this issue. Is this a known bug? Is there any workaround for using dynamic field values in the Form Trigger’s redirect URL?

Thank you!

  1. Use a full expression for the redirect URL (built-in support for partial mustache is not available):
  • In the Form Trigger node’s Redirect URL field click “Expression”.
  • Enter a single JavaScript expression, for example:
={{"https://yourapp.com/callback?appId=" + $json.appid + "&scope=xxxx"}}
  • Make sure the entire value is inside that one ={{ … }} wrapper (no plain {{appid}} fragments).
  1. If that still doesn’t work, handle the redirect yourself by:
  • Removing the Redirect URL from the Form Trigger.
  • Adding an HTTP Response (aka “Respond to Webhook”) node immediately after it.
  • Configure the HTTP Response node as:
    • Response Code: 302
    • Header Location → set via expression:
https://yourapp.com/callback?appId={{$json.appid}}&scope=xxxx
  • This will send a proper 302 redirect with your dynamic appid parameter.

Either approach will correctly inject the user’s appid into the URL at runtime.

Hi @yangyang3, welcome to community.

What’s your purpose with the query params? Like url?data=appid&scope=x, also have you trying to use Form close node and pass the query params there?

Maybe this will help you.

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