{
  "name": "Company Creation from Webhook",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "company-intake",
        "options": {}
      },
      "id": "e440c3d5-dc40-4c7c-9790-27e0b443e441",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        0,
        140
      ],
      "webhookId": "dc80ebda-1cc7-4cfc-9d98-0de8722ec451"
    },
    {
      "parameters": {
        "operation": "create",
        "name": "={{ $json[\"Company Name\"] }}",
        "additionalFields": {
          "address_line_1": "={{ $json[\"Address Line 1\"] }}",
          "address_line_2": "={{ $json[\"Address Line 2\"] }}",
          "city": "={{ $json[\"City\"] }}",
          "company_type": "={{ $json[\"Company Type\"] }}",
          "country_name": "={{ $json[\"Country\"] }}",
          "fax_number": "={{ $json[\"Fax\"] }}",
          "id_number": "={{ $json[\"ID Number\"] }}",
          "nickname": "={{ $json[\"Nickname\"] }}",
          "notes": "={{ $json[\"Notes\"] }}",
          "parent_company_id": "",
          "phone_number": "={{ $json[\"Phone\"] }}",
          "state": "={{ $json[\"State\"] }}",
          "website": "={{ $json[\"Website\"] }}",
          "zip": "={{ $json[\"Zip\"] }}"
        }
      },
      "type": "n8n-nodes-hudu.hudu",
      "typeVersion": 1,
      "position": [
        440,
        140
      ],
      "id": "1345fccf-9dc2-4040-ab7f-04f909106bfd",
      "name": "Create a company",
      "credentials": {
        "huduApi": {
          "id": "NGUTnJBoz9085no8",
          "name": "Hudu account"
        }
      }
    },
    {
      "parameters": {
        "resource": "folders",
        "operation": "create",
        "name": "={{ $json.company.name }} KB Standards",
        "additionalFields": {
          "company_id": "={{ $json.company.id }}"
        }
      },
      "type": "n8n-nodes-hudu.hudu",
      "typeVersion": 1,
      "position": [
        660,
        140
      ],
      "id": "457ccd8b-23ea-4a9c-aa25-79ac288dcf71",
      "name": "Create KB Standards Folder",
      "credentials": {
        "huduApi": {
          "id": "NGUTnJBoz9085no8",
          "name": "Hudu account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    json: $json.body ?? $json\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        220,
        140
      ],
      "id": "0f1ea2e0-3acd-49d6-ab9b-28935f75e090",
      "name": "Normalize the Response"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "d900b43a-125f-4f31-b8b8-c55186369a92",
              "name": "subfolders",
              "value": "=[\"Documentation\", \"Guides\", \"Processes\"]",
              "type": "array"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        880,
        140
      ],
      "id": "37c099f6-59ab-44f4-8e08-4f721c347454",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "fieldToSplitOut": "subfolders",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1100,
        140
      ],
      "id": "f1d49c65-fe07-49c8-8e06-ed0269de9a31",
      "name": "Split Out"
    },
    {
      "parameters": {
        "content": "## Company Creation from Webhook\nCreates a company from an incoming webhook (i.e. from a form submission), and generates basic KB article folder and subfolder structure. Finally, it generates standard KB articles within each created subfolder.",
        "width": 1320,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -220
      ],
      "typeVersion": 1,
      "id": "223204e6-90fd-462d-9d68-5d05ec303538",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Normalize Response\nRemoves body wrap from input, not required for production-use",
        "height": 360,
        "width": 220,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -40
      ],
      "typeVersion": 1,
      "id": "1a9c4c34-6a48-4f2c-a82e-14c5c7467a0b",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Content Creation \nCreates the Company and Folders/subfolders for the given company. Folder structure set (replace with your desired folders):\n[Company Name] KB Standards\n-> Documentation\n-> Guides\n-> Processes",
        "height": 360,
        "width": 1080
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -40
      ],
      "typeVersion": 1,
      "id": "e21f5815-be13-4710-97ac-71f81312cb17",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $('Split Out').item.json.subfolders }}",
                    "rightValue": "Documentation",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "9b9663b5-ffec-4c6a-a220-62a69965ff08"
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "24a7cdb3-8fdd-440d-9cb1-e157e3b65db2",
                    "leftValue": "={{ $('Split Out').item.json.subfolders }}",
                    "rightValue": "Guides",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "ec096cb3-54ee-4a8a-9456-9a2efa79fdf3",
                    "leftValue": "={{ $('Split Out').item.json.subfolders }}",
                    "rightValue": "Processes",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        1540,
        140
      ],
      "id": "df0d3739-5815-4196-a602-02da42e1f74b",
      "name": "Switch"
    },
    {
      "parameters": {
        "resource": "articles",
        "operation": "create",
        "name": "What to Document for New Clients",
        "content": "<h2>Overview</h2>\n<p>When onboarding a new client, thorough documentation is key to providing consistent, scalable support. This article outlines what to capture when documenting a new client in our system.</p>\n\n<h3>1. 🔧 Core Business Details</h3>\n<ul>\n  <li>Legal business name</li>\n  <li>Office addresses and phone numbers</li>\n  <li>Primary point of contact (POC)</li>\n  <li>Emergency contacts and escalation paths</li>\n</ul>\n\n<h3>2. 🧑‍💻 Primary IT Contacts</h3>\n<ul>\n  <li>Names and roles of internal IT staff (if any)</li>\n  <li>Decision-makers for IT purchases or changes</li>\n  <li>Communication preferences (e.g., email vs. phone)</li>\n</ul>\n\n<h3>3. 🖥️ Infrastructure Inventory</h3>\n<ul>\n  <li>Servers (names, roles, IPs, OS, warranty info)</li>\n  <li>Workstations and laptops</li>\n  <li>Firewalls, switches, and access points</li>\n  <li>Backup systems (including schedule and type)</li>\n</ul>\n\n<h3>4. 🔐 Credentials & Access</h3>\n<ul>\n  <li>Admin credentials for domain controllers, firewalls/routers, remote tools</li>\n  <li>Email admin credentials (Office 365, Google Workspace)</li>\n  <li>MFA backup methods (document if not using SSO)</li>\n</ul>\n<blockquote><strong>Tip:</strong> Store sensitive credentials securely using Vault or equivalent.</blockquote>\n\n<h3>5. 🌐 DNS and Domain Info</h3>\n<ul>\n  <li>Domain registrar and credentials</li>\n  <li>DNS providers and records (MX, SPF, DKIM, etc.)</li>\n  <li>Website and hosting providers</li>\n</ul>\n\n<h",
        "company_id": "={{ $json.folder.company_id }}",
        "folder_id": "={{ $json.folder.id }}"
      },
      "type": "n8n-nodes-hudu.hudu",
      "typeVersion": 1,
      "position": [
        1760,
        -60
      ],
      "id": "9785a908-df2e-4c75-9a4d-10581c555336",
      "name": "Create Article in Subfolder[0]",
      "credentials": {
        "huduApi": {
          "id": "NGUTnJBoz9085no8",
          "name": "Hudu account"
        }
      }
    },
    {
      "parameters": {
        "resource": "articles",
        "operation": "create",
        "name": "How to Document Workstations for a New Client",
        "content": "<h2>Purpose</h2>\n<p>This guide outlines the proper steps for documenting workstations during new client onboarding to maintain consistency and reduce troubleshooting time.</p>\n\n<h3>Step 1: Naming Conventions</h3>\n<p>Use the format:<br><code>[CLIENT]-[DEVICE TYPE]-[USERNAME]</code><br>\nExample: <code>ACME-LT-JSMITH</code> for Acme’s laptop used by John Smith.</p>\n\n<h3>Step 2: Capture Key Details</h3>\n<ul>\n  <li>Hostname</li>\n  <li>Assigned User</li>\n  <li>Operating System & Version</li>\n  <li>Antivirus Status</li>\n  <li>Warranty Expiration</li>\n  <li>IP Address (if static)</li>\n</ul>\n\n<h3>Step 3: Attach Relevant Notes</h3>\n<ul>\n  <li>Known issues</li>\n  <li>Software installed</li>\n  <li>Special permissions or configurations</li>\n  <li>Custom login scripts or mapped drives</li>\n</ul>\n\n<h3>Step 4: Link Related Assets</h3>\n<ul>\n  <li>Link to the user profile</li>\n  <li>Link to site/location</li>\n  <li>Link to software licenses</li>\n</ul>\n\n<h3>Step 5: Add Tags or Flags</h3>\n<ul>\n  <li><code>Executive Device</code></li>\n  <li><code>High Priority</code></li>\n  <li><code>Out of Warranty</code></li>\n</ul>",
        "company_id": "={{ $json.folder.company_id }}",
        "folder_id": "={{ $json.folder.id }}"
      },
      "type": "n8n-nodes-hudu.hudu",
      "typeVersion": 1,
      "position": [
        1760,
        140
      ],
      "id": "d89473b0-0293-47f2-a174-65ae3134f4d0",
      "name": "Create Article in Subfolder[1]",
      "credentials": {
        "huduApi": {
          "id": "NGUTnJBoz9085no8",
          "name": "Hudu account"
        }
      }
    },
    {
      "parameters": {
        "resource": "articles",
        "operation": "create",
        "name": "New Client Documentation Process",
        "content": "<h2>Goal</h2>\n<p>Ensure all new clients are onboarded with consistent, accurate, and complete documentation.</p>\n\n<h3>🧭 Process Steps</h3>\n\n<h4>✅ Step 1: Initial Audit</h4>\n<ul>\n  <li>Schedule kickoff with client</li>\n  <li>Run discovery tools (e.g., Network Detective, N-able)</li>\n  <li>Interview internal IT/decision-makers</li>\n</ul>\n\n<h4>✅ Step 2: Set Up Folders</h4>\n<ul>\n  <li>Create the following folders in the KB:\n    <ul>\n      <li>Documentation</li>\n      <li>Guides</li>\n      <li>Processes</li>\n    </ul>\n  </li>\n  <li>Create password folders, asset layouts, and expiration tracking</li>\n</ul>\n\n<h4>✅ Step 3: Document Core Info</h4>\n<ul>\n  <li>Input all company and contact info</li>\n  <li>Begin network and infrastructure documentation</li>\n  <li>Add credentials to vault securely</li>\n</ul>\n\n<h4>✅ Step 4: Assign Responsibility</h4>\n<ul>\n  <li>Assign workstations and software inventory to junior tech</li>\n  <li>Assign infrastructure and domain info to senior tech</li>\n</ul>\n\n<h4>✅ Step 5: Review and QA</h4>\n<ul>\n  <li>Use the QA checklist to verify completeness</li>\n  <li>Flag any missing information</li>\n  <li>Schedule client walkthrough (if applicable)</li>\n</ul>\n\n<h3>📋 QA Checklist</h3>\n<ul>\n  <li>[ ] Company info documented</li>\n  <li>[ ] Contacts and roles defined</li>\n  <li>[ ] Infrastructure fully mapped</li>\n  <li>[ ] Credentials stored securely</li>\n  <li>[ ] All folders created in KB</li>\n  <li>[ ] QA review complete</li>\n</ul>",
        "company_id": "={{ $json.folder.company_id }}",
        "folder_id": "={{ $json.folder.id }}"
      },
      "type": "n8n-nodes-hudu.hudu",
      "typeVersion": 1,
      "position": [
        1760,
        340
      ],
      "id": "e0aaf2f8-d28a-4558-a814-ee548c869bd5",
      "name": "Create Article in Subfolder[2]",
      "credentials": {
        "huduApi": {
          "id": "NGUTnJBoz9085no8",
          "name": "Hudu account"
        }
      }
    },
    {
      "parameters": {
        "content": "## Create Articles in Each Created Subfolder\nCreates standardized articles in each previously-created subfolder (AI-generated test articles, replace with your standards)",
        "height": 760,
        "width": 520
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1500,
        -220
      ],
      "typeVersion": 1,
      "id": "b95ac1ce-56e4-404e-813e-520f8d958373",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "resource": "folders",
        "operation": "create",
        "name": "={{$json[\"subfolders\"]}}",
        "additionalFields": {
          "company_id": "={{ $('Create a company').item.json.company.id }}",
          "parent_folder_id": "={{ $('Create KB Standards Folder').item.json.folder.id }}"
        }
      },
      "type": "n8n-nodes-hudu.hudu",
      "typeVersion": 1,
      "position": [
        1320,
        140
      ],
      "id": "04f1dffb-eeed-4295-8374-83658b398608",
      "name": "Create subfolders",
      "credentials": {
        "huduApi": {
          "id": "NGUTnJBoz9085no8",
          "name": "Hudu account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Normalize the Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a company": {
      "main": [
        [
          {
            "node": "Create KB Standards Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create KB Standards Folder": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize the Response": {
      "main": [
        [
          {
            "node": "Create a company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Create subfolders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Create Article in Subfolder[0]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Article in Subfolder[1]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Article in Subfolder[2]",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create subfolders": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9d6e6358-e75b-4021-b6ed-c0701df16c20",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "dbf6af1c9ca7023b69456b15c194b6ac4265e7a761e0356259937e5e850824bc"
  },
  "id": "RKHaKQXMfi76b97O",
  "tags": []
}