Skip to content

Bugs with new n8n Form nodes #11823

Description

@barn4k

Bug Description

I have two similar issues with the new Form nodes.
The first one is that it return the Error 500 if there is only the trigger node and Form ending node (no Next Page nodes in-between)
The second issue is with the Form ending node, which becomes broken if I sent an expression to it

Both issues will result in Error 500, but with different error text.
For the first one:
image

For the second one:
image

To Reproduce

First issue:

{
  "meta": {
    "instanceId": "ea8ccd7cb9d9fc233a4683c7569b952c9669ba9d3ba1459d89a9944d357fa5b3"
  },
  "nodes": [
    {
      "parameters": {
        "formTitle": "Lambda payload generator",
        "formDescription": "descr",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Press the Next button"
            }
          ]
        },
        "options": {
          "buttonLabel": "Next"
        }
      },
      "id": "5deca3ea-0469-4ed0-80ac-a255ecb5fd04",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        960,
        680
      ],
      "webhookId": "411cbebe-fa97-434b-a096-894992c9974d"
    },
    {
      "parameters": {
        "operation": "completion",
        "completionTitle": "title",
        "completionMessage": "=message:\n{{ $json }}",
        "options": {}
      },
      "id": "4a787dc6-27ad-400f-aefc-96be5c5daf33",
      "name": "Form2",
      "type": "n8n-nodes-base.form",
      "typeVersion": 1,
      "position": [
        1200,
        680
      ],
      "webhookId": "31884a7b-0b43-45e0-bf4c-43fb2e20ab60"
    }
  ],
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Form2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {}
}

Second issue

{
  "meta": {
    "instanceId": "ea8ccd7cb9d9fc233a4683c7569b952c9669ba9d3ba1459d89a9944d357fa5b3"
  },
  "nodes": [
    {
      "parameters": {
        "formTitle": "Lambda payload generator",
        "formDescription": "descr",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Press the Next button"
            }
          ]
        },
        "options": {
          "buttonLabel": "Next"
        }
      },
      "id": "5deca3ea-0469-4ed0-80ac-a255ecb5fd04",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        1000,
        480
      ],
      "webhookId": "411cbebe-fa97-434b-a096-894992c9974d"
    },
    {
      "parameters": {
        "operation": "completion",
        "completionTitle": "title",
        "completionMessage": "=message: {{ JSON.stringify($json.action) }}",
        "options": {}
      },
      "id": "0a429fa0-6da0-4a03-8d2b-8df50e896e9c",
      "name": "Form",
      "type": "n8n-nodes-base.form",
      "typeVersion": 1,
      "position": [
        1620,
        480
      ],
      "webhookId": "31884a7b-0b43-45e0-bf4c-43fb2e20ab60"
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    \"action\": \"some action\",\n    \"params\": {\n      \"upn\": \"testuser@example.com\",\n      \"query\": \"\",\n      \"max_req\": \"\"\n    },\n    \"settings\": {\n      \"show_input\": false\n    }\n  }\n]"
      },
      "id": "0949d804-d638-44d0-904a-2f370c7fc94b",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1420,
        480
      ]
    },
    {
      "parameters": {
        "formFields": {
          "values": [
            {
              "fieldLabel": "Press the end button"
            }
          ]
        },
        "options": {
          "buttonLabel": "End"
        }
      },
      "id": "74b3082c-608d-42d6-9d8f-cef00bc38dc6",
      "name": "Form1",
      "type": "n8n-nodes-base.form",
      "typeVersion": 1,
      "position": [
        1200,
        480
      ],
      "webhookId": "c077fa53-1bc0-4c89-9233-d597b0b56e71"
    }
  ],
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Form1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form1": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {}
}

Expected behavior

The Ending node will proper return the output

Operating System

cloud

n8n Version

1.68.0

Node.js Version

cloud

Database

SQLite (default)

Execution mode

main (default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions