{
  "name": "Send AI-generated emails via Telegram using GPT-4o-mini and Gmail",
  "nodes": [
    {
      "id": null,
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -80,
        0
      ]
    },
    {
      "id": null,
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        220,
        0
      ]
    },
    {
      "id": null,
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        180,
        160
      ]
    },
    {
      "id": null,
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        320,
        160
      ]
    },
    {
      "id": null,
      "name": "Gmail",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        460,
        160
      ]
    },
    {
      "id": null,
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        680,
        0
      ]
    },
    {
      "id": null,
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -80
      ],
      "parameters": {
        "width": 260,
        "height": 380,
        "content": "Telegram Message Received Trigger Node"
      }
    },
    {
      "id": null,
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -80
      ],
      "parameters": {
        "width": 460,
        "height": 380,
        "content": "AI Agent with Email Tool"
      }
    },
    {
      "id": null,
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -80
      ],
      "parameters": {
        "width": 300,
        "height": 380,
        "content": "Telegram Send Message Action Node"
      }
    },
    {
      "id": null,
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -180
      ],
      "parameters": {
        "width": 300,
        "height": 480,
        "content": "This is a simple workflow for an Email Agent connected to Telegram on message trigger.\n\n- Gmail is connected as an Email Sendng Tool\n- Telegram send message output is enabled to allow AI Agent to inte"
      }
    }
  ],
  "connections": {
    "Gmail": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}