{
  "name": "Weekly Notion journal & task summarization with GPT-4.1 to Discord",
  "nodes": [
    {
      "id": "c2b1647f-4bcb-42cb-b0e4-b5d885adafbb",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -512,
        -208
      ]
    },
    {
      "id": "1fb28c6c-1828-4c31-ac0b-386afcf3a5da",
      "name": "Get many child blocks",
      "type": "n8n-nodes-base.notion",
      "position": [
        0,
        -160
      ]
    },
    {
      "id": "8fa2862f-6be3-4c34-bc4c-bb3ac7d36cb5",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -512,
        80
      ]
    },
    {
      "id": "fea6281a-8dbd-45e0-9b7b-903c94383c88",
      "name": "Get Daily Journals",
      "type": "n8n-nodes-base.notion",
      "position": [
        -224,
        -160
      ]
    },
    {
      "id": "4ea7bb6f-83d9-46ff-a618-2b74b79ea5e1",
      "name": "To Dos Totals",
      "type": "n8n-nodes-base.code",
      "position": [
        0,
        32
      ]
    },
    {
      "id": "4d19c32a-cf6c-4723-abc9-378d64913dc4",
      "name": "To Do Summary",
      "type": "n8n-nodes-base.discord",
      "position": [
        208,
        32
      ]
    },
    {
      "id": "dc0d9a36-9e76-4b20-a16a-f50b22d338e8",
      "name": "Combined Summary for LLM",
      "type": "n8n-nodes-base.code",
      "position": [
        432,
        -160
      ]
    },
    {
      "id": "49819461-b703-4000-8aff-da38042d8844",
      "name": "Save Back to Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        1056,
        -64
      ]
    },
    {
      "id": "f48bcf16-337c-4fdd-9aa8-57c7d01889b6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1104,
        -304
      ],
      "parameters": {
        "width": 512,
        "height": 608,
        "content": "## Notion Weekly Journal AI Summary\nThis workflow will run on a weekly schedule and retrieve your Daily Journal pages for the past week and aggregate them into a ChatGPT generated concise summary. It "
      }
    },
    {
      "id": "c8f7b1d5-7938-4ca6-9aef-bd798d00c888",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        208,
        -160
      ]
    },
    {
      "id": "47c1b7de-9438-44b6-a339-d57b34bca3aa",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -304
      ],
      "parameters": {
        "width": 304,
        "height": 256,
        "content": "The preconfigured prompt is pretty generic, but feel free to edit to add humor or any other specific instructions you'd like ChatGPT to use when generating your summaries."
      }
    },
    {
      "id": "f258bd25-a104-4be5-8810-b02d97a04293",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -384
      ],
      "parameters": {
        "width": 224,
        "height": 576,
        "content": "Ensure your Notion connection is configured here as well as the page DB and Type (filter) you want to use when retrieving your daily journals.\nLikewise ensure your Tasks DB is configured correctly (or"
      }
    },
    {
      "id": "943f4c06-c8be-426d-bb19-c37db7bb8f9b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        16
      ],
      "parameters": {
        "width": 160,
        "height": 272,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\nCustomize the Weekly Tasks total summary message that gets sent to Discord."
      }
    },
    {
      "id": "23550382-cf64-4ff3-aee8-d1ade7e94fbb",
      "name": "Generate Summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        656,
        -160
      ]
    },
    {
      "id": "e769232f-bd6f-4437-93a4-8f7acddc704e",
      "name": "Send Summary",
      "type": "n8n-nodes-base.discord",
      "position": [
        1056,
        -256
      ]
    },
    {
      "id": "6bf259b0-0771-42c3-a438-1fe4df1267fb",
      "name": "Get Tasks",
      "type": "n8n-nodes-base.notion",
      "position": [
        -224,
        32
      ]
    }
  ],
  "connections": {
    "Aggregate": {
      "main": [
        [
          {
            "node": "Combined Summary for LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Tasks": {
      "main": [
        [
          {
            "node": "To Dos Totals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "To Dos Totals": {
      "main": [
        [
          {
            "node": "To Do Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Summary": {
      "main": [
        [
          {
            "node": "Send Summary",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save Back to Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Daily Journals",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Tasks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Daily Journals": {
      "main": [
        [
          {
            "node": "Get many child blocks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many child blocks": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combined Summary for LLM": {
      "main": [
        [
          {
            "node": "Generate Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get Daily Journals",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Tasks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}