{
  "nodes": [
    {
      "id": "todos-start",
      "type": "canvas-node",
      "position": { "x": 80, "y": 220 },
      "data": {
        "id": "todos-start",
        "name": "手动触发",
        "engineType": "ManualTrigger",
        "creatorType": "trigger-manual",
        "type": "trigger",
        "icon": "IconPlayerPlay",
        "inputs": [],
        "outputs": [{ "type": "main", "index": 0 }],
        "parameters": {},
        "retryOnFail": false,
        "onError": "stopWorkflow"
      }
    },
    {
      "id": "todos-notes",
      "type": "canvas-node",
      "position": { "x": 360, "y": 220 },
      "data": {
        "id": "todos-notes",
        "name": "填入会议记录",
        "engineType": "EditFields",
        "creatorType": "set",
        "icon": "IconSet",
        "inputs": [{ "type": "main", "index": 0 }],
        "outputs": [{ "type": "main", "index": 0 }],
        "parameters": {
          "fields": {
            "meetingNotes": "- 张三：下周一前给出活动方案初稿\n- 李四：把上周的投放数据整理成表格\n- 王五：确认供应商报价，本周五前回复"
          },
          "includeOtherFields": true
        },
        "retryOnFail": false,
        "onError": "stopWorkflow"
      }
    },
    {
      "id": "todos-code",
      "type": "canvas-node",
      "position": { "x": 680, "y": 220 },
      "data": {
        "id": "todos-code",
        "name": "拆出待办清单",
        "engineType": "Code",
        "creatorType": "transform",
        "icon": "IconCode",
        "inputs": [{ "type": "main", "index": 0 }],
        "outputs": [{ "type": "main", "index": 0 }],
        "parameters": {
          "mode": "runOnceForAllItems",
          "code": "const first = $input.first();\nconst notes = String(first && first.json ? first.json.meetingNotes || '' : '');\nconst lines = notes.split(/\\r?\\n/).map(line => line.trim()).filter(Boolean);\nconst todos = [];\nfor (const line of lines) {\n  const bullet = line.match(/^(?:[-*•]|\\d+[.、)]|\\[[ xX]\\])\\s*(.+)$/);\n  if (!bullet) continue;\n  let text = bullet[1].trim();\n  let owner = '';\n  const split = text.match(/^(.+?)[：:]\\s*(.+)$/);\n  if (split) {\n    owner = split[1].trim();\n    text = split[2].trim();\n  }\n  todos.push({ owner: owner, task: text });\n}\nconst markdown = todos.length\n  ? todos.map((item, index) => (index + 1) + '. ' + item.task + (item.owner ? '（负责人：' + item.owner + '）' : '')).join('\\n')\n  : '没有识别到待办项：请把每条待办写成「- 」开头的列表。';\nreturn [{ json: { count: todos.length, todos: todos, markdown: markdown } }];"
        },
        "retryOnFail": false,
        "onError": "stopWorkflow"
      }
    },
    {
      "id": "todos-log",
      "type": "canvas-node",
      "position": { "x": 1000, "y": 220 },
      "data": {
        "id": "todos-log",
        "name": "输出待办清单",
        "engineType": "Log",
        "creatorType": "log",
        "icon": "IconFileText",
        "inputs": [{ "type": "main", "index": 0 }],
        "outputs": [{ "type": "main", "index": 0 }],
        "parameters": {
          "level": "info",
          "message": "={{ $json.markdown }}"
        },
        "retryOnFail": false,
        "onError": "stopWorkflow"
      }
    }
  ],
  "edges": [
    { "id": "todos-start-todos-notes", "source": "todos-start", "target": "todos-notes", "sourceHandle": "outputs/main/0", "targetHandle": "inputs/main/0" },
    { "id": "todos-notes-todos-code", "source": "todos-notes", "target": "todos-code", "sourceHandle": "outputs/main/0", "targetHandle": "inputs/main/0" },
    { "id": "todos-code-todos-log", "source": "todos-code", "target": "todos-log", "sourceHandle": "outputs/main/0", "targetHandle": "inputs/main/0" }
  ],
  "variables": {},
  "pinData": {},
  "settings": { "scheduleEnabled": false, "maxNodeExecutions": 10000, "executionTimeout": 300 }
}
