일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- 정보보안
- SQLD
- 시험
- neo4j성능
- Golang
- 그래프 데이터베이스
- 프로그래밍
- 해킹
- 위협 탐지
- 보안솔루션
- 자격증
- 랜섬웨어
- 데이터모델링
- security
- 사이버보안
- 보안
- Database
- graph
- 사이버 보안
- concurrency
- 보안 분석
- 정리
- 공부
- 그래프데이터베이스
- go
- cypher
- Neo4j
- 정보보안기사
- GraphDB
- IT보안
- Today
- Total
Jamie the programmer
📌 n8n Telegram Workflow 구축 # 1 : Bot Token 발급 과정 본문
n8n을 활용하여 Telegram 자동화를 구현하려면 Telegram 봇 API 토큰이 필요합니다.
하지만 검색해보면 정보가 부족해서 직접 구현해보면서 하나하나 과정을 정리해 보았습니다. 🧐
이번 글에서는 Telegram 봇을 만들고 API 토큰을 발급받는 과정까지 상세히 설명하겠습니다. 🚀
1️⃣ Telegram 봇 생성 및 API 토큰 발급
① Telegram 설치 및 계정 생성
먼저 Telegram을 설치하고 로그인해야 합니다.
어떤 플랫폼을 사용하든 상관없습니다!
- iPhone, Android, Windows, macOS, 또는 웹 버전에서 Telegram을 다운로드합니다.
Telegram 계정을 생성하고 로그인합니다.
② BotFather를 이용해 새 봇 생성
Telegram에서 봇을 만들려면 @BotFather라는 공식 관리 봇을 이용해야 합니다.
1. [대화] 탭에서 @BotFather 검색🔎
2. BotFather를 선택하고 [시작] 버튼을 클릭합니다.
3. 💬 /newbot 명령어를 입력합니다.
BotFather가 다음 두 가지 정보를 입력하라고 요청합니다.
- 봇 이름: 사용자에게 표시될 봇의 이름 (예: My Awesome Bot).
- 봇 사용자명 (username): 반드시 bot으로 끝나야 합니다. (예: my_awesome_bot)
위 정보를 입력하면 API 토큰이 발급됩니다! 🎉
📌 토큰 예시:
Done! Congratulations on your new bot.
You can use the following token to access HTTP API
123456789:ABCDefghIJKLMNOPqrstUVWXyz
💡 이 API 토큰을 활용하면 n8n에서 Telegram과 연동하여 메시지를 자동으로 처리할 수 있습니다. ⚡
2️⃣ 내가 만든 봇 찾기 및 테스트
① 생성한 봇 찾기
1. BotFather에서 받은 username을 사용하여 Telegram에서 직접 검색할 수 있습니다.
- Telegram에서 내가 지정한 봇 username을 검색합니다. 🔎
- 검색 결과에서 내 봇을 선택합니다.
② 봇과 대화하기
1. [시작] 버튼을 클릭하고 “안녕!” 같은 메시지를 보내봅니다.
하지만 아직 응답이 없습니다…⏳ 왜냐하면 n8n에서 봇을 설정하지 않았기 때문!!🙅♂️
✨ 이제 API 토큰을 확보했으니, 다음 단계에서 n8n을 활용해 Telegram과 연동하는 과정을 진행하면 됩니다! 🚀
다음 글에서는 n8n을 활용한 Telegram 메시지 자동 응답 설정 방법을 설명하겠습니다! 🎯
References
* guide in n8n
Telegram credentials#
You can use these credentials to authenticate the following nodes:
* Telegram
* Telegram Trigger
* Prerequisites#
Create a Telegram account.
Supported authentication methods#
* API bot access token
* Related resources#
Refer to Telegram's Bot API documentation for more information about the service.
Refer to the Telegram Bot Features documentation for more information on creating and working with bots.
Using API bot access token#
To configure this credential, you'll need:
* A bot Access Token
* To generate your access token:
1. Start a chat with the BotFather.
2. Enter the /newbot command to create a new bot.
3. The BotFather will ask you for a name and username for your new bot:
* The name is the bot's name displayed in contact details and elsewhere. You can change the bot name later.
* The username is a short name used in search, mentions, and t.me links. Use these guidelines when creating your username:
* Must be between 5 and 32 characters long.
* Not case sensitive.
* May only include Latin characters, numbers, and underscores.
* Must end in bot, like tetris_bot or TetrisBot.
* You can't change the username later.
4. Copy the bot token the BotFather generates and add it as the Access Token in n8n.
* Refer to the BotFather Create a new bot documentation for more information.
'programming > AI' 카테고리의 다른 글
📌 n8n Telegram Workflow 구축 #2 : Telegram Trigger로 메시지 수신 및 응답 자동화 (1) | 2025.02.23 |
---|---|
n8n 한글 번역 테스트 # 1 (1) | 2025.02.19 |