AI Skill Report Card
Building Telegram Personal Assistants
Building Telegram Personal Assistants with n8n
Quick Start15 / 15
Create a basic Telegram bot workflow in n8n:
- Telegram Trigger → OpenAI Chat → Telegram Response
- Add conditional logic: Audio messages → OpenAI Whisper → OpenAI Chat
- Connect Gmail and Google Calendar nodes for email/calendar functions
- Add memory by storing conversation history in a database node
Workflow: Telegram → [Audio Check] → Whisper → Chat → [Action Router] → Gmail/Calendar → Response
Recommendation▾
Add concrete n8n node configuration examples (JSON snippets) instead of just workflow descriptions
Workflow13 / 15
Phase 1: Core Setup
Progress:
- Create Telegram bot via BotFather, get API token
- Set up n8n Telegram webhook trigger
- Configure OpenAI credentials (GPT + Whisper)
- Test basic text conversation flow
Phase 2: Audio Processing
Progress:
- Add IF node to detect audio messages
- Connect OpenAI Whisper for transcription
- Route transcribed text to main chat logic
- Test audio-to-text-to-response flow
Phase 3: Service Integration
Progress:
- Set up Gmail OAuth credentials
- Configure Google Calendar API access
- Create conditional routing based on user intent
- Add email sending and calendar checking functions
Phase 4: Memory & Personality
Progress:
- Add conversation memory (database or JSON storage)
- Define agent personality in system prompt
- Implement context awareness across messages
- Test multi-turn conversations
Recommendation▾
Include specific OpenAI prompt templates for the assistant personality rather than general guidance
Examples16 / 20
Example 1: Audio Transcription Input: Voice message "Agende reunião amanhã às 14h" Output: "Entendi! Vou agendar uma reunião para amanhã às 14h. Qual o título da reunião?"
Example 2: Email Integration Input: "Envie email para joão@empresa.com sobre o relatório" Output: "Email enviado para joão@empresa.com com o assunto 'Relatório'. Precisa de mais alguma coisa?"
Example 3: Calendar Check Input: "O que tenho na agenda hoje?" Output: "Você tem 3 compromissos hoje: Reunião às 9h, Almoço às 12h, Call às 15h."
Recommendation▾
Provide actual database schema or JSON structure examples for conversation memory storage
Best Practices
Workflow Design:
- Use IF nodes for message type routing (text vs audio)
- Implement error handling for API failures
- Add delays between API calls to avoid rate limits
- Store conversation context for better responses
Prompt Engineering:
- Define clear personality traits in system prompt
- Include examples of desired response format
- Specify when to trigger email/calendar actions
- Set boundaries for what the assistant can/cannot do
Security:
- Use environment variables for all API keys
- Validate user permissions before email/calendar access
- Implement rate limiting for heavy operations
- Log interactions for debugging (remove sensitive data)
Memory Management:
- Store last 10-20 messages for context
- Clear old conversations periodically
- Include timestamp and user ID in memory
- Compress long conversations to save tokens
Common Pitfalls
Authentication Issues:
- Don't hardcode API keys in workflows
- Gmail OAuth requires proper scope setup
- Test credential connections before building complex flows
Audio Processing:
- Large audio files may timeout - add file size limits
- Whisper has language detection - specify Portuguese if needed
- Handle audio format compatibility (voice messages vs files)
Flow Logic:
- Avoid infinite loops in conditional routing
- Add timeout nodes for long-running operations
- Test edge cases (empty messages, unsupported file types)
Performance:
- Don't store entire conversation history in memory
- Use webhook triggers, not polling for better response time
- Optimize OpenAI token usage with concise prompts
User Experience:
- Add typing indicators for long operations
- Provide clear error messages in Portuguese
- Include help commands and usage examples
- Set expectations about response time for complex tasks