{
  "name": "Get an AI Prep Brief in Email Before Every Outlook Calendar Meeting",
  "nodes": [
    {
      "name": "Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "notes": "Every 30 minutes, look an hour ahead.",
      "position": [
        260,
        300
      ]
    },
    {
      "name": "Outlook Calendar — Upcoming Events",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "parameters": {
        "method": "POST",
        "url": "https://api.example.com/replace-with-real-endpoint",
        "sendBody": true,
        "options": {}
      },
      "notes": "Outlook Calendar has no dedicated n8n node — use an HTTP Request to the Outlook Calendar API. Fetch meetings starting soon.",
      "position": [
        500,
        300
      ]
    },
    {
      "name": "Write Brief",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "parameters": {
        "resource": "text",
        "operation": "message",
        "modelId": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "user",
              "content": "Write a one-page meeting prep brief from this context: {{ $json.context }}"
            }
          ]
        }
      },
      "notes": "Swap in Anthropic or any LLM node if you prefer.",
      "position": [
        740,
        300
      ]
    },
    {
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2,
      "parameters": {
        "subject": "={{ $json.brief }}",
        "text": "={{ $json.summary }}"
      },
      "notes": "Add SMTP credentials (or swap for the Gmail node).",
      "position": [
        980,
        300
      ]
    },
    {
      "name": "Respond / Finish",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "notes": "End of flow — extend with extra steps as needed.",
      "position": [
        1220,
        300
      ]
    }
  ],
  "connections": {
    "Schedule": {
      "main": [
        [
          {
            "node": "Outlook Calendar — Upcoming Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Outlook Calendar — Upcoming Events": {
      "main": [
        [
          {
            "node": "Write Brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Brief": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email": {
      "main": [
        [
          {
            "node": "Respond / Finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
