# n8n

> Trigger an n8n workflow on every submission and automate form processing across thousands of apps.

Source: https://docs.formclick.io/html-forms/n8n

The n8n integration sends each new submission to an n8n workflow as JSON. From there you can route it to a CRM, Slack, a database, an AI step or any of the apps n8n connects to. It is a native webhook integration: you paste your n8n Production Webhook URL, with no OAuth app or API key needed. It works with n8n Cloud and self-hosted n8n.

## Before you start

- An n8n workflow that starts with a **Webhook** trigger node.
- Set the node’s **HTTP Method** to `POST`.
- Activate the workflow and copy the **Production URL** (it contains `/webhook/`). The **Test URL** (`/webhook-test/`) only listens while you click “Listen for test event” in the editor.
- Your n8n instance must be reachable on the public internet. Private and internal addresses are rejected.

## Setup

### Step 1: Open the integration

Open your form → **Integrations**, filter by **Automation** and click **Connect** on **n8n**.

### Step 2: Paste the webhook URL

Paste your n8n **Production Webhook URL**.

### Step 3: Add authentication (optional)

If the Webhook node uses authentication, pick the same type and enter its credentials (see below).

### Step 4: Test the connection

Click **Test Connection**. Formclick sends a small `formclick.connection_test` event and shows n8n’s response.

### Step 5: Send a test submission

Click **Send Test Submission**. It uses the form’s latest submission (or sample data) in the live format, so you can map fields in the next n8n nodes.

### Step 6: Save

Leave **Enable for this form** on and click **Save & Connect**. Every new submission now runs your workflow.

## Authentication

Choose the option that matches the **Authentication** setting of your n8n Webhook node.

| Option | What Formclick sends |
| --- | --- |
| None | No auth header. Anyone with the URL can trigger the workflow, so keep it private. |
| Header Auth | Your header name and value, e.g. `X-N8N-Key: …`. |
| Basic Auth | `Authorization: Basic …` built from your username and password. |
| JWT / Bearer token | `Authorization: Bearer <token>`. |

> **Tip:** Your webhook URL and credentials are encrypted at rest. After saving they are only shown masked; leave a masked field as it is to keep the saved value.

## Payload

Each new, non-spam submission is sent once as a `POST` with `Content-Type: application/json` and `User-Agent: Formclick-n8n/1.0`.

```json
{
  "event": "submission.created",
  "submissionId": "7f6c2b8e-…",
  "formId": "0d1a4f3c-…",
  "formName": "Contact form",
  "submittedAt": "2026-11-09T10:24:31.000Z",
  "fromName": "Jane Smith",
  "fromEmail": "jane@example.com",
  "data": {
    "name": "Jane Smith",
    "email": "jane@example.com",
    "message": "Hi! Could we book a demo next week?"
  }
}
```

In n8n the fields are under `body`, for example `{{ $json.body.data.email }}`. Test events also include `"test": true`, so you can filter them out with an **If** node.

## Manage the connection

- **Enable or disable** it per form with **Enable for this form**.
- **Edit** the URL or authentication at any time from the same screen.
- **Disconnect** to stop sending submissions to n8n.
- Failed deliveries (for example if the workflow is inactive) are retried automatically.

## Troubleshooting

| Response | What to do |
| --- | --- |
| `404` | The workflow isn’t active, or you used the Test URL. Activate the workflow and use the Production URL. |
| `401` / `403` | The authentication doesn’t match the Webhook node. Check the type, header name and secret. |
| Redirect (`3xx`) | Use the final webhook URL. Formclick doesn’t follow redirects. |
| Timeout | Set the Webhook node to respond **Immediately** so n8n replies before running long steps. |
