{
  "id": "",
  "name": "My workflow",
  "tags": [],
  "nodes": [
    {
      "id": "f611e34d-0de9-42b7-b438-bc522817f9ba",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        180,
        180
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {},
      "typeVersion": 1.2
    },
    {
      "id": "7c968986-dcc4-4a26-bedf-5a5f9c75d2dc",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        340,
        180
      ],
      "parameters": {
        "sessionKey": "={{ $json.message.chat.id }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "fd291678-8522-4e00-94bc-7033689f14b3",
      "name": "Google Docs",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        480,
        180
      ],
      "parameters": {
        "operation": "get",
        "documentURL": "https://docs.google.com/document/d/1os02TMG0h74DYE_mmv5utPr68LtV946otozP1YZTNr0/edit?tab=t.0"
      },
      "credentials": {},
      "typeVersion": 2
    },
    {
      "id": "d3e871cb-48b9-4921-8376-359f53e40942",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -100,
        0
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {},
      "typeVersion": 1.2
    },
    {
      "id": "8deb9aa3-4b45-4737-a6a5-4311fb460b04",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        680,
        0
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {},
      "typeVersion": 1.2
    },
    {
      "id": "eac2e88c-0c0f-4451-bbe2-915de6e9ab1a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        -100
      ],
      "parameters": {
        "width": 300,
        "height": 500,
        "content": "Telegram Trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "c99be9a9-7368-4b22-be65-26108f8dc23a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        -100
      ],
      "parameters": {
        "color": 4,
        "width": 500,
        "height": 500,
        "content": "Telegram Trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "ba596aa6-e6fb-4df4-9bdb-7b75536cfbf6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -100
      ],
      "parameters": {
        "color": 3,
        "width": 280,
        "height": 500,
        "content": "Telegram Trigger"
      },
      "typeVersion": 1
    },
    {
      "id": "ccf10ec2-eae2-47be-9be7-7bf7b3d974cb",
      "name": "Customer Support AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        220,
        0
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "You are a helpful Customer Support Agent, cross-reference the Google Doc for any customer queries for relevant information. If relevant information is not found, do not make up facts. Plainly let the user know that the information isn't available. \n\n#Tonality\nFriendly, casual and helpful. if user or customer says hi, inform them that you are a Friendly Customer Support Agent"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "ac9ffbcd-0b7a-421e-92f4-5e367d6ba4c9",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        -100
      ],
      "parameters": {
        "color": 5,
        "width": 360,
        "height": 500,
        "content": "\ud83e\udd16 AI Customer Support Agent with Google Docs Knowledge (Telegram + OpenAI)\n\nThis no-code workflow turns your Telegram bot into an intelligent, always-on AI support agent that references your business documentation in Google Docs to respond to customer queries\u2014instantly and accurately.\n\nWatch full step-by-step video tutorial of the build here:\nhttps://www.youtube.com/@Automatewithmarc\n\n\ud83d\udd27 How it works:\nTelegram Trigger \u2013 Captures incoming messages from users on your Telegram bot\n\nLangchain AI Agent (OpenAI GPT) \u2013 Interprets the message and uses RAG (retrieval-augmented generation) techniques to craft an answer\n\nGoogle Docs Tool \u2013 Connects to and retrieves context from your specified Google Doc (e.g. FAQ, SOPs, policies)\n\nMemory Buffer \u2013 Keeps track of recent chat history for more human-like conversations\n\nTelegram Reply Node \u2013 Sends the AI-generated response back to the user\n\n\ud83d\udca1 Use Cases:\nE-commerce customer service\n\nSaaS product onboarding\n\nInternal helpdesk bot for teams\n\nWhatsApp-style support for digital businesses\n\n\ud83e\udde0 What makes this powerful:\nSupports complex questions by referencing a live Google Doc knowledge base\n\nWorks in plain conversational language (no buttons or forms needed)\n\nRuns 24/7 with zero code\n\nEasily extendable to Slack, WhatsApp, or email support\n\n\ud83d\udee0\ufe0f Tools used:\nTelegram Node (trigger + send)\n\nLangchain Agent with OpenAI GPT\n\nGoogle Docs Tool\n\nMemory Buffer\n\nSticky Notes for easy understanding"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "Google Docs": {
      "ai_tool": [
        [
          {
            "node": "Customer Support AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Customer Support AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Customer Support AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Customer Support AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Customer Support AI Agent": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}