8
n8n 한국어amn8n.com

Gemini Pro AI와 Google Docs를 통합한 Telegram 챗봇을 구축합니다.

중급

이것은Support Chatbot, AI Chatbot, Multimodal AI분야의자동화 워크플로우로, 9개의 노드를 포함합니다.주로 Wait, Telegram, GoogleDocsTool, SplitInBatches, HttpRequestTool 등의 노드를 사용하며. Gemini Pro AI와 Google Docs를 통합한 Telegram 챗봇을 구축합니다.

사전 요구사항
  • Telegram Bot Token
  • 대상 API의 인증 정보가 필요할 수 있음
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "meta": {
    "instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "17ac7115-a306-40bf-8b4a-9ce66ebbe3f1",
      "name": "모델에 메시지 전송",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        4800,
        1232
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.5-pro",
          "cachedResultName": "models/gemini-2.5-pro"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "Replay test write user-friendly."
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fbd4e562-fb5a-4e85-9814-75e4a9df2900",
      "name": "텍스트 메시지 보내기",
      "type": "n8n-nodes-base.telegram",
      "position": [
        5216,
        1232
      ],
      "webhookId": "3111e55e-41d3-4e3b-863c-bfda700bba92",
      "parameters": {
        "text": "={{ $json.content.parts[0].text }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}",
        "replyMarkup": "replyKeyboard",
        "additionalFields": {},
        "replyKeyboardOptions": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "98b5b120-ab55-47b2-8f0d-0bc29b32bb7f",
      "name": "Google Docs에서 문서 가져오기",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        5184,
        1488
      ],
      "parameters": {
        "simple": false,
        "operation": "get",
        "documentURL": "https://docs.google.com/document/d/19vaCViYaFkjFM6azAMf6fH6tDL2cwSsjTE5vX3eK6Ss"
      },
      "typeVersion": 2
    },
    {
      "id": "c3df74b4-6077-4383-9c23-2f7505cea1fe",
      "name": "Telegram 트리거",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        4224,
        1216
      ],
      "webhookId": "05fcff6f-5e32-4599-9b29-c585878352d8",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "41eee1be-dfb9-4e7d-b659-a9de0e740e7a",
      "name": "1초 대기",
      "type": "n8n-nodes-base.wait",
      "position": [
        5488,
        1232
      ],
      "webhookId": "8223d68f-b3b2-4c42-a6d2-473a19e2904c",
      "parameters": {
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "3dc90867-9946-4143-aeb9-a096993486c5",
      "name": "Google Gemini에서 모델에 메시지 전송",
      "type": "@n8n/n8n-nodes-langchain.googleGeminiTool",
      "position": [
        4992,
        1488
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.0-flash-exp",
          "cachedResultName": "models/gemini-2.0-flash-exp"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "Replay test write user-friendly."
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0049c3fc-f6a2-420f-b0ca-c7330021a405",
      "name": "HTTP 요청",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        4768,
        1488
      ],
      "parameters": {
        "url": "https://devcodejourney.com/",
        "options": {},
        "toolDescription": "Replay test write user-friendly."
      },
      "typeVersion": 4.2
    },
    {
      "id": "162fb82a-9ced-401a-a67e-6c4d3b84d118",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2544,
        1184
      ],
      "parameters": {
        "width": 1552,
        "height": 2352,
        "content": "# 🤖 Telegram + Gemini + Google Docs Automation in n8n\n\n## 📌 Overview\n\nThis n8n workflow listens for messages sent to a Telegram bot and replies with AI-generated responses using **Google Gemini (PaLM)**. It optionally interacts with **Google Docs** to fetch documents and makes external API requests using an **HTTP Request** node.\n\nThe flow also includes batching and waiting logic to control the pace of replies, making it scalable and human-friendly.\n\n---\n\n## 🧠 What This Workflow Does\n\n### ✅ 1. Trigger from Telegram\n- **Node**: `Telegram Trigger`\n- **Function**: Starts the workflow when a message is received via your Telegram bot.\n\n### ✅ 2. Loop Through Messages\n- **Node**: `Loop Over Items`\n- **Function**: Allows processing multiple incoming messages if required, using batching logic.\n\n### ✅ 3. AI-Powered Reply with Gemini\n- **Node**: `Message a model` (Google Gemini Pro)\n- **Function**: Sends the message to the Gemini AI (via Google PaLM API) to generate a human-friendly, conversational response.\n\n### ✅ 4. Send AI Response via Telegram\n- **Node**: `Send a text message`\n- **Function**: Sends the generated Gemini response back to the user on Telegram.\n\n### ✅ 5. Delay Between Replies\n- **Node**: `Wait 1s`\n- **Function**: Adds a 1-second delay before proceeding to the next message in the loop (helps avoid Telegram rate limits and creates more natural pacing).\n\n### ✅ 6. Optional: External API Request\n- **Node**: `HTTP Request`\n- **Function**: Makes an external API request to `https://devcodejourney.com/` (placeholder URL).\n- **Note**: Currently not connected to message flow but can be used to fetch or send additional data.\n\n### ✅ 7. Optional: Fetch Document from Google Docs\n- **Node**: `Get a document in Google Docs`\n- **Function**: Retrieves the contents of a Google Docs document from a provided link. Can be used to add static text, FAQs, or templates to the conversation.\n\n### ✅ 8. Optional: Alternate Gemini Tool\n- **Node**: `Message a model in Google Gemini`\n- **Function**: Uses a different version (`gemini-2.0-flash-exp`) of the Gemini AI model for fast responses or testing purposes.\n\n---\n\n## 🔧 Technologies Used\n\n- **Telegram Bot API** – for message triggers and replies  \n- **Google Gemini (PaLM API)** – for AI-generated responses  \n- **Google Docs API** – to fetch document content  \n- **HTTP Request** – to connect to any third-party API  \n- **n8n** – no-code/low-code workflow automation platform  \n\n---\n\n## ⚙️ Use Cases\n\n- AI Chatbot for Telegram using Gemini  \n- Personal Assistant or FAQ bot reading from Google Docs  \n- Customer service bot that replies in natural language  \n- Looping conversations with controlled pacing  \n- External data fetching with AI processing  \n\n---\n\n## 📌 Notes\n\n- Make sure you have the correct credentials configured in n8n for:\n  - Telegram Bot\n  - Google Docs OAuth2\n  - Google Gemini API (PaLM)\n- You can add error-handling nodes or conditionals to expand the logic.\n- This can be extended into a full AI chatbot or customer support bot.\n\n---\n\n## 🧩 Nodes Used\n\n| Node Name                          | Type                       | Purpose                                 |\n|-----------------------------------|----------------------------|-----------------------------------------|\n| Telegram Trigger                  | telegramTrigger            | Listens for incoming Telegram messages  |\n| Loop Over Items                   | splitInBatches             | Handles batching of incoming data       |\n| Message a model                   | langchain.googleGemini     | Sends prompt to Google Gemini (Pro)     |\n| Send a text message               | telegram                   | Sends response back to Telegram user    |\n| Wait 1s                           | wait                        | Adds a delay between responses          |\n| HTTP Request                      | httpRequestTool            | Sends HTTP request to external API      |\n| Get a document in Google Docs     | googleDocsTool             | Fetches content from Google Docs        |\n| Message a model in Google Gemini | googleGeminiTool           | Alternate Gemini model for responses    |\n\n---\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9c16c31f-95db-40ab-aa8d-37750b123d2a",
      "name": "항목 반복1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4480,
        1216
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    }
  ],
  "pinData": {},
  "connections": {
    "41eee1be-dfb9-4e7d-b659-a9de0e740e7a": {
      "main": [
        [
          {
            "node": "9c16c31f-95db-40ab-aa8d-37750b123d2a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0049c3fc-f6a2-420f-b0ca-c7330021a405": {
      "ai_tool": [
        [
          {
            "node": "17ac7115-a306-40bf-8b4a-9ce66ebbe3f1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "17ac7115-a306-40bf-8b4a-9ce66ebbe3f1": {
      "main": [
        [
          {
            "node": "fbd4e562-fb5a-4e85-9814-75e4a9df2900",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9c16c31f-95db-40ab-aa8d-37750b123d2a": {
      "main": [
        [],
        [
          {
            "node": "17ac7115-a306-40bf-8b4a-9ce66ebbe3f1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c3df74b4-6077-4383-9c23-2f7505cea1fe": {
      "main": [
        [
          {
            "node": "9c16c31f-95db-40ab-aa8d-37750b123d2a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fbd4e562-fb5a-4e85-9814-75e4a9df2900": {
      "main": [
        [
          {
            "node": "41eee1be-dfb9-4e7d-b659-a9de0e740e7a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "98b5b120-ab55-47b2-8f0d-0bc29b32bb7f": {
      "ai_tool": [
        [
          {
            "node": "17ac7115-a306-40bf-8b4a-9ce66ebbe3f1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "3dc90867-9946-4143-aeb9-a096993486c5": {
      "ai_tool": [
        [
          {
            "node": "17ac7115-a306-40bf-8b4a-9ce66ebbe3f1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

중급 - 지원 챗봇, AI 챗봇, 멀티모달 AI

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
중급
노드 수9
카테고리3
노드 유형9
난이도 설명

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
DevCode Journey

DevCode Journey

@devcodejourney

I build intelligent systems that automate tasks, streamline workflows, and enhance user experiences using tools like n8n, AI chatbots, and modern automation platforms. With a passion for solving real-world problems through smart technology, I create custom solutions that help individuals and businesses save time, scale faster, and work smarter. Whether it's integrating APIs, building no-code/low-code automations, or developing conversational AI, I'm always exploring the edge of what's possible.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34