{
  "name": "SouthFLAI • Event form to review row",
  "nodes": [
    {
      "id": "c0fbece9-8733-5abe-b017-ab3be1e4d74a",
      "name": "Test with sample event",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "c7a081ea-481b-53f4-a75d-aff610d0bbdb",
      "name": "Sample event",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        220,
        0
      ],
      "parameters": {
        "jsCode": "return [{json: {'Event title': '  Sample founder clinic  ', 'City': 'Boca Raton', 'Local date (YYYY-MM-DD)': '2027-02-18', 'Start time (24h HH:MM)': '', 'Organizer URL': 'https://example.org/sample-clinic', 'Price as listed': ''}}];"
      }
    },
    {
      "id": "6a0b4a17-7871-5571-b08a-251f1baf15ba",
      "name": "Receive event form",
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        210,
        220
      ],
      "parameters": {
        "formTitle": "Suggest a South Florida event",
        "formDescription": "Use details from the organizer. Leave unpublished details blank.",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Event title",
              "fieldType": "text",
              "requiredField": true,
              "fieldName": "Event title"
            },
            {
              "fieldLabel": "City",
              "fieldType": "text",
              "requiredField": true,
              "fieldName": "City"
            },
            {
              "fieldLabel": "Local date (YYYY-MM-DD)",
              "fieldType": "text",
              "requiredField": false,
              "fieldName": "Local date (YYYY-MM-DD)"
            },
            {
              "fieldLabel": "Start time (24h HH:MM)",
              "fieldType": "text",
              "requiredField": false,
              "fieldName": "Start time (24h HH:MM)"
            },
            {
              "fieldLabel": "Organizer URL",
              "fieldType": "text",
              "requiredField": true,
              "fieldName": "Organizer URL"
            },
            {
              "fieldLabel": "Price as listed",
              "fieldType": "text",
              "requiredField": false,
              "fieldName": "Price as listed"
            }
          ]
        },
        "options": {}
      },
      "webhookId": "1e391fe6-ef25-4668-b613-a77f55d85544"
    },
    {
      "id": "96e13d3e-2bb9-55c5-9d91-3650f3943611",
      "name": "Prepare review row",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        500,
        85
      ],
      "parameters": {
        "jsCode": "const clean = v => String(v ?? '').trim().replace(/\\s+/g, ' ');\nreturn $input.all().map(({json: input}) => {\n  const read = key => clean(input[key]);\n  const title = read('Event title'), city = read('City'), date = read('Local date (YYYY-MM-DD)'), time = read('Start time (24h HH:MM)'), source = read('Organizer URL'), price = read('Price as listed');\n  const gaps = [];\n  const ymd = /^\\d{4}-\\d{2}-\\d{2}$/.test(date) ? new Date(date+'T00:00:00Z') : null;\n  if (!title) gaps.push('Event title');\n  if (!city) gaps.push('City');\n  if (!ymd || Number.isNaN(ymd.valueOf()) || ymd.toISOString().slice(0,10)!==date) gaps.push('Local date');\n  if (!/^([01]\\d|2[0-3]):[0-5]\\d$/.test(time)) gaps.push('Start time');\n  if (!/^https?:\\/\\/[^\\s/]+(?:\\/[^\\s]*)?$/i.test(source)) gaps.push('Organizer URL');\n  if (!price) gaps.push('Price');\n  return {json: {title,city,date_local:date,start_local:time,timezone:'America/New_York',price_as_listed:price,organizer_url:source,missing_or_invalid:gaps,review_status:gaps.length?'Needs details':'Ready for source check'}};\n});"
      }
    },
    {
      "id": "1a8496a6-101e-51a0-892b-c9a26dff0690",
      "name": "Setup and first run",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -445
      ],
      "parameters": {
        "content": "## Turn submissions into review rows\n1. Start with **Test with sample event**. The sample should flag start time and price.\n2. Open **Receive event form** and use its test URL during a test execution. Dates are YYYY-MM-DD and times use a 24-hour South Florida clock.\n3. Inspect **Prepare review row** in the execution. Verify the organizer listing before using the row.\n4. Publish in your n8n workspace only when you want its production form URL to accept entries. Connect your own storage if you need a permanent queue beyond n8n execution history.",
        "width": 550,
        "height": 360
      }
    }
  ],
  "connections": {
    "Test with sample event": {
      "main": [
        [
          {
            "node": "Sample event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sample event": {
      "main": [
        [
          {
            "node": "Prepare review row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive event form": {
      "main": [
        [
          {
            "node": "Prepare review row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "timezone": "America/New_York"
  },
  "pinData": {}
}
