Execute Server Commands via Telegram Messages
Workflow Description
Automation enabling direct SSH command execution on servers from Telegram with manual triggering, scheduled execution, and conditional logic for remote system administration tasks.
How it works
- 1.Receive commands from Telegram, manual trigger, or scheduled interval
- 2.Process commands through conditional logic and custom workflows
- 3.Execute SSH commands on target server with authentication
- 4.Send command output and execution status back via Telegram
- 5.Log results and system state for audit and monitoring
Use cases
- Manage production servers directly from Telegram without a web dashboard
- Schedule and automate system maintenance, backups, and updates remotely
- Monitor server health and execute corrective actions on failures
- Streamline DevOps workflows by centralizing commands in a chat interface
Requirements
- Active Telegram account with valid Bot API token and webhook URL
- SSH credentials including server address, username, and authentication method
- Sufficient SSH permissions to execute required commands on target systems
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (27)
Pull n8n Image
Ssh
docker compose pull
Ssh
check n8n installed version
Ssh
When clicking ‘Test workflow’
Manual Trigger
Schedule Trigger
Schedule Trigger
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
Sticky Note8
Sticky Note
Sticky Note9
Sticky Note
Sticky Note10
Sticky Note
Sticky Note11
Sticky Note
docker compose up
Ssh
Sticky Note12
Sticky Note
Set Default variable
Set
Github HTTP Request
HTTP Request
Merge Results
Merge
Edit Version String
Set
Comapre Two Input
If
Telegram Notif
Set
Telegram Approve
Set
Telegram Notif1
Set