{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "e47dea40-652d-4037-b767-fb408f856738",
      "name": "Create folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        220,
        -200
      ],
      "parameters": {
        "name": "={{ $json.name + \" - Onboarding\" }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "=1rCt7cyX7b3FQSJRDB8bRT4ho9QEUh0mA"
        },
        "resource": "folder"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "c248ad7e-3560-4b08-b849-313134d3fd8b",
      "name": "Create a database page",
      "type": "n8n-nodes-base.notion",
      "position": [
        880,
        -40
      ],
      "parameters": {
        "title": "Clients",
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "230bb34e-b122-800a-87e4-c5f2e30500b9",
          "cachedResultUrl": "https://www.notion.so/230bb34eb122800a87e4c5f2e30500b9",
          "cachedResultName": "Clients"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Name|title",
              "title": "={{ $json.name }}"
            },
            {
              "key": "Email|email",
              "emailValue": "={{ $json.email }}"
            },
            {
              "key": "Project Type|select",
              "selectValue": "={{ $json.projectType }}"
            },
            {
              "key": "Budget|select",
              "selectValue": "={{ $json.budget }}"
            },
            {
              "key": "Onboarding Link|url",
              "urlValue": "=https://drive.google.com/drive/folders/{{$json[\"id\"]}}"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4540bdfe-a7c3-4ec9-ade8-8f5e23bd4655",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        420,
        -200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "0b77f413-5350-49a0-8138-316b47a714a4",
              "name": "uuid",
              "type": "string",
              "value": "={{ $execution.id }}"
            },
            {
              "id": "435421f5-f7c2-439d-84d1-929c55a72dd9",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "dff64989-c132-456c-99e7-b8dcfdd294e7",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        1060,
        -40
      ],
      "parameters": {
        "text": "=\ud83d\ude80 New Client Onboarded!\n\n\ud83d\udc64 Name: {{$json[\"property_name\"]}}  \n\ud83d\udce7 Email: {{$json[\"property_email\"]}}  \n\ud83d\udcbc Project Type: {{$json[\"property_project_type\"]}}  \n\ud83d\udcb0 Budget: {{$json[\"property_budget\"]}}  \n\ud83d\udcc2 Folder: {{$json[\"property_onboarding_link\"]}}  \n\ud83d\udd17 Notion Page: {{$json[\"url\"]}}\n",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#client-notifications"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "a78e08e7-f4f2-4f30-82ba-e3d2b8843d5b",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -220,
        -80
      ],
      "parameters": {
        "path": "/tally-submission",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "9225c3ad-2a66-4440-ba66-3b0b8ee92362",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        640,
        -40
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2,
      "alwaysOutputData": true
    },
    {
      "id": "5024846e-6d16-4a52-b35e-f35afdba65b5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        -200
      ],
      "parameters": {
        "color": 4,
        "width": 600,
        "height": 440,
        "content": " Client Onboarding Workflow \u2013 Setup Guide\n\ud83c\udfaf What this workflow does:\nAutomates client onboarding from a Tally form:\n\nCreates a Google Drive folder\n\nAdds client data to a Notion database\n\nSends a Slack notification to your team\n\n\ud83d\udd27 Manual Setup Instructions\n\ud83d\udce5 Tally Form\n\nThis workflow listens for form submissions at:\nhttps://<your-n8n-domain>/webhook/tally-submission\n\nExpected fields: Name, Email, Project Type, Budget\n\n\ud83d\udcc2 Google Drive\n\nThe parent folder ID is hardcoded \u2192 update this:\n1rCt7cyX7b3FQSJRDB8bRT4ho9QEUh0mA\n\nAdd your Google OAuth2 credentials to the node.\n\n\ud83e\udde0 Notion\n\nDatabase ID is hardcoded \u2192 replace it with yours:\n230bb34e-b122-800a-87e4-c5f2e30500b9\n\nMake sure your database has fields:\nName, Email, Project Type, Budget, Onboarding Link\n\nAttach your Notion OAuth2 credentials.\n\n\ud83d\udd14 Slack\n\nThe channel #client-notifications is hardcoded \u2192 change it if needed.\n\nSlack OAuth2 is required to post messages.\n\n\u26a0\ufe0f This workflow uses hardcoded values (no env vars). Be sure to manually replace folder IDs, database IDs, and Slack channels with your own.\n\n\u2705 All nodes use OAuth2 \u2014 no API keys are exposed."
      },
      "typeVersion": 1
    },
    {
      "id": "c8ab7998-aa90-41f9-8b7d-3505f300777b",
      "name": "Extract Client Fields",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        80
      ],
      "parameters": {
        "jsCode": "const fields = $json.body.data.fields;\n\nlet result = {};\n\nfields.forEach(field => {\n  const label = field.label.toLowerCase();\n\n  if (label.includes('name')) {\n    result.name = field.value;\n  }\n\n  if (label.includes('email')) {\n    result.email = field.value;\n  }\n\n  if (label.includes('project')) {\n    const selectedId = field.value[0];\n    const option = field.options.find(opt => opt.id === selectedId);\n    result.projectType = option?.text || '';\n  }\n\n  if (label.includes('budget')) {\n    const selectedId = field.value[0];\n    const option = field.options.find(opt => opt.id === selectedId);\n    result.budget = option?.text || '';\n  }\n});\n\nreturn [{ json: result }];\n"
      },
      "typeVersion": 2
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Create a database page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Extract Client Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create folder": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Client Fields": {
      "main": [
        [
          {
            "node": "Create folder",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Create a database page": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}