{
  "name": "Manage calendar with voice & text using GPT-4, Telegram & Google Calendar",
  "nodes": [
    {
      "id": "01b29a4c-25cf-4c03-ab87-810f070d4be3",
      "name": "Create Event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        640,
        340
      ]
    },
    {
      "id": "1758e2e3-e25d-4b1b-b57d-c711ec8553ce",
      "name": "Get events",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        760,
        340
      ]
    },
    {
      "id": "9092f4dd-1982-4bb7-94f9-7f29e4fec6ef",
      "name": "Update Calendar",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        880,
        340
      ]
    },
    {
      "id": "738a78e0-6256-4827-aac9-9eaf7c6ae91c",
      "name": "Detele Event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        1000,
        340
      ]
    },
    {
      "id": "19674d23-67eb-46a1-a975-d64a64b6188a",
      "name": "Receive User Input (Telegram)\t",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -360,
        0
      ]
    },
    {
      "id": "0159ed56-542d-4fa1-867f-cba130466061",
      "name": "Is Voice Message?\t",
      "type": "n8n-nodes-base.if",
      "position": [
        -80,
        0
      ]
    },
    {
      "id": "008051e4-e006-4f18-a204-f64b322a4da6",
      "name": "Download Voice File\t",
      "type": "n8n-nodes-base.telegram",
      "position": [
        140,
        -100
      ]
    },
    {
      "id": "e738c52a-d6b4-4fde-8dd8-2095db8eaf88",
      "name": "Transcribe Voice to Text\t",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        320,
        -100
      ]
    },
    {
      "id": "5563f7c4-a87a-4728-a5ae-6e17ba59ff99",
      "name": "Extract Text Message\t",
      "type": "n8n-nodes-base.set",
      "position": [
        140,
        100
      ]
    },
    {
      "id": "7ee11667-7834-464d-92e8-07be97f7f18a",
      "name": "AI Calendar Assistant (LangChain)\t",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        520,
        100
      ]
    },
    {
      "id": "8651b116-a5eb-4e21-b03f-5375efb0d8ed",
      "name": "GPT-4 Language Model\t",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        360,
        340
      ]
    },
    {
      "id": "d014339d-7cb6-4bfe-bfbe-3f319a4fdf2c",
      "name": "Send Response to Telegram\t",
      "type": "n8n-nodes-base.telegram",
      "position": [
        940,
        100
      ]
    },
    {
      "id": "6c74e5a0-56dc-4fbf-8826-fb1b16d96504",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        -740
      ],
      "parameters": {
        "width": 1600,
        "height": 140,
        "content": "## Global Workflow Description\n  \n**\"AI-Powered Calendar Assistant: Voice & Text Input → GPT-4 → Google Calendar\"**  \n\n*Explains:* Built using Telegram, OpenAI (Whisper + GPT-4), and Google Calendar t"
      }
    },
    {
      "id": "5728ff55-e8c3-4b3f-9c85-0b111c1e18ec",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        -480
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "## Start / Input\n\n**\"Start: Listen for Telegram input (text or voice message)\"**  \n \n*Explains:* This node triggers the workflow when a user sends a message via Telegram."
      }
    },
    {
      "id": "a2d2cdbf-ad34-4931-a4c9-ba79c89e09ac",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        -480
      ],
      "parameters": {
        "width": 200,
        "height": 320,
        "content": "## Decision: Voice or Text\n \n**\"Check if the incoming message is a voice note (.ogg)\"**  \n\n*Explains:* If the message is a voice file, the workflow follows the transcription path. Otherwise, it proces"
      }
    },
    {
      "id": "92b826ed-4189-4d0e-911a-48ae3b44c45e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -480
      ],
      "parameters": {
        "width": 300,
        "height": 320,
        "content": "## Voice Transcription\n \n**\"Download the voice file and transcribe it to text \"**  \n\n\n*Explains:* Uses OpenAI Whisper to convert voice messages to plain text."
      }
    },
    {
      "id": "fbdcd510-14b6-4d50-8fd7-352b421ac8a4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        300
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "## Text Extraction\n\n**\"Extract plain text from user’s message (if no voice)\"**  \n\n*Explains:* Gets the written message text for further processing."
      }
    },
    {
      "id": "76874498-00dc-499f-9930-8f02e143ad8d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        500
      ],
      "parameters": {
        "width": 640,
        "height": 360,
        "content": "## AI Interpretation\n\n**\"Analyze user intent using GPT-4 and decide next calendar action\"**  \n\n*Explains:* AI determines whether the user wants to create, update, fetch, or delete a calendar event.\n\n#"
      }
    },
    {
      "id": "7d55eed3-9715-4759-a806-e6d56e38f892",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        -220
      ],
      "parameters": {
        "width": 340,
        "height": 240,
        "content": "## Send Response\n\n**\"Send a confirmation or result message back to the user\"**  \n\n*Explains:* Closes the loop by replying with the output from the assistant."
      }
    }
  ],
  "connections": {
    "Get events": {
      "ai_tool": [
        [
          {
            "node": "AI Calendar Assistant (LangChain)\t",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Event": {
      "ai_tool": [
        [
          {
            "node": "AI Calendar Assistant (LangChain)\t",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Detele Event": {
      "ai_tool": [
        [
          {
            "node": "AI Calendar Assistant (LangChain)\t",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Calendar": {
      "ai_tool": [
        [
          {
            "node": "AI Calendar Assistant (LangChain)\t",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Is Voice Message?\t": {
      "main": [
        [
          {
            "node": "Download Voice File\t",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Text Message\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Voice File\t": {
      "main": [
        [
          {
            "node": "Transcribe Voice to Text\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text Message\t": {
      "main": [
        [
          {
            "node": "AI Calendar Assistant (LangChain)\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT-4 Language Model\t": {
      "ai_languageModel": [
        [
          {
            "node": "AI Calendar Assistant (LangChain)\t",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe Voice to Text\t": {
      "main": [
        [
          {
            "node": "AI Calendar Assistant (LangChain)\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Response to Telegram\t": {
      "main": [
        []
      ]
    },
    "Receive User Input (Telegram)\t": {
      "main": [
        [
          {
            "node": "Is Voice Message?\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Calendar Assistant (LangChain)\t": {
      "main": [
        [
          {
            "node": "Send Response to Telegram\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}