8
n8n 한국어amn8n.com

Telegram 텍스트 출력

고급

이것은Other, Building Blocks, AI분야의자동화 워크플로우로, 19개의 노드를 포함합니다.주로 If, Code, Limit, Switch, SplitOut 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. LLM 출력을 텍스트 메시지로 변환하여 Telegram 메시지로 전환——자동 미디어 처리와 지능적 블록화

사전 요구사항
  • Telegram Bot Token
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "6bKCRgltEQMKck0S",
  "meta": {
    "instanceId": "90ee57f28a1370a05d29c652ea0aff6dc92be284367a87ea83ea3eac2120d7eb"
  },
  "name": "TelegramRichOutput",
  "tags": [],
  "nodes": [
    {
      "id": "a25428d1-d34c-42f4-9a1a-713bef6dc1e9",
      "name": "이미지 전송",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -480,
        720
      ],
      "webhookId": "bc86ba8e-2a9b-4f48-acdb-0550c95494ef",
      "parameters": {
        "file": "={{ $json.url }}",
        "chatId": "={{ $('When Executed by Another Workflow').item.json.chatId }}",
        "operation": "sendPhoto",
        "additionalFields": {
          "parse_mode": "HTML"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "FyjiLVRg007vuCnK",
          "name": "Telegram account (SCP)"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "052643fa-6319-43f3-a052-40ed0e255238",
      "name": "오디오 전송",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -260,
        720
      ],
      "webhookId": "bc86ba8e-2a9b-4f48-acdb-0550c95494ef",
      "parameters": {
        "file": "={{ $json.url }}",
        "chatId": "={{ $('When Executed by Another Workflow').item.json.chatId }}",
        "operation": "sendAudio",
        "additionalFields": {
          "parse_mode": "HTML"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "FyjiLVRg007vuCnK",
          "name": "Telegram account (SCP)"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "73dfb105-5ffe-4f8a-b96e-b0b556d73956",
      "name": "비디오 전송",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -60,
        720
      ],
      "webhookId": "bc86ba8e-2a9b-4f48-acdb-0550c95494ef",
      "parameters": {
        "file": "={{ $json.url }}",
        "chatId": "={{ $('When Executed by Another Workflow').item.json.chatId }}",
        "operation": "sendVideo",
        "additionalFields": {
          "parse_mode": "HTML"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "FyjiLVRg007vuCnK",
          "name": "Telegram account (SCP)"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "e715f898-1bca-4e4e-a463-f30815664766",
      "name": "텍스트 전송",
      "type": "n8n-nodes-base.telegram",
      "position": [
        140,
        220
      ],
      "webhookId": "c5c03eae-b148-4358-8792-d03d55bd0b48",
      "parameters": {
        "text": "={{ $('When Executed by Another Workflow').item.json.output }}",
        "chatId": "={{ $('When Executed by Another Workflow').item.json.chatId }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "FyjiLVRg007vuCnK",
          "name": "Telegram account (SCP)"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "38f15fa8-f9a2-469b-9f30-fed46296bf1f",
      "name": "텍스트가 너무 길 경우",
      "type": "n8n-nodes-base.if",
      "position": [
        -140,
        60
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a6365c72-9e4c-4b19-b725-9965fdb81e21",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $('When Executed by Another Workflow').item.json.output.length > 1000 }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "286d11cb-f94a-4143-8a27-34b5f4e14192",
      "name": "다른 워크플로우에서 실행 시",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -960,
        -100
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "chatId",
              "type": "number"
            },
            {
              "name": "output"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "dab1fb0c-970e-43f7-a335-c48639edaabe",
      "name": "링크 순환 처리",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -580,
        220
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "a1f73d92-b61e-41fa-a0c7-50e72078e096",
      "name": "링크 없을 경우",
      "type": "n8n-nodes-base.if",
      "position": [
        -520,
        -100
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "332d2f85-5f44-4d8b-a5c0-03bda9c3976d",
              "operator": {
                "type": "array",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.files }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bd57fe5e-940b-46f9-a76f-ba4d6bae5c7c",
      "name": "링크 분리",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -800,
        220
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "files"
      },
      "typeVersion": 1
    },
    {
      "id": "8e14c1e6-ece0-4310-97c2-829a37074706",
      "name": "대용량 텍스트 청크 분할",
      "type": "n8n-nodes-base.code",
      "position": [
        140,
        -120
      ],
      "parameters": {
        "jsCode": "const inputText = $('When Executed by Another Workflow').first().json.output || \"\";\nconst lines = inputText.split(\"\\n\");\n\nlet chunks = [];\nlet currentChunk = \"\";\n\nfor (const line of lines) {\n  // Check if adding the line would exceed the 1000 character limit\n  if ((currentChunk + line + \"\\n\").length > 1000) {\n    // Push current chunk if not empty\n    if (currentChunk) chunks.push(currentChunk.trim());\n    // Start new chunk with current line\n    currentChunk = line + \"\\n\";\n  } else {\n    // Add line to current chunk\n    currentChunk += line + \"\\n\";\n  }\n}\n\n// Push the final chunk if there’s remaining content\nif (currentChunk) chunks.push(currentChunk.trim());\n\n// Return each chunk as a separate item\nreturn { output:chunks.map(chunk => ({ chunk } ))};"
      },
      "typeVersion": 2
    },
    {
      "id": "b08e8087-f155-4747-a5d8-8c9bb5511777",
      "name": "청크 분리",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        360,
        -120
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output"
      },
      "typeVersion": 1
    },
    {
      "id": "94b015d0-a1b7-4e13-973a-5a25fe88c209",
      "name": "텍스트 청크 순환 처리",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        560,
        -120
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "51f2598e-4958-4139-ab00-3836b7a52ed5",
      "name": "텍스트 청크 전송",
      "type": "n8n-nodes-base.telegram",
      "position": [
        800,
        -120
      ],
      "webhookId": "c5c03eae-b148-4358-8792-d03d55bd0b48",
      "parameters": {
        "text": "={{ $json.chunk }}",
        "chatId": "={{ $('When Executed by Another Workflow').item.json.chatId }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "FyjiLVRg007vuCnK",
          "name": "Telegram account (SCP)"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d7baaaff-a918-487d-970a-d2ef498504b3",
      "name": "제한",
      "type": "n8n-nodes-base.limit",
      "position": [
        -380,
        220
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5f724698-027f-4e88-8329-1abd00f8e6c7",
      "name": "링크 추출",
      "type": "n8n-nodes-base.code",
      "position": [
        -740,
        -100
      ],
      "parameters": {
        "jsCode": "// free-text input\nconst text = $input.first().json.output ?? \"\";\n\n/* media extensions grouped by type */\nconst IMG = ['jpg','jpeg','png','gif','bmp','webp','tif','tiff'];\nconst AUD = ['mp3','wav','m4a','flac','ogg','aac','opus'];\nconst VID = ['mp4','mov','mkv','webm','avi','mpeg','mpg'];\n\n/* one regex that grabs any media URL (no lazy quantifier, so the whole link is kept) */\nconst re = /(https?:\\/\\/[^\\s\"'<>]+\\.(?<ext>[A-Za-z0-9]{2,5}))(?:\\?[^\\s\"'<>]*)?/gi;\n\nconst seen  = new Set();\nconst files = [];\n\nfor (const m of text.matchAll(re)) {\n  const url = m[1];\n  if (seen.has(url)) continue;          // de-dupe\n  seen.add(url);\n\n  const ext = (m.groups.ext || '').toLowerCase();\n\n  let type = 'other';\n  if (IMG.includes(ext))  type = 'image';\n  else if (AUD.includes(ext)) type = 'audio';\n  else if (VID.includes(ext)) type = 'video';\n\n  files.push({ url, type });\n}\n\nreturn [{ json: { files } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "45e41a01-68a2-4b64-8830-e05916170a97",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        420
      ],
      "parameters": {
        "color": 5,
        "width": 660,
        "height": 480,
        "content": "## Send links\nSend links to chat as separate messages \nwith appropriate type (image, audio, video)"
      },
      "typeVersion": 1
    },
    {
      "id": "bbeb6619-4a48-40f5-be75-e99e0c53462e",
      "name": "스티커 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -220
      ],
      "parameters": {
        "color": 6,
        "width": 900,
        "height": 300,
        "content": "## Send a long message\nSeparate long message by chunks and send them one by one"
      },
      "typeVersion": 1
    },
    {
      "id": "4dbf96c8-fb30-4c22-8fc9-c551cb9893c6",
      "name": "스티커 노트2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        120
      ],
      "parameters": {
        "width": 300,
        "height": 260,
        "content": "## Send a short message\nDeliver a short message (default flow)"
      },
      "typeVersion": 1
    },
    {
      "id": "e13e63e9-331e-458b-8933-4ec608eab00a",
      "name": "링크 유형 확인",
      "type": "n8n-nodes-base.switch",
      "position": [
        -60,
        480
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "image",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "10ec4538-b5cc-4562-954a-fc4ada846d78",
                    "operator": {
                      "type": "string",
                      "operation": "endsWith"
                    },
                    "leftValue": "={{ $json.type }}",
                    "rightValue": "image"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "audio",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "9e0cee56-b281-4d01-9196-eb6495be9641",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.type }}",
                    "rightValue": "audio"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "video",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "007d1c92-0cd0-4dd6-ab9b-8c869e20797d",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.type }}",
                    "rightValue": "video"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    }
  ],
  "active": false,
  "pinData": {
    "Split Out the Chunks": [
      {
        "json": {
          "chunk": "Here are the image prompts we have so far:\n\n1. A pile of ancient, golden and silver coins scattered on a worn wooden table. The coins have varied designs with ornate patterns and symbols, and reflect light with an unnatural shimmer. A dim light from an overhead lamp highlights their metallic surface against the dark surroundings of what appears to be an old study room with bookshelves in the background.\n\n2. Ancient golden and silver coins suspended in mid-air, forming a slowly rotating spiral pattern about 2 feet above a worn wooden table. Various coins spin on their edges while others twist and turn in different directions. A person's silhouette is visible in the background, approaching cautiously. The room appears colder with a slight blue tint, and tiny ice crystals have formed on the edges of the table near the floating coins."
        }
      },
      {
        "json": {
          "chunk": "3. A researcher with a pained expression, looking pale and disoriented, stands beside a wooden table. Their hand is stretched out toward floating golden and silver coins, which are now partially transparent and fading at the edges. Some coins appear to be dissolving into tiny particles of light. Frost has formed on the researcher's outstretched fingers, and their breath is visible in the now freezing air of the study room.\n\n4. An empty wooden table where the coins once were, with only a few small patches of frost remaining as evidence. The researcher has stepped back, looking exhausted and confused. Their hand that reached for the coins appears slightly translucent, as if it partially disappeared with the coins. Scientific instruments scattered around the table show unusual readings with their displays glitching. The temperature in the room is returning to normal, shown by the frost slowly melting and the researcher's breath no longer visible."
        }
      },
      {
        "json": {
          "chunk": "5. A secure containment chamber with reinforced glass walls displaying the SCP 45 coins back in their dormant state on a pedestal. Several monitoring devices surround the pedestal, including thermal cameras and motion sensors with digital readouts showing extremely low temperatures. A researcher in protective gear stands at a safe distance, taking notes on a tablet. Warning signs on the walls indicate \"NO PHYSICAL CONTACT\" and \"TEMPORAL ANOMALY.\" The lighting is clinical and stark, highlighting the controlled environment in contrast to the earlier study room."
        }
      },
      {
        "json": {
          "chunk": "6. A classified SCP Foundation document page with aged photographs and handwritten notes about SCP 45's historical appearances. The document shows sketches of the coins from different time periods and locations, with red ink highlighting recurring witnesses who reported missing time. A black and white photograph from the 1920s shows identical coins in a museum display, with a blurred figure reaching toward them. The document is stamped \"LEVEL 4 CLEARANCE REQUIRED\" and includes marginalia noting correlation between coin appearances and local temporal anomalies. A coffee cup ring stains one corner of the document, giving it an authentic feel."
        }
      },
      {
        "json": {
          "chunk": "7. An archaeological excavation site inside an ancient temple vault. Researchers in protective gear carefully work around a stone altar where the SCP 45 coins are embedded in a circular pattern. Specialized equipment with SCP Foundation logos monitors the area, with readings showing temporal distortions. One researcher points to strange hieroglyphs on the wall depicting people with missing limbs reaching for circular objects. Small temporal bubbles, visible as distortions in the air, surround parts of the coins. Light from headlamps creates dramatic shadows across the dusty chamber, highlighting the tense, cautious expressions of the recovery team members."
        }
      },
      {
        "json": {
          "chunk": "8. A time-lapse montage showing a research subject affected by SCP 45. The image is split into four quadrants showing the same person at different stages: initially normal, then with a translucent arm, then with half their body faded, and finally just a ghost-like outline barely visible. Each quadrant shows a digital clock in the background with dramatically different times despite being taken minutes apart. The final quadrant shows researchers in hazmat suits responding to the emergency, their movements captured as motion blurs around the fading subject."
        }
      }
    ],
    "When Executed by Another Workflow": [
      {
        "json": {
          "chatId": 775716734,
          "output": "I've generated a 15-second narration about SCP-096 and created the audio file. The narration is:\n\n\"There is a creature called SCP-096 that is very thin and pale. If someone sees its face, even by accident, it becomes extremely upset and will chase them anywhere to keep its face hidden.\"\n\nI've saved the narration text and audio to your project. The audio file has been generated and is available at:\nhttps://tktuvgvuoreixlzuubfz.supabase.co/storage/v1/object/hht/2025-05-14_044617_voice.mp3\n\nThe actual audio length is 23 seconds.\n\nWould you like me to proceed with creating image prompts for this SCP-096 video?"
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1901c6ab-e8db-40ee-81a2-6dd7967d2dd8",
  "connections": {
    "d7baaaff-a918-487d-970a-d2ef498504b3": {
      "main": [
        [
          {
            "node": "38f15fa8-f9a2-469b-9f30-fed46296bf1f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a1f73d92-b61e-41fa-a0c7-50e72078e096": {
      "main": [
        [
          {
            "node": "38f15fa8-f9a2-469b-9f30-fed46296bf1f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "bd57fe5e-940b-46f9-a76f-ba4d6bae5c7c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5f724698-027f-4e88-8329-1abd00f8e6c7": {
      "main": [
        [
          {
            "node": "a1f73d92-b61e-41fa-a0c7-50e72078e096",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e13e63e9-331e-458b-8933-4ec608eab00a": {
      "main": [
        [
          {
            "node": "a25428d1-d34c-42f4-9a1a-713bef6dc1e9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "052643fa-6319-43f3-a052-40ed0e255238",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "73dfb105-5ffe-4f8a-b96e-b0b556d73956",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dab1fb0c-970e-43f7-a335-c48639edaabe": {
      "main": [
        [
          {
            "node": "d7baaaff-a918-487d-970a-d2ef498504b3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "e13e63e9-331e-458b-8933-4ec608eab00a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "51f2598e-4958-4139-ab00-3836b7a52ed5": {
      "main": [
        [
          {
            "node": "94b015d0-a1b7-4e13-973a-5a25fe88c209",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "38f15fa8-f9a2-469b-9f30-fed46296bf1f": {
      "main": [
        [
          {
            "node": "8e14c1e6-ece0-4310-97c2-829a37074706",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "e715f898-1bca-4e4e-a463-f30815664766",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "73dfb105-5ffe-4f8a-b96e-b0b556d73956": {
      "main": [
        [
          {
            "node": "dab1fb0c-970e-43f7-a335-c48639edaabe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "052643fa-6319-43f3-a052-40ed0e255238": {
      "main": [
        [
          {
            "node": "dab1fb0c-970e-43f7-a335-c48639edaabe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a25428d1-d34c-42f4-9a1a-713bef6dc1e9": {
      "main": [
        [
          {
            "node": "dab1fb0c-970e-43f7-a335-c48639edaabe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bd57fe5e-940b-46f9-a76f-ba4d6bae5c7c": {
      "main": [
        [
          {
            "node": "dab1fb0c-970e-43f7-a335-c48639edaabe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b08e8087-f155-4747-a5d8-8c9bb5511777": {
      "main": [
        [
          {
            "node": "94b015d0-a1b7-4e13-973a-5a25fe88c209",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "94b015d0-a1b7-4e13-973a-5a25fe88c209": {
      "main": [
        [],
        [
          {
            "node": "51f2598e-4958-4139-ab00-3836b7a52ed5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8e14c1e6-ece0-4310-97c2-829a37074706": {
      "main": [
        [
          {
            "node": "b08e8087-f155-4747-a5d8-8c9bb5511777",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "286d11cb-f94a-4143-8a27-34b5f4e14192": {
      "main": [
        [
          {
            "node": "5f724698-027f-4e88-8329-1abd00f8e6c7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

고급 - 기타, 빌딩 블록, 인공지능

유료인가요?

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

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

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34