AutomationFlowsGeneral › Generate & Email Custom Nda Documents From Web Form Submissions

Generate & Email Custom Nda Documents From Web Form Submissions

ByCustomJS @customjs on n8n.io

> ⚠️ Notice: > This workflow uses the HTML to Docx node from customjs.space, which requires a self-hosted n8n instance and a CustomJS API key.

Webhook trigger★★★☆☆ complexity10 nodesEmail Send@Custom Js/N8N Nodes Pdf Toolkit
General Trigger: Webhook Nodes: 10 Complexity: ★★★☆☆ Added:

This workflow corresponds to n8n.io template #9406 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "kKj0sdENnEH9DPqg",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Landingpage -> NDA Word Document (Docx) -> Email",
  "tags": [],
  "nodes": [
    {
      "id": "4b6806d1-ef93-4132-9236-ac1a3e15f91d",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -112,
        -48
      ],
      "parameters": {
        "text": "Hello,\n\nHere is the requested NDA form.\n\nBest\nHenrik",
        "options": {
          "attachments": "data"
        },
        "subject": "NDA",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "4f0d8d76-8d96-470e-b30f-ec7bfc140517",
      "name": "FormData Endpoint",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -896,
        -48
      ],
      "parameters": {
        "path": "2f94bacb-f629-4053-a204-cab2ac8fd326",
        "options": {
          "responseData": "<h1>Hello World</h1>"
        },
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "92960779-4b49-47a1-b934-000a64f922b6",
      "name": "HTML for Landingpage",
      "type": "n8n-nodes-base.html",
      "position": [
        -352,
        -448
      ],
      "parameters": {
        "html": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>Request a NDA</title>\n  <script src=\"https://cdn.tailwindcss.com\"></script>\n</head>\n<body class=\"bg-gray-50 min-h-screen flex flex-col items-center justify-center p-6\">\n\n  <div class=\"w-full max-w-md bg-white shadow-xl rounded-2xl p-8\">\n    <h1 class=\"text-2xl font-semibold text-gray-800 mb-4 text-center\">\n      Request a NDA\n    </h1>\n    <p class=\"text-gray-500 text-center mb-6\">\n      Fill in your personal details to receive your NDA.\n    </p>\n\n    <!-- Success Message -->\n    <div id=\"success-message\" class=\"hidden bg-green-50 border border-green-200 text-green-700 p-4 rounded-xl text-center mb-4\">\n      \u2705 Your request has been successfully submitted!\n    </div>\n\n    <!-- Error Message -->\n    <div id=\"error-message\" class=\"hidden bg-red-50 border border-red-200 text-red-700 p-4 rounded-xl text-center mb-4\">\n      \u274c Something went wrong. Please try again.\n    </div>\n\n    <!-- Form -->\n    <form id=\"quote-form\" class=\"space-y-4\">\n      <div>\n        <label class=\"block text-gray-700 font-medium mb-1\">First Name</label>\n        <input\n          type=\"text\"\n          name=\"firstName\"\n          required\n          class=\"w-full border border-gray-300 rounded-xl px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none\"\n        />\n      </div>\n\n      <div>\n        <label class=\"block text-gray-700 font-medium mb-1\">Last Name</label>\n        <input\n          type=\"text\"\n          name=\"lastName\"\n          required\n          class=\"w-full border border-gray-300 rounded-xl px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none\"\n        />\n      </div>\n\n      <div>\n        <label class=\"block text-gray-700 font-medium mb-1\">Address</label>\n        <input\n          type=\"text\"\n          name=\"address\"\n          required\n          class=\"w-full border border-gray-300 rounded-xl px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none\"\n        />\n      </div>\n\n      <div>\n        <label class=\"block text-gray-700 font-medium mb-1\">House No.</label>\n        <input\n          type=\"text\"\n          name=\"houseNo\"\n          required\n          class=\"w-full border border-gray-300 rounded-xl px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none\"\n        />\n      </div>\n\n      <div>\n        <label class=\"block text-gray-700 font-medium mb-1\">Postal Code</label>\n        <input\n          type=\"text\"\n          name=\"postalCode\"\n          required\n          class=\"w-full border border-gray-300 rounded-xl px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none\"\n        />\n      </div>\n\n      <div>\n        <label class=\"block text-gray-700 font-medium mb-1\">City</label>\n        <input\n          type=\"text\"\n          name=\"city\"\n          required\n          class=\"w-full border border-gray-300 rounded-xl px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none\"\n        />\n      </div>\n\n      <div>\n        <label class=\"block text-gray-700 font-medium mb-1\">Country</label>\n        <input\n          type=\"text\"\n          name=\"country\"\n          required\n          class=\"w-full border border-gray-300 rounded-xl px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none\"\n        />\n      </div>\n\n      <button\n        type=\"submit\"\n        id=\"submit-btn\"\n        class=\"w-full bg-blue-600 text-white py-3 rounded-xl hover:bg-blue-700 transition-all\"\n      >\n        Submit Request\n      </button>\n    </form>\n  </div>\n\n  <footer class=\"mt-6 text-gray-400 text-sm\">\n    \u00a9 <span id=\"year\"></span> SecureQuote Insurance Co.\n  </footer>\n\n  <script>\n    document.getElementById('year').textContent = new Date().getFullYear();\n\n    const form = document.getElementById('quote-form');\n    const successMsg = document.getElementById('success-message');\n    const errorMsg = document.getElementById('error-message');\n    const submitBtn = document.getElementById('submit-btn');\n\n    form.addEventListener('submit', async function (e) {\n      e.preventDefault();\n      successMsg.classList.add('hidden');\n      errorMsg.classList.add('hidden');\n      submitBtn.disabled = true;\n      submitBtn.textContent = \"Submitting...\";\n\n      const formData = {\n        firstName: form.firstName.value,\n        lastName: form.lastName.value,\n        address: form.address.value,\n        houseNo: form.houseNo.value,\n        postalCode: form.postalCode.value,\n        city: form.city.value,\n        country: form.country.value,\n      };\n\n      try {\n        const response = await fetch(\"{{ $json.FormEndpoint }}\", {\n          method: \"POST\",\n          headers: { \"Content-Type\": \"application/json\" },\n          body: JSON.stringify(formData),\n        });\n\n        if (response.ok) {\n          form.reset();\n          successMsg.classList.remove('hidden');\n        } else {\n          throw new Error(\"Response not OK\");\n        }\n      } catch (err) {\n        console.error(\"Form submit error:\", err);\n        errorMsg.classList.remove('hidden');\n      }\n\n      submitBtn.disabled = false;\n      submitBtn.textContent = \"Submit Request\";\n    });\n  </script>\n</body>\n</html>\n"
      },
      "typeVersion": 1.2
    },
    {
      "id": "dc09be11-d81d-44ce-98fe-3d4c047a5e11",
      "name": "Landingpage Endpoint",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -880,
        -448
      ],
      "parameters": {
        "path": "2f94bacb-f629-4053-a204-cab2ac8fd326",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "529ff102-0807-4d68-9f6b-1ebe2b1d3758",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -112,
        -448
      ],
      "parameters": {
        "options": {},
        "respondWith": "text",
        "responseBody": "={{ $json.html }}"
      },
      "typeVersion": 1.4
    },
    {
      "id": "5540ef36-3fb0-41a4-bed8-d65a5e7d36f1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -560
      ],
      "parameters": {
        "width": 1024,
        "height": 320,
        "content": "## Landingpage Server\nYou can access the landing page at the webhook address."
      },
      "typeVersion": 1
    },
    {
      "id": "cbdf6a73-557f-4037-8752-61a66bc06f2d",
      "name": "Set Form Endpoint",
      "type": "n8n-nodes-base.set",
      "position": [
        -624,
        -448
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "509804fc-dbfa-472d-87d3-1f683e146856",
              "name": "FormEndpoint",
              "type": "string",
              "value": "={{ $json.webhookUrl }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "519070ad-6fab-4008-93c9-9fd904d3d92c",
      "name": "HTML to Docx",
      "type": "@custom-js/n8n-nodes-pdf-toolkit.Html2Docx",
      "position": [
        -352,
        -48
      ],
      "parameters": {
        "htmlInput": "={{ $json.html }}"
      },
      "credentials": {
        "customJsApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "02519104-5034-4e4c-845a-c8a56175aa83",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -144
      ],
      "parameters": {
        "width": 1024,
        "height": 320,
        "content": "## FormData Endpoint\nThe data for the form is received here from the landing page."
      },
      "typeVersion": 1
    },
    {
      "id": "471c6774-3892-4ed3-9703-aff9b05ff2d2",
      "name": "NDA (HTML Version)",
      "type": "n8n-nodes-base.html",
      "position": [
        -608,
        -48
      ],
      "parameters": {
        "html": "<!DOCTYPE html>\n<html lang=\"de\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Non-Disclosure Agreement</title>\n    <style>\n        body {\n            font-family: 'Times New Roman', Times, serif;\n            font-size: 12pt;\n            line-height: 1.5;\n            color: #000000;\n        }\n        .header p {\n            margin: 0;\n            padding: 0;\n            line-height: 1.4;\n        }\n        h1 {\n            text-align: center;\n            font-size: 16pt;\n            font-weight: bold;\n        }\n        p {\n            margin: 0 0 0.5cm 0;\n        }\n        ul {\n            list-style-type: disc;\n            padding-left: 40px;\n        }\n        .clause-title {\n            font-weight: bold;\n        }\n    </style>\n</head>\n<body>\n    <div>\n        <div class=\"header\" style=\"padding-bottom: 1cm; border-bottom: 1px solid #000; margin-bottom: 2cm;\">\n            <p><b>SecureQuote Insurance Co.</b></p>\n            <p>1234 Main Street, London, United Kingdom</p>\n            <p>Telefon: +1234567890 | E-Mail: user@example.com</p>\n        </div>\n\n        <h1>Non-Disclosure Agreement (NDA)</h1>\n\n        <p>This Non-Disclosure Agreement (\u201cAgreement\u201d) is entered into on <b>{{ $json.body.currentDate }}</b> between:</p>\n        <p>\n            <b>{{ $json.body.firstName }} {{ $json.body.lastName }}</b><br>\n            {{ $json.body.address }} {{ $json.body.houseNo }}<br>\n            {{ $json.body.postalCode }} {{ $json.body.city }}<br>\n            {{ $json.body.country }}<br>\n            (hereinafter referred to as \u201cRecipient\u201d)\n        </p>\n        <p>and</p>\n        <p>\n            <b>SecureQuote Insurance Co.</b><br>\n            (hereinafter referred to as \u201cDiscloser\u201d)\n        </p>\n        <p>The parties agree as follows:</p>\n\n        <div>\n            <p class=\"clause-title\">1. Definition of Confidential Information</p>\n            <p>\u201cConfidential Information\u201d means all non-public information disclosed by the Discloser to the Recipient, whether in written, oral, electronic, or any other form, including but not limited to business plans, strategies, financial data, customer information, and technical details.</p>\n        </div>\n        <div>\n            <p class=\"clause-title\">2. Obligations of the Recipient</p>\n            <p>The Recipient agrees to:\n                <ul>\n                    <li>Maintain the confidentiality of the Confidential Information;</li>\n                    <li>Not disclose it to any third party without prior written consent from the Discloser;</li>\n                    <li>Use the information solely for the purpose agreed upon by both parties.</li>\n                </ul>\n            </p>\n        </div>\n        <div>\n            <p class=\"clause-title\">3. Exclusions</p>\n            <p>The obligations under this Agreement shall not apply to information that:\n                <ul>\n                    <li>Is or becomes publicly available without breach of this Agreement;</li>\n                    <li>Was lawfully received from a third party without restriction;</li>\n                    <li>Was independently developed without reference to the Confidential Information.</li>\n                </ul>\n            </p>\n        </div>\n        <div>\n            <p class=\"clause-title\">4. Duration</p>\n            <p>This Agreement shall commence on the date above and remain in effect for a period of two (2) years, unless terminated earlier by mutual written consent.</p>\n        </div>\n        <div>\n            <p class=\"clause-title\">5. Return or Destruction</p>\n            <p>Upon termination of this Agreement or upon request, the Recipient shall promptly return or destroy all Confidential Information.</p>\n        </div>\n        <div>\n            <p class=\"clause-title\">6. Governing Law</p>\n            <p>This Agreement shall be governed by and construed in accordance with the laws of England and Wales.</p>\n        </div>\n        \n        <br><br>\n\n        <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n            <tr>\n                <td width=\"50%\" valign=\"top\">\n                    <hr>\n                    <b>{{ $json.body.firstName }} {{ $json.body.lastName }}</b><br>\n                    Recipient\n                </td>\n                <td width=\"50%\" valign=\"top\">\n                    <hr>\n                    <b>SecureQuote Insurance Co.</b><br>\n                    Discloser\n                </td>\n            </tr>\n        </table>\n    </div>\n</body>\n</html>"
      },
      "typeVersion": 1.2
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "380216fa-ff30-4bf5-9fef-55bad9c7775a",
  "connections": {
    "HTML to Docx": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FormData Endpoint": {
      "main": [
        [
          {
            "node": "NDA (HTML Version)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Form Endpoint": {
      "main": [
        [
          {
            "node": "HTML for Landingpage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NDA (HTML Version)": {
      "main": [
        [
          {
            "node": "HTML to Docx",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML for Landingpage": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Landingpage Endpoint": {
      "main": [
        [
          {
            "node": "Set Form Endpoint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

&gt; ⚠️ Notice: &gt; This workflow uses the HTML to Docx node from customjs.space, which requires a self-hosted n8n instance and a CustomJS API key.

Source: https://n8n.io/workflows/9406/ — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

This workflow automates flight price comparison across multiple booking platforms (Kayak, Skyscanner, Expedia, Google Flights). It accepts natural language queries, extracts flight details using NLP,

Ssh, Email Send
General

Automate the tracking of customer subscription expiry dates, create renewal tasks in ClickUp, and dispatch friendly email reminders before the due date. The workflow listens for incoming subscription

Email Send
General

[NooviChat] Onboarding Pós-Pagamento (Exp 6). Uses emailSend. Webhook trigger; 11 nodes.

Email Send
General

This automated n8n workflow processes student applications on a scheduled basis, validates data, updates databases, and sends welcome communications to students and guardians.

Microsoft Excel, Email Send
General

Rejected Workflow. Uses emailSend, httpRequest, respondToWebhook. Webhook trigger; 6 nodes.

Email Send, HTTP Request