The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Tree",
"nodes": [
{
"parameters": {
"command": "=# 1. Ensure session exists\ntmux has-session -t n8n-{{ $json.session_id }} 2>/dev/null || tmux new-session -d -s n8n-{{ $json.session_id }}\n\n# 2. Generate unique start and end markers\nSTART_MARKER=\"CMD_START_$$_$(date +%s)\"\nEND_MARKER=\"CMD_END_$$_$(date +%s)\"\n\n# 3. Send the command wrapped with markers\ntmux send-keys -t n8n-{{ $json.session_id }}:0 \"echo $START_MARKER; tree {{ $json.directory }} --filelimit 20; echo $END_MARKER\" C-m\n\n# 4. Wait for the end marker to appear\nwhile true; do\n sleep 0.5\n tmux capture-pane -pt n8n-{{ $json.session_id }}:0 > /tmp/tmux_output_$$\n if grep -q \"$END_MARKER\" /tmp/tmux_output_$$; then\n break\n fi\ndone\n\n# 5. Extract only the output between the markers\nsed -n \"/$START_MARKER/,/$END_MARKER/{\n /$START_MARKER/d\n /$END_MARKER/d\n p\n}\" /tmp/tmux_output_$$\n\n# 6. Clean up\nrm /tmp/tmux_output_$$",
"cwd": "/home/chrlskrt"
},
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"position": [
208,
0
],
"id": "670b3923-2b09-4dbd-b4e8-867049c57815",
"name": "Execute a command",
"credentials": {
"sshPassword": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"workflowInputs": {
"values": [
{
"name": "directory"
},
{
"name": "session_id"
}
]
}
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "bbd7d970-5d95-4e8b-908b-5212bbab6b4c",
"name": "When Executed by Another Workflow"
}
],
"connections": {
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Execute a command",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"availableInMCP": false
},
"versionId": "aa5dc847-a832-40b8-8136-3db211e86f93",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "W4DYKrUbzCcnBzwN",
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
sshPassword
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Tree. Uses ssh, executeWorkflowTrigger. Event-driven trigger; 2 nodes.
Source: https://github.com/chrlskrt/TipikAI/blob/e974664681408348fdd9769ddcccd990bba618c0/workflows/helpers/Tree.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
HomeLab CLI. Uses executeWorkflowTrigger, ssh. Event-driven trigger; 2 nodes.
Absen Otomatis. Uses ssh, executeWorkflowTrigger, scheduleTrigger, httpRequest. Event-driven trigger; 12 nodes.
Kb Tool Confluence Knowledge Base. Uses executeWorkflowTrigger, httpRequest, stickyNote. Event-driven trigger; 7 nodes.
send_image. Uses executeWorkflowTrigger, dataTable, n8n-nodes-evolution-api-english, httpRequest. Event-driven trigger; 5 nodes.
Invoice. Uses executeWorkflowTrigger, httpRequest. Event-driven trigger; 4 nodes.