{
  "name": "Summarise Slack channel activity for weekly reports with AI",
  "nodes": [
    {
      "id": "f4322829-1799-4954-a75a-b40e95f41c10",
      "name": "Get Last Week's Messages",
      "type": "n8n-nodes-base.slack",
      "position": [
        -2200,
        -160
      ]
    },
    {
      "id": "f0e89c19-ee1f-4a4d-8176-c222c18e0514",
      "name": "Simplify Message",
      "type": "n8n-nodes-base.set",
      "position": [
        -1320,
        380
      ]
    },
    {
      "id": "1293a7cf-1467-432f-b7ed-606146618808",
      "name": "Group By User",
      "type": "n8n-nodes-base.code",
      "position": [
        -2000,
        -160
      ]
    },
    {
      "id": "681a2368-9688-4ebd-bb88-f48c7ccb3e54",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -1800,
        -160
      ]
    },
    {
      "id": "38a5e6b0-ba4a-4aaa-93f2-ec2a73e5e1af",
      "name": "Messages to Items",
      "type": "n8n-nodes-base.code",
      "position": [
        -1540,
        380
      ]
    },
    {
      "id": "066e40ef-91d7-4db0-95bb-2027c9251a23",
      "name": "Get User",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1760,
        380
      ]
    },
    {
      "id": "c5d0b4d1-94eb-4e14-9985-85d384d6d96f",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1100,
        380
      ]
    },
    {
      "id": "47537a27-90d9-4edc-b9f4-66205bc4a4c2",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -1760,
        780
      ]
    },
    {
      "id": "6fdd0fc0-c563-46a3-afb2-48853d3e6cef",
      "name": "Get Thread",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1100,
        780
      ]
    },
    {
      "id": "0fc6664f-9076-4525-acaa-0f5009de2611",
      "name": "Aggregate1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -440,
        860
      ]
    },
    {
      "id": "caf963e5-3d5b-42d8-88ce-1fb5bf03a528",
      "name": "Simplify Thread Comments",
      "type": "n8n-nodes-base.set",
      "position": [
        -660,
        780
      ]
    },
    {
      "id": "aab0ae1c-50da-49e5-a373-c32b39108041",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        -880,
        780
      ]
    },
    {
      "id": "35cdb470-a9eb-4544-999c-5360dda0f1a3",
      "name": "Message Ref",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1320,
        780
      ]
    },
    {
      "id": "95500787-7965-4951-a729-615feb636021",
      "name": "Split Out2",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -1320,
        1080
      ]
    },
    {
      "id": "250d61cc-120d-4c0c-8220-f9a68a90b667",
      "name": "Map Reply UserIds",
      "type": "n8n-nodes-base.set",
      "position": [
        -1760,
        1160
      ]
    },
    {
      "id": "3358736b-fc6e-4e18-9a58-4ffc59308055",
      "name": "Get Reply Users",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1100,
        1080
      ]
    },
    {
      "id": "e98acd0f-f1e3-47f4-ae9c-7259462cf231",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -120,
        1380
      ]
    },
    {
      "id": "0ffb9b87-43db-4417-8c37-384a33cbb830",
      "name": "Summarise Threads",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -220,
        1160
      ]
    },
    {
      "id": "678a48ec-acb1-4c42-b8c9-d4cd762e4a2a",
      "name": "Aggregate2",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        160,
        1160
      ]
    },
    {
      "id": "ab39b117-e1bd-495f-a92d-fb79973b3601",
      "name": "Aggregate Reply Users",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -880,
        1080
      ]
    },
    {
      "id": "c71b7ca6-8245-4262-b2f1-abea511390d6",
      "name": "Reply Users",
      "type": "n8n-nodes-base.set",
      "position": [
        -660,
        1160
      ]
    },
    {
      "id": "4b2c452b-4e68-4536-aa58-a85fd586c606",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -460,
        0
      ]
    },
    {
      "id": "d65b4f27-52ab-4c29-8692-ee2835fddd17",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1540,
        780
      ]
    },
    {
      "id": "cfb55c7f-a89d-4ce4-8709-31e5e119c6ee",
      "name": "Aggregate3",
      "type": "n8n-nodes-base.set",
      "position": [
        -1320,
        580
      ]
    },
    {
      "id": "8b70e30c-99d5-4086-85aa-e6cfcc7f14e7",
      "name": "Aggregate4",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1100,
        580
      ]
    },
    {
      "id": "1cef5853-d301-49cb-9f58-c1a9128b8b33",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -2200,
        780
      ]
    },
    {
      "id": "b30c2433-3bfe-480f-a4bd-8c41900802a2",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1980,
        780
      ]
    },
    {
      "id": "b05735c3-4beb-4a80-8297-85e952e81270",
      "name": "Map Users to Messages",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -1520,
        -160
      ]
    },
    {
      "id": "28ed52b2-b0c3-4f19-b394-347c8ff9e323",
      "name": "Get User Info",
      "type": "n8n-nodes-base.set",
      "position": [
        -880,
        380
      ]
    },
    {
      "id": "bbd7c77e-2405-4e63-ae38-f064beafab9c",
      "name": "Fetch Message Replies",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -1300,
        -160
      ]
    },
    {
      "id": "edf34e72-04b4-4fed-a3af-42dec1c7ed17",
      "name": "Has ReplyUsers?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1540,
        1160
      ]
    },
    {
      "id": "dc9c6cf0-c627-4311-9160-62204e9b67e0",
      "name": "Messages to Items1",
      "type": "n8n-nodes-base.code",
      "position": [
        -440,
        1160
      ]
    },
    {
      "id": "0b830a49-c77e-41f3-8d70-47a26bfe0a0e",
      "name": "Aggregate Results",
      "type": "n8n-nodes-base.set",
      "position": [
        -760,
        -160
      ]
    },
    {
      "id": "b0c66c7f-0fed-465c-8933-7b803c9b3b64",
      "name": "Team Member Weekly Report Agent",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -560,
        -160
      ]
    },
    {
      "id": "e4a487ae-8d71-4fe6-a760-7a0fb95a8fac",
      "name": "Merge with Results",
      "type": "n8n-nodes-base.set",
      "position": [
        -60,
        -160
      ]
    },
    {
      "id": "06736a5c-7450-406a-ad3a-08a368d1addf",
      "name": "Team Weekly Report Agent",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        160,
        -160
      ]
    },
    {
      "id": "eef36957-9bf0-4be3-95a8-73bbefdc0c85",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        240,
        0
      ]
    },
    {
      "id": "bfa5c99f-cd8f-4d34-9e6d-9ed476c87d22",
      "name": "Post Report in Team Channel",
      "type": "n8n-nodes-base.slack",
      "position": [
        820,
        -160
      ]
    },
    {
      "id": "b9a11c72-de41-4a45-85a0-672cf54ef152",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2460,
        -440
      ],
      "parameters": {
        "width": 820,
        "height": 520,
        "content": "## 1. Fetch All Activity from Last Week\n[Learn more about the Slack node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack)\n\nWe'll start by fetching all activity in our team cha"
      }
    },
    {
      "id": "8afc048f-ce06-46c3-916f-cbcf14bcfe2b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1620,
        -440
      ],
      "parameters": {
        "width": 760,
        "height": 520,
        "content": "## 2. Summarise Messages Threads & Conversations\n[Learn more about the Execute Workflow node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow)\n\nWe'll do some more da"
      }
    },
    {
      "id": "c9a7358c-fbe7-435a-b435-d7b07599bdc6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -840,
        -440
      ],
      "parameters": {
        "width": 660,
        "height": 620,
        "content": "## 3. Generate Activity Reports for Each Team Member\n[Learn more about the Basic LLM node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm)\n\nWith our sum"
      }
    },
    {
      "id": "add32ef0-b515-44e6-a234-0a0fa77f4e84",
      "name": "Summarize Message Threads",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        -1080,
        -160
      ]
    },
    {
      "id": "17f2f45e-2c95-4b3c-b6db-a2881ae88964",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -440
      ],
      "parameters": {
        "width": 680,
        "height": 620,
        "content": "## 4. Generate Final Report for Whole Team\n[Learn more about the Basic LLM node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm)\n\nIn this step, we go on"
      }
    },
    {
      "id": "18cc7fa7-603c-4165-97c6-80d72fd4a9a6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        -440
      ],
      "parameters": {
        "width": 680,
        "height": 620,
        "content": "## 5. Post Report on Team Channel (on Monday Morning!)\n[Learn more about the Slack node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack)\n\nFinally, we can post the weekly repor"
      }
    },
    {
      "id": "9cd8bdd6-5fc7-4e44-bcd0-058bc5d11335",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2460,
        360
      ],
      "parameters": {
        "width": 560,
        "height": 340,
        "content": "## 5. SubWorkflows\n[Read more about Execute Workflow Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflowtrigger)\n\nIncorporating Subworkflows into your main work"
      }
    },
    {
      "id": "6f6fc730-5fc8-4dcc-b86d-e3b2f0e792a0",
      "name": "Monday @ 6am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2400,
        -160
      ]
    },
    {
      "id": "ab94557c-debb-425c-ac83-62e39e43d28b",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2940,
        -1380
      ],
      "parameters": {
        "width": 420,
        "height": 1460,
        "content": "## Try It Out!\n### This n8n template lets you summarize individual team member activity on slack for the past week and generates a report.\n\nFor remote teams, chat is a crucial communication tool to en"
      }
    }
  ],
  "connections": {
    "Filter": {
      "main": [
        [
          {
            "node": "Simplify Thread Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Get User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Map Reply UserIds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User": {
      "main": [
        [
          {
            "node": "Messages to Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Get User Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Map Users to Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate2": {
      "main": [
        []
      ]
    },
    "Aggregate3": {
      "main": [
        [
          {
            "node": "Aggregate4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate4": {
      "main": [
        []
      ]
    },
    "Get Thread": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out2": {
      "main": [
        [
          {
            "node": "Get Reply Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message Ref": {
      "main": [
        [
          {
            "node": "Get Thread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reply Users": {
      "main": [
        [
          {
            "node": "Messages to Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monday @ 6am": {
      "main": [
        [
          {
            "node": "Get Last Week's Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Group By User": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Reply Users": {
      "main": [
        [
          {
            "node": "Aggregate Reply Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has ReplyUsers?": {
      "main": [
        [
          {
            "node": "Split Out2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Aggregate3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Message Ref",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simplify Message": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Results": {
      "main": [
        [
          {
            "node": "Team Member Weekly Report Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Reply UserIds": {
      "main": [
        [
          {
            "node": "Has ReplyUsers?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Messages to Items": {
      "main": [
        [
          {
            "node": "Simplify Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarise Threads": {
      "main": [
        [
          {
            "node": "Aggregate2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge with Results": {
      "main": [
        [
          {
            "node": "Team Weekly Report Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Messages to Items1": {
      "main": [
        [
          {
            "node": "Summarise Threads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Reply Users": {
      "main": [
        [
          {
            "node": "Reply Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Message Replies": {
      "main": [
        [
          {
            "node": "Summarize Message Threads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Users to Messages": {
      "main": [
        [
          {
            "node": "Fetch Message Replies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Last Week's Messages": {
      "main": [
        [
          {
            "node": "Group By User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarise Threads",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simplify Thread Comments": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Team Weekly Report Agent": {
      "main": [
        [
          {
            "node": "Post Report in Team Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Team Member Weekly Report Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Team Weekly Report Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Message Threads": {
      "main": [
        [
          {
            "node": "Aggregate Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Team Member Weekly Report Agent": {
      "main": [
        [
          {
            "node": "Merge with Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}