Meetup Report

    Shared 1/19/2026

    2 views

    Visual Workflow

    JSON Code

    {
      "id": "IhtIHV25neMcxxvR",
      "meta": {
        "instanceId": "162eec3732de59437b64feac9b77d3c4c84098988ae869a1ee7e056d40699a32",
        "templateCredsSetupCompleted": true
      },
      "name": "Meetup Report",
      "tags": [],
      "nodes": [
        {
          "id": "e48510bf-98d3-477b-8eb0-3240239af2f2",
          "name": "On form submission",
          "type": "n8n-nodes-base.formTrigger",
          "position": [
            16,
            16
          ],
          "webhookId": "ddbd414e-2961-4ebd-a049-8bbd659783c7",
          "parameters": {
            "options": {},
            "formTitle": "Meetup Report",
            "formFields": {
              "values": [
                {
                  "fieldName": "csv",
                  "fieldType": "file",
                  "fieldLabel": "csv",
                  "requiredField": true,
                  "acceptFileTypes": ".csv"
                },
                {
                  "fieldName": "EventDate",
                  "fieldType": "date",
                  "fieldLabel": "EventDate",
                  "defaultValue": "={{ $now.plus({ days: (6 - $now.weekday + 7) % 7 || ( (6 - $now.weekday) < -3 ? 7 : 0 ) }).toFormat('yyyy-MM-dd') }}\n",
                  "requiredField": true
                }
              ]
            },
            "formDescription": "Meetup Report"
          },
          "typeVersion": 2.4
        },
        {
          "id": "cd6f7eb6-460b-4968-a83c-82518ae3f182",
          "name": "Filter",
          "type": "n8n-nodes-base.filter",
          "position": [
            432,
            16
          ],
          "parameters": {
            "options": {},
            "conditions": {
              "options": {
                "version": 3,
                "leftValue": "",
                "caseSensitive": true,
                "typeValidation": "strict"
              },
              "combinator": "and",
              "conditions": [
                {
                  "id": "76e378a9-76cd-488f-b313-5ce3f425765b",
                  "operator": {
                    "type": "string",
                    "operation": "equals"
                  },
                  "leftValue": "={{ $json.Role }}",
                  "rightValue": "MEMBER"
                }
              ]
            }
          },
          "typeVersion": 2.3
        },
        {
          "id": "41d7d247-624f-4fbe-ab9a-9083ad747c4d",
          "name": "Extract from File",
          "type": "n8n-nodes-base.extractFromFile",
          "position": [
            224,
            16
          ],
          "parameters": {
            "options": {
              "headerRow": true
            },
            "binaryPropertyName": "=csv"
          },
          "typeVersion": 1.1
        },
        {
          "id": "f750dca0-9f5e-4909-a063-8b2d0cd3d66f",
          "name": "Code in JavaScript",
          "type": "n8n-nodes-base.code",
          "position": [
            816,
            16
          ],
          "parameters": {
            "jsCode": "const items = $input.all();\nconst dateStr = $('On form submission').first().json.EventDate; // Formats to \"1月10日\"\n\nlet totalAttendees = 0;\nlet listContent = \"\";\n\nitems.forEach((item, index) => {\n    let row = item.json;\n    let name = row.Name;\n    \n    // 1. Logic for + guest\n    let guestCount = 0;\n    if (row.Guests && row.Guests.includes('+')) {\n        guestCount = parseInt(row.Guests.replace('+', '')) || 0;\n        name += ` %2B ${guestCount} guest${guestCount > 1 ? 's' : ''}`;\n    }\n\n    // 2. Logic for (New) - based on Events attended\n    if (parseInt(row[\"Events attended\"]) === 0) {\n        name += \" (New)\";\n    }\n\n    // 3. Update total count\n    totalAttendees += (1 + guestCount);\n\n    // 4. Build the list line\n    listContent += `${index + 1}. ${name}\\n`;\n});\n\nconst newDateFormat = dateStr.replace(/-/g, '/');\n// 在這裡,我們獲取原始文本並將所有 \\n 替換為 <br>\n\nconst originalMessage = `${newDateFormat} 桌遊聚會 Total: ${totalAttendees}\n${listContent}`;\n\n// 使用 .replace() 將所有換行符號替換為 HTML 標籤\nconst finalHtmlMessage = originalMessage.replace(/\\n/g, '%0A').replace(/ /g, '%20');\n\n// 將這個新的 HTML 訊息返回給下一個節點\nreturn { text: finalHtmlMessage };"
          },
          "typeVersion": 2
        },
        {
          "id": "4b4c8c95-cfcc-4340-a5e1-11e3eee695a7",
          "name": "Edit Fields",
          "type": "n8n-nodes-base.set",
          "position": [
            624,
            16
          ],
          "parameters": {
            "options": {},
            "assignments": {
              "assignments": [
                {
                  "id": "fbc7a492-90d6-4a4d-afe5-3f2d24711adb",
                  "name": "EventDate",
                  "type": "string",
                  "value": "={{ $('On form submission').item.json.EventDate }}"
                }
              ]
            },
            "includeOtherFields": true
          },
          "typeVersion": 3.4
        },
        {
          "id": "069c4703-ada4-45c9-b04f-02fb62ffb8b9",
          "name": "Send a message",
          "type": "n8n-nodes-base.gmail",
          "position": [
            1008,
            16
          ],
          "webhookId": "e7a0829b-1860-48ec-a28c-f65bdb4f368f",
          "parameters": {
            "sendTo": "yvesyiu7@gmail.com",
            "message": "=<a href=\"https://wa.me/?text={{ $json.text }}\"> Send Meetup Report through Whatsapp  </a>",
            "options": {
              "appendAttribution": false
            },
            "subject": "={{ $('On form submission').first().json.EventDate }}\nmeetup report "
          },
          "credentials": {
            "gmailOAuth2": {
              "id": "P75ucVf9LpvRaayr",
              "name": "yvesyiu7"
            }
          },
          "typeVersion": 2.2
        }
      ],
      "active": true,
      "pinData": {},
      "settings": {
        "availableInMCP": false,
        "executionOrder": "v1"
      },
      "versionId": "e9a2fe22-5aa7-4b5f-a96b-c63456468736",
      "connections": {
        "Filter": {
          "main": [
            [
              {
                "node": "Edit Fields",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Edit Fields": {
          "main": [
            [
              {
                "node": "Code in JavaScript",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Extract from File": {
          "main": [
            [
              {
                "node": "Filter",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "Code in JavaScript": {
          "main": [
            [
              {
                "node": "Send a message",
                "type": "main",
                "index": 0
              }
            ]
          ]
        },
        "On form submission": {
          "main": [
            [
              {
                "node": "Extract from File",
                "type": "main",
                "index": 0
              }
            ]
          ]
        }
      }
    }