{
  "name": "Daily Workflow",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 14
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        0
      ],
      "id": "96799e7f-5756-42e1-9a8f-858d72d46486",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "form": "jaykeeRagic/activity/2",
        "filters": {
          "filter_map": [
            {
              "filters_field": "1007316",
              "filters_value": "={{ $json.formattedDate }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-ragic.ragic",
      "typeVersion": 1,
      "position": [
        384,
        0
      ],
      "id": "315e2c41-78b3-4127-8c1a-fc05dc61dafd",
      "name": "Ragic",
      "credentials": {
        "ragicApi": {
          "id": "kuKk0EVmCHYC54uU",
          "name": "JayKeeRagic"
        }
      }
    },
    {
      "parameters": {
        "operation": "formatDate",
        "date": "={{ $json.timestamp }}",
        "format": "yyyy/MM/dd",
        "options": {}
      },
      "type": "n8n-nodes-base.dateTime",
      "typeVersion": 2,
      "position": [
        192,
        0
      ],
      "id": "ff621057-cc37-47cc-9611-9baf180e5cef",
      "name": "Date & Time"
    },
    {
      "parameters": {
        "action": "executeActionButton",
        "form": "jaykeeRagic/activity/2",
        "recordIndex": "={{ $json._ragicId }}",
        "actionButtonId": "4"
      },
      "type": "n8n-nodes-ragic.ragic",
      "typeVersion": 1,
      "position": [
        768,
        0
      ],
      "id": "c9e93f6c-cb2d-46ad-9089-fa5a46c33a29",
      "name": "Ragic1",
      "credentials": {
        "ragicApi": {
          "id": "kuKk0EVmCHYC54uU",
          "name": "JayKeeRagic"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const data = $input.first().json;\nconst result = [];\n\n// 抓取 Object 中的所有 key (例如 \"1\", \"2\") 並將裡面的內容推入陣列\nfor (const key of Object.keys(data)) {\n  result.push({\n    json: data[key]\n  });\n}\n\nreturn result;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        576,
        0
      ],
      "id": "e415e351-cd44-4e35-8d9f-1b14d7b53d77",
      "name": "Code in JavaScript",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "content": "## 觸發端\n\n每隔一段時間觸發一次",
        "height": 128,
        "width": 208
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        144
      ],
      "typeVersion": 1,
      "id": "c1d26ff1-eed8-484d-b479-32cad83583a8",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "把時間變成 Ragic 能看懂的格式",
        "height": 80,
        "width": 262
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -96
      ],
      "typeVersion": 1,
      "id": "a5f6d746-82d9-4f5a-9ec8-f24aba2474f0",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## 搜尋資料\n\n根據上一步的時間篩選資料",
        "height": 112,
        "width": 230
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        160
      ],
      "typeVersion": 1,
      "id": "f44dfd2a-51b7-43fc-bc16-ae3fabfd4ebd",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "### 拆分回傳資料\n\n將 Read Data 取得的資料拆分，\n給後續動作端多次觸發",
        "height": 128,
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -144
      ],
      "typeVersion": 1,
      "id": "7e48bceb-7124-452c-8360-e84c7349bb5f",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "觸發傳送即時訊息",
        "height": 80,
        "width": 176
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        160
      ],
      "typeVersion": 1,
      "id": "cc60b308-0c1d-42f2-a6a2-d25fdcabbdf1",
      "name": "Sticky Note4"
    }
  ],
  "pinData": {},
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Date & Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Date & Time": {
      "main": [
        [
          {
            "node": "Ragic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ragic": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Ragic1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false,
    "timeSavedMode": "fixed",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "versionId": "d26c22a0-8706-4a16-8244-70a9b272caa2",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "a53b4727f502e720ea30a373074b0599c2b0492ceebf12c88920178a97d7a187"
  },
  "nodeGroups": [],
  "id": "KEQn9ZpzdCnFiOXNWOCoY",
  "tags": []
}