Description
🔒 Telegram Censor – n8n Content Moderation Node
Protect Your Telegram Channel or Group from Ban – AI-Powered Nudity Detection & Blur for n8n Workflows
2. Generate Session String
💡 Pro Tip: Use our Telegram GramPro node to easily generate session strings!
Follow our Authorization Guide for detailed instructions on generating your session string.
3. Configure Credentials
In n8n → Settings → Credentials:
—
🚀 Available Operations
| Operation | Description | Use Case |
| ——————— | ——————————————- | ———————————- |
| 📥 Get Messages | Fetch messages with time/date/media filters | Scan recent posts for compliance |
| 💾 Download Media | Download photos, videos, or documents | Extract media for analysis |
| 🔍 Scanner | AI nudity detection with confidence scoring | Identify policy-violating content |
| 🎨 Blur | Apply blur to detected regions | Make content safe for Telegram |
| 🔄 Replace Image | Replace media in existing messages | Update posts with blurred versions |
| 📝 Replace Text | Update text or captions without new media | Fix copy while keeping media |
| ✉️ Send Message | Send formatted messages with optional media | Alerts, reports, and safe reposts |
—
📋 Content Moderation Workflow Examples
Basic Protection Workflow
1. Schedule Trigger (Daily/Hourly)
↓
2. Telegram Censor (Get Messages - Last 24 Hours)
├── Filter: Only Media = true
└── Media Type: Photo
↓
3. Telegram Censor (Download Media)
↓
4. Telegram Censor (Scanner)
├── Confidence: 0.4 (40%)
└── Output: isNsfw, detections
↓
5. IF isNsfw = true
├── Telegram Censor (Blur)
│ └── Blur Strength: 35
└── Telegram Censor (Replace Image)
└── Replace with blurred version
↓
6. Send Notification (Optional)
└── "X images were auto-censored for policy compliance"
Real-Time Protection Workflow
1. Telegram Trigger (New Message with Media)
↓
2. Telegram Censor (Download Media)
↓
3. Telegram Censor (Scanner)
↓
4. IF NSFW Detected
├── Blur Image
├── Replace in Message
└── Notify Admin: "Adult content auto-blurred"
↓
5. IF Safe
└── Continue normally
Batch Cleanup Workflow
1. Manual Trigger (Channel Audit)
↓
2. Telegram Censor (Get Messages - Date Range)
├── From: 2026-01-01
└── To: 2026-12-31
↓
3. Loop Through Messages
├── Download Media
├── Scan for Nudity
├── IF Violation Found
│ ├── Blur Image
│ ├── Replace Original
│ └── Log Violation
└── Continue Loop
↓
4. Generate Report
└── "Audit complete: X images processed, Y blurred"
—
🔍 AI Detection Classes
Unsafe Classes (Auto-Flagged):
| Class | Description | Risk Level |
| ————————– | ———————— | ———– |
| FEMALEGENITALIAEXPOSED | Exposed female genitalia | 🔴 Critical |
| MALEGENITALIAEXPOSED | Exposed male genitalia | 🔴 Critical |
| FEMALEBREASTEXPOSED | Exposed female breasts | 🔴 Critical |
| MALEBREASTEXPOSED | Exposed male breasts | 🟠 High |
| BUTTOCKS_EXPOSED | Exposed buttocks | 🔴 Critical |
| ANUS_EXPOSED | Exposed anus | 🔴 Critical |
Additional Detection Classes:
—
⚡ Performance & Memory Optimization
Telegram Censor is optimized for low-memory environments:
| Optimization | Benefit |
| ————————— | ————————- |
| Disabled Sharp Cache | Prevents memory bloat |
| Zero-Copy Normalization | Saves 1.2MB per image |
| CHW Buffer Pooling | Reuses memory buffers |
| Lazy Model Loading | Loads AI only when needed |
| Aggressive Cleanup | Releases memory after use |
Memory Usage:
—
📊 Configuration Options
Scanner Settings:
{
"minConfidence": 0.4 // 0.0 - 1.0 (lower = more sensitive)
}
Blur Settings:
{
"blurStrength": 35 // 1 - 100 (higher = more blur)
}
Replace Image Settings:
{
"editMediaUrl": "", // If set, replace media from URL
"editZeroMedia": false, // true = remove media from message
"editText": "Updated text or caption"
}
Replace behavior priority:
1. If editMediaUrl is provided -> replace media from URL
2. Else if editZeroMedia = true -> remove media (retries on Telegram API rejection)
3. Else -> replace using input binary (prefers media, otherwise first available binary field)
4. If none of the above are available -> update text/caption only
—
🛡️ Security & Privacy
100% Local Processing:
Data Protection:
—
🚨 Troubleshooting
For common issues and solutions, see our Troubleshooting Guide.
Quick Fixes:
| Issue | Solution |
| ——————- | ———————————- |
| “Model not found” | Run npm run build to compile the node and copy the ONNX model |
| “Out of memory” | Enable debug logs to monitor usage |
| “Connection failed” | Check session string validity |
| “Blur too weak” | Increase blurStrength parameter |
| “False positives” | Increase minConfidence threshold |
—
📝 Logging
Enable debug logging to monitor memory usage:
Set environment variable
export N8NLOGLEVEL=debugOr in n8n settings
Settings → Log Level → Debug
Memory logs will show:
[Memory] Pre-Load: 45.23 MB
[Memory] Post-Load: 145.67 MB
[Memory] Unloaded: 52.11 MB
—
📖 Documentation
—
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup:
Clone repository
git clone https://github.com/sadiakant/n8n-nodes-telegram-censor.gitInstall dependencies
npm installBuild project
npm run buildStart local n8n node development
npm run devLint and package verification
npm run lint
npm test
Useful project scripts:
npm run build – runs n8n-node build and copies the NudeNet model into dist/modelsnpm run build:watch – TypeScript watch mode for local iterationnpm run lint:fix – fixes lint issues with the n8n node CLInpm run release – release flow powered by n8n-node release—
📄 License
MIT License – see license file for details.
—
🔗 Resources
—
💬 Support
—
⚠️ Disclaimer
Telegram Censor is designed to help content creators comply with Telegram’s policies. It does not guarantee 100% detection accuracy. Always review critical content manually.
—
Publishing Status





NPM Status











GitHub Status











Dependency Status








—
🏷️ Keywords
telegram censor, telegram nudity filter, telegram nsfw filter, telegram adult content filter, telegram channel protection, telegram group moderation, telegram content moderation, telegram policy compliance, telegram ban prevention, telegram porn filter, n8n telegram, n8n content moderation, local ai moderation, nudenet onnx, telegram image blur, telegram auto moderator, telegram channel ban, telegram group ban, telegram policy violation, telegram adult content ban, telegram censorship, telegram moderation bot, telegram privacy, telegram local processing, telegram ai detection, telegram content safety