{
  "name": "Daily Gmail inbox digest to Discord with GPT-4.1-mini and PDF conversion",
  "nodes": [
    {
      "id": "3b5b2708-da04-420a-aa33-498cd726ab8d",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        -224
      ]
    },
    {
      "id": "602ac44e-3936-4cfe-81fc-0c89aa180904",
      "name": "Discord",
      "type": "n8n-nodes-base.discord",
      "position": [
        2272,
        -224
      ]
    },
    {
      "id": "cab9950b-4b4f-418b-ae4c-bd29a4966bb5",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        880,
        -64
      ]
    },
    {
      "id": "85dde31c-3895-4ece-bb8c-ee5f21f55c89",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1920,
        -224
      ]
    },
    {
      "id": "a49d8c5b-f638-4309-add4-7524c347e9cb",
      "name": "Summarization Chain",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        896,
        -224
      ]
    },
    {
      "id": "7f9ab61d-ffd9-477e-8886-2472e5d4a1ab",
      "name": "PDFco Api",
      "type": "n8n-nodes-pdfco.PDFco Api",
      "position": [
        1696,
        -224
      ]
    },
    {
      "id": "156e95b9-c5c7-477d-b1a4-0c3545a56669",
      "name": "Markdown",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1472,
        -224
      ]
    },
    {
      "id": "190586e3-685c-4c95-87f1-882dba9e54ca",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        672,
        -224
      ]
    },
    {
      "id": "9c7247ee-9811-4ad4-bb4a-bbc53a23ab38",
      "name": "extract required sections from mails",
      "type": "n8n-nodes-base.code",
      "position": [
        448,
        -224
      ]
    },
    {
      "id": "157ef58a-86fa-41fc-96d4-b058684d513f",
      "name": "get mails from past 24 h",
      "type": "n8n-nodes-base.gmail",
      "position": [
        224,
        -224
      ]
    },
    {
      "id": "0df5a671-79aa-4c7d-bbd7-296a214b4c9c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -368
      ],
      "parameters": {
        "width": 400,
        "height": 320,
        "content": "## extract fields and aggregate\n- sender\n- subject\n- body"
      }
    },
    {
      "id": "5a0a95ad-14a7-484a-94c2-ef6a582151fa",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -304
      ],
      "parameters": {
        "width": 208,
        "height": 208,
        "content": "## get mails\n- Important and inbox"
      }
    },
    {
      "id": "2335cdb8-b1e1-4d7c-98f7-e84dfec2e4c0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -320
      ],
      "parameters": {
        "width": 192,
        "height": 256,
        "content": "## daily trigger"
      }
    },
    {
      "id": "b82da96e-aa95-45fd-b13e-51f998143f6c",
      "name": "separate text and markdown",
      "type": "n8n-nodes-base.code",
      "position": [
        1248,
        -224
      ]
    },
    {
      "id": "44150497-0310-40d3-bb8d-8bd7624ab4c1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        -384
      ],
      "parameters": {
        "width": 320,
        "height": 480,
        "content": "## summarize all mails\n- ### model used gpt 4o-mini"
      }
    },
    {
      "id": "e77850b7-6d9c-44da-8c36-33ab2cac645f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        -304
      ],
      "parameters": {
        "width": 432,
        "height": 240,
        "content": "## convert markdown to html and convert html to pdf using PDFco Api"
      }
    },
    {
      "id": "24c297f1-9195-43e2-b27d-208aaad5b518",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        -400
      ],
      "parameters": {
        "width": null,
        "height": 336,
        "content": "## Download PDF\n- ### using link generated from pdfco"
      }
    },
    {
      "id": "31e1f02c-4b0a-49c6-ad17-3d8bef1fc35c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2192,
        -352
      ],
      "parameters": {
        "width": 336,
        "height": 304,
        "content": "## Send discord\n- using webhook\n- result will contain summary and a pdf of summary"
      }
    }
  ],
  "connections": {
    "Markdown": {
      "main": [
        [
          {
            "node": "PDFco Api",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Summarization Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PDFco Api": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Discord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "get mails from past 24 h",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Summarization Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Summarization Chain": {
      "main": [
        [
          {
            "node": "separate text and markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get mails from past 24 h": {
      "main": [
        [
          {
            "node": "extract required sections from mails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "separate text and markdown": {
      "main": [
        [
          {
            "node": "Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract required sections from mails": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}