{
  "name": "Gmail to Telegram: email summaries with OpenAI GPT-4o",
  "nodes": [
    {
      "id": "28581eaf-47f8-43ad-81cf-688d8f77a630",
      "name": "Prepare fields for agent",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        -160
      ]
    },
    {
      "id": "f72c5973-cc9d-4815-993c-ed7bd853fcc4",
      "name": "When a new email arrives",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -520,
        -160
      ]
    },
    {
      "id": "95fb2d1e-efbb-4163-9e75-b85cf3fd50bf",
      "name": "Set summary language",
      "type": "n8n-nodes-base.set",
      "position": [
        -300,
        -160
      ]
    },
    {
      "id": "8db9747f-c0a6-4044-837a-04212c8dbe56",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        228,
        60
      ]
    },
    {
      "id": "8823b3ab-4e9b-4be6-bf6c-9772f1fcd17e",
      "name": "Send summary to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        516,
        -160
      ]
    },
    {
      "id": "ad603819-26e0-41e8-b4bb-99d30cbc4902",
      "name": "Summary generation agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        140,
        -160
      ]
    },
    {
      "id": "89b1c4b0-3de4-4a81-a57b-a5e4951ea654",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -680
      ],
      "parameters": {
        "width": 1240,
        "height": 480,
        "content": "## 📨 Send AI summaries of incoming emails from Gmail to Telegram\n\n### ℹ️ ABOUT THIS WORKFLOW\nThis workflow will send you AI-generated summaries of all your Gmail incoming emails to Telegram.\n\n### 🛠️ S"
      }
    }
  ],
  "connections": {
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summary generation agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Set summary language": {
      "main": [
        [
          {
            "node": "Prepare fields for agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare fields for agent": {
      "main": [
        [
          {
            "node": "Summary generation agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summary generation agent": {
      "main": [
        [
          {
            "node": "Send summary to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When a new email arrives": {
      "main": [
        [
          {
            "node": "Set summary language",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}