{
  "name": "AIGCTechs 周报自动生成",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [5],
              "triggerAtHour": 17,
              "triggerAtMinute": 0
            }
          ]
        }
      },
      "id": "a1e5c001-0000-4000-8000-000000000001",
      "name": "每周五 17:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [0, 0]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f1",
              "name": "流水账",
              "value": "（把本周流水账粘到这里——周一开了XX会，推进了XX，遇到XX问题……）",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "a1e5c001-0000-4000-8000-000000000002",
      "name": "本周流水账",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [220, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://host.docker.internal:11434/api/chat",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ model: \"qwen3:8b\", stream: false, messages: [{ role: \"user\", content: \"你是资深项目经理，擅长把零散记录提炼成结构化汇报。\\n任务：把本周流水账整理成周报，按「进展 / 风险 / 下周计划」三段，进展条目量化（能带数字带数字），只保留对上级有价值的信息。\\n输入流水账：\" + $('本周流水账').item.json.流水账 + \"\\n输出：Markdown，三段各 ≤5 条，每条一行，动词开头。\" }] }) }}",
        "options": {}
      },
      "id": "a1e5c001-0000-4000-8000-000000000003",
      "name": "调用本地大模型",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [440, 0]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f2",
              "name": "周报",
              "value": "={{ $json.message.content }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "a1e5c001-0000-4000-8000-000000000004",
      "name": "提取周报",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [660, 0]
    },
    {
      "parameters": {
        "fromEmail": "你的发件邮箱@example.com",
        "toEmail": "你的收件邮箱@example.com",
        "subject": "=周报 {{ $now.format('yyyy-LL-dd') }}",
        "emailFormat": "text",
        "text": "={{ $json.周报 }}",
        "options": {}
      },
      "id": "a1e5c001-0000-4000-8000-000000000005",
      "name": "发送到邮箱",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [880, 0]
    }
  ],
  "connections": {
    "每周五 17:00": {
      "main": [
        [
          {
            "node": "本周流水账",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "本周流水账": {
      "main": [
        [
          {
            "node": "调用本地大模型",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "调用本地大模型": {
      "main": [
        [
          {
            "node": "提取周报",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "提取周报": {
      "main": [
        [
          {
            "node": "发送到邮箱",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "Asia/Shanghai"
  },
  "meta": {
    "note": "AIGCTechs 周报自动化骨架（n8n + 本地 Ollama）。导入后：1) 「本周流水账」节点填入本周记录；2) 「调用本地大模型」确认模型名与 Ollama 地址；3) 「发送到邮箱」配置 SMTP 凭据；4) 手动 Execute 验证后再激活定时。教程：https://aigctechs.cn/guides/workflows/n8n-weekly-report/"
  }
}
