{
  "name": "Generate weekly supply chain OTIF reports and AI analysis with Notion and GPT-4o",
  "nodes": [
    {
      "id": "e16ae93c-6dc9-4c4c-86f6-4e25c1569e9d",
      "name": "Aggregate by Week",
      "type": "n8n-nodes-base.code",
      "position": [
        3648,
        4288
      ]
    },
    {
      "id": "7b996737-2b66-491b-a693-2b14f80e6b0e",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        4064,
        3824
      ]
    },
    {
      "id": "d98ec9fd-979b-45b2-9d3b-299d6f752914",
      "name": "Fill the report",
      "type": "n8n-nodes-base.notion",
      "position": [
        4464,
        3744
      ]
    },
    {
      "id": "e76bc2e5-43d5-4d64-a2de-8d02240742a2",
      "name": "OpenAI Chat Model Global",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        4048,
        4304
      ]
    },
    {
      "id": "c00ba339-60ef-4736-8305-36202e2ae857",
      "name": "Collect Shipments from TMS & WMS",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        3456,
        4288
      ]
    },
    {
      "id": "56fce52f-074b-46b3-a4e0-eae75c07fcc2",
      "name": "AI Agent Weekly Performance Summary",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4048,
        3680
      ]
    },
    {
      "id": "b1dfca97-d910-48f4-887d-573e2702556e",
      "name": "AI Agent Global Performance Summary",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4064,
        4144
      ]
    },
    {
      "id": "880cd90b-78c9-4fbd-a85f-c1e8a8915cfa",
      "name": "Update Global Performance Summary",
      "type": "n8n-nodes-base.notion",
      "position": [
        4496,
        3984
      ]
    },
    {
      "id": "9f330093-11f0-4037-80ee-a8ba81262152",
      "name": "Create Weekly Performance Card",
      "type": "n8n-nodes-base.notion",
      "position": [
        4656,
        3680
      ]
    },
    {
      "id": "32dd552a-cecd-4602-8497-d92d1a59c8f9",
      "name": "Prepare Global Summary Prompt with Indicators",
      "type": "n8n-nodes-base.code",
      "position": [
        3824,
        4288
      ]
    },
    {
      "id": "7390e7a0-b8b4-4a01-921c-c88b14a743be",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3264,
        3584
      ],
      "parameters": {
        "width": 704,
        "height": 596,
        "content": "## Supply Chain OTIF Performance Scorecard for Retail Logistics\n\nAutomatically aggregate shipment data, compute weekly OTIF KPIs, generate AI-powered performance analysis, and push everything to a Not"
      }
    },
    {
      "id": "048fe5f8-7fc0-4d3a-950b-f1246f23b344",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3264,
        4192
      ],
      "parameters": {
        "width": 340,
        "height": 252,
        "content": "## 1. Trigger and collect shipment records"
      }
    },
    {
      "id": "08031ce3-58b4-407a-bc25-773375a71b26",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3616,
        4192
      ],
      "parameters": {
        "width": 348,
        "height": 252,
        "content": "## 2. Aggregate shipments and compute KPIs"
      }
    },
    {
      "id": "8d801606-75aa-466d-a13a-4bd60fdbb56a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3984,
        3584
      ],
      "parameters": {
        "width": 372,
        "height": 412,
        "content": "## 3. AI Agent generates a per-week performance analysis"
      }
    },
    {
      "id": "a7a3a19c-43a4-46b4-81aa-bd2ef3558422",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4368,
        3584
      ],
      "parameters": {
        "width": 472,
        "height": 316,
        "content": "## 4. Push weekly KPIs and AI analysis cards to Notion"
      }
    },
    {
      "id": "eeedc70d-7b24-4d2d-ac4c-99234ec9b53b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3984,
        4000
      ],
      "parameters": {
        "width": 372,
        "height": 452,
        "content": "## 5. AI Agent generates a global cross-week performance summary"
      }
    },
    {
      "id": "bcca7e93-e8d2-4a94-8b47-09709c745427",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4368,
        3904
      ],
      "parameters": {
        "width": 476,
        "height": 220,
        "content": "## 6. Update the global performance summary card in Notion"
      }
    },
    {
      "id": "acbf456d-dadf-4663-98ca-21895de8ffe5",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4368,
        4144
      ],
      "parameters": {
        "width": 480,
        "height": 304,
        "content": "## [Tutorial](https://www.youtube.com/watch?v=tOT8XhQ7eB8)\n@[youtube](tOT8XhQ7eB8)"
      }
    },
    {
      "id": "cf03fa28-3cf7-42db-a649-9ec75db6fa3c",
      "name": "Weekly Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        3280,
        4288
      ]
    }
  ],
  "connections": {
    "Weekly Trigger": {
      "main": [
        [
          {
            "node": "Collect Shipments from TMS & WMS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate by Week": {
      "main": [
        [
          {
            "node": "AI Agent Weekly Performance Summary",
            "type": "main",
            "index": 0
          },
          {
            "node": "Prepare Global Summary Prompt with Indicators",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent Weekly Performance Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model Global": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent Global Performance Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Collect Shipments from TMS & WMS": {
      "main": [
        [
          {
            "node": "Aggregate by Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent Global Performance Summary": {
      "main": [
        [
          {
            "node": "Update Global Performance Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent Weekly Performance Summary": {
      "main": [
        [
          {
            "node": "Fill the report",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create Weekly Performance Card",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Global Summary Prompt with Indicators": {
      "main": [
        [
          {
            "node": "AI Agent Global Performance Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}