Overview
This node acts as a form trigger in n8n workflows, starting the workflow when form events occur. It serves two main purposes: displaying a customizable HTML form via a GET request and handling form submissions via a POST request. Users can either provide custom HTML for the form or build a form using a simple form builder interface. This node is useful for scenarios where you want to collect user input through a web form and trigger automated workflows based on the submitted data, such as contact forms, surveys, or feedback collection.
Use Case Examples
- A user creates a contact form with fields like name, email, and message using the form builder option. When a visitor submits the form, the workflow is triggered to send an email notification.
- A developer uses custom HTML to design a complex form for event registration. Upon submission, the workflow processes the registration data and updates a database.
Properties
| Name | Meaning |
|---|---|
| Path | The URL path where the form is accessible and where submissions are posted. |
| Page Title | The title displayed on the form page. |
| Page Description | A description or instructions shown on the form page. |
| Form Type | Determines whether to use custom HTML for the form or a simple form builder. |
| Form HTML | The custom HTML content for the form body, used only if Form Type is 'Custom Form HTML'. |
| Fields | A collection of form fields with properties like label, name, input type, default value, placeholder, required, and read-only status, used only if Form Type is 'Form Builder'. |
| Options | Additional form options including Bootstrap CSS URL, custom CSS file URL, form ID, form name, JavaScript for form submission, jQuery URL, and submit button label. |
Output
JSON
status- Status of the form submission response, e.g., 'ok'.workflowData- Array containing the submitted form data as JSON objects.
Troubleshooting
- Ensure the 'Path' parameter is unique and correctly set to avoid conflicts with other webhooks.
- If using custom HTML, verify that the form's action attribute posts to the correct path to trigger the workflow.
- Check that required fields are properly marked and that the form submission JavaScript matches the form ID and name to avoid submission errors.
- If the form does not display correctly, verify the URLs for Bootstrap CSS, custom CSS, and jQuery are accessible and correct.