Form Trigger

Starts the workflow when a form is submitted

Overview

This node is a Form Trigger that starts an n8n workflow when a form is submitted. It allows users to define custom form fields dynamically, specifying their types and attributes such as whether they are required, hidden, or disabled. This trigger is useful in scenarios where workflows need to be initiated based on user input collected through forms, such as contact forms, surveys, registrations, or any custom data collection.

For example, you could use this node to start a workflow when a customer submits a support request form, capturing the form data and then processing it further (e.g., sending notifications, creating tickets).

Properties

Name Meaning
Form Fields A collection of form fields to include in the form. Each field has:
- Field Type: The type of the form field (loaded dynamically from available field types).
- Field Name: The name/key of the form field.
- Required: Whether the field must be filled out before submission (true/false).
- Hidden: Whether the field is hidden in the form (true/false).
- Disabled: Whether the field is disabled and not editable (true/false).

The "Form Fields" property supports multiple values and can be sorted, allowing flexible form design.

Output

The node outputs the submitted form data as JSON under the json key. Specifically, the output contains:

  • json: An object representing the submitted form data, with keys corresponding to the form field names and values as entered by the user.

No binary data output is produced by this node.

Example output structure:

{
  "json": {
    "fieldName1": "value1",
    "fieldName2": "value2",
    ...
  }
}

Dependencies

  • The node depends on a dynamic registry of form field types loaded via a method that fetches available field options.
  • No external API keys or services are required.
  • The node uses a webhook internally to receive form submissions, so the n8n instance must be accessible via a public URL or tunnel for the webhook to work.

Troubleshooting

  • Unknown field type error: If a form field type is specified that does not exist in the field registry, the node will throw an error indicating the unknown field type. To fix this, ensure the field type is valid and available.
  • Webhook accessibility issues: Since the node relies on a webhook to receive form submissions, if the webhook URL is not publicly accessible, the form submissions will not trigger the workflow. Make sure your n8n instance is reachable externally or use tunneling solutions.
  • Missing required fields: If a form submission omits fields marked as required, the form or the workflow logic should handle validation accordingly. This node itself does not enforce validation beyond marking fields as required.

Links and References

Discussion