Form Trigger icon

Form Trigger

Starts a workflow when Form events occur

Overview

The Form Trigger node is designed to start an n8n workflow when a user submits a web form. It dynamically generates and serves a customizable HTML form at a specified path, then triggers the workflow upon form submission (via POST request). This node is useful for collecting data from users or clients through a web interface, such as contact forms, surveys, registration forms, or feedback forms.

Practical examples:

  • Embedding a contact form on your website that sends submissions directly into your n8n workflow.
  • Creating internal tools for staff to submit requests or reports.
  • Collecting survey responses and processing them automatically.

Properties

Name Type Meaning
Path string The URL path where the form will be accessible (e.g., forms/my-form). Required.
Page Title string The title displayed at the top of the form page.
Page Description string A description shown below the title, providing context or instructions for the form.
Form Type options Determines how the form is built: "Custom Form HTML" (use your own HTML) or "Form Builder" (visual builder).
Form HTML string Custom HTML for the form body. Only used if "Form Type" is set to "Custom Form HTML".
Fields fixedCollection List of fields for the form (used with "Form Builder"). Each field includes label, name/ID, input type, etc.
Options collection Additional settings for the form, including:
- Bootstrap URL string URL for Bootstrap CSS stylesheet.
- CSS File string URL for custom CSS file.
- Form ID string The HTML id attribute for the form element.
- Form Name string The HTML name attribute for the form element.
- Javascript string JavaScript code for handling form submission (default uses jQuery AJAX).
- jQuery string URL for the jQuery library.
- Submit Button Label string Text displayed on the form's submit button.

Output

  • On form submission (POST request), the node outputs a single item containing the submitted form data in the json field. The structure of this output matches the names/IDs of the form fields defined in the configuration.
    [
      {
        "field1": "value1",
        "field2": "value2",
        "...": "..."
      }
    ]
    
  • On GET requests (when displaying the form), no workflow data is returned; instead, the node serves the HTML form.

Dependencies

  • No external API keys are required.
  • The node relies on public CDN URLs for Bootstrap and jQuery by default, but these can be customized.
  • No special n8n environment variables are needed.

Troubleshooting

Common issues:

  • Form not displaying: Ensure the "Path" property is unique and does not conflict with other webhooks.
  • Form fields missing: If using "Form Builder," make sure you have added at least one field in the "Fields" property.
  • Submission not triggering workflow: Confirm that the form's action and method match the node's configuration (action should be #, method should be POST).
  • CORS or resource loading errors: If you customize Bootstrap, jQuery, or CSS URLs, ensure they are accessible from the client browser.

Error messages:

  • "Cannot GET /your-path": The path may not match the configured "Path" property.
  • "Something went wrong." (on the form): Indicates a problem with the AJAX submission or server response. Check network requests and node configuration.

Links and References

Discussion