{
  "name": "Email summary agent",
  "nodes": [
    {
      "id": "94c09c05-539b-452e-83b7-0a029bbe6b7f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -140
      ],
      "parameters": {
        "width": 248.47086922498647,
        "height": 314.47468983163634,
        "content": "- Starts the workflow every day at 7 AM.\n- Adjust the time if you want the workflow to run at a different hour."
      }
    },
    {
      "id": "5e5cbc87-5c01-438b-a1c0-e8468d3ee20b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -137.04548301590512
      ],
      "parameters": {
        "width": 213.36643278764896,
        "height": 313.40934714314244,
        "content": "Fetches all emails received in the past 24 hours from the email address"
      }
    },
    {
      "id": "9a82f5e9-7d0b-430f-9dbb-d8ae0b129dad",
      "name": "Daily 7AM Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -40,
        0
      ]
    },
    {
      "id": "dd3e4b10-187b-45ce-b999-f0143e5af134",
      "name": "Fetch Emails - Past 24 Hours",
      "type": "n8n-nodes-base.gmail",
      "position": [
        220,
        0
      ]
    },
    {
      "id": "4a8fdfd9-93d7-43a2-92b0-88d845f217bf",
      "name": "Organize Email Data - Morning",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        460,
        0
      ]
    },
    {
      "id": "9e2426e8-57ba-4708-b66f-b58bd19eabff",
      "name": "Summarize Emails with OpenAI - Morning",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        680,
        0
      ]
    },
    {
      "id": "4aa68ee8-d38f-418a-9f20-6cc76850c638",
      "name": "Send Summary - Morning",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1040,
        0
      ]
    },
    {
      "id": "c7667667-9533-40cb-9c09-914a11560600",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -132.6641804468672
      ],
      "parameters": {
        "width": 226.7095107678671,
        "height": 305.83657700487913,
        "content": "Organizes the fetched email data, extracting fields like sender, receiver, CC, and a preview snippet."
      }
    },
    {
      "id": "43955af4-3a18-44d7-8c8d-cf8051b18bdd",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        -180
      ],
      "parameters": {
        "width": 232.8435827211592,
        "height": 359.7308639651144,
        "content": "- Sends the summarized email report to recipients with a styled HTML layout.\n- Update the \"sendTo\" and \"ccList\" fields with the email addresses of your recipients.\n\n"
      }
    }
  ],
  "connections": {
    "Daily 7AM Trigger": {
      "main": [
        [
          {
            "node": "Fetch Emails - Past 24 Hours",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Emails - Past 24 Hours": {
      "main": [
        [
          {
            "node": "Organize Email Data - Morning",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Organize Email Data - Morning": {
      "main": [
        [
          {
            "node": "Summarize Emails with OpenAI - Morning",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Emails with OpenAI - Morning": {
      "main": [
        [
          {
            "node": "Send Summary - Morning",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}