Hi team,
Describe the bug
When using the Execute Command node in n8n (with the command wget -O "/tmp/video_N.mp4" "<URL>"
) on multiple items (for downloading multiple videos), only the first video is actually downloaded with content. The other files are created but remain empty (0 bytes), even though all the commands are correct and work perfectly when run manually in the shell.
Steps to Reproduce
- Prepare a workflow that sends an array of URLs to the Execute Command node, using a command like:
nginx
CopierModifier
wget -O "/tmp/video_{{ $json.index }}.mp4" "{{ $json.video_url }}"
- Run the workflow.
- Observe that only
/tmp/video_1.mp4
has content. The other files (/tmp/video_2.mp4
,/tmp/video_3.mp4
, etc.) are created but are empty (0 bytes). - Running the exact same
wget
command for the other files manually via SSH downloads them correctly.
What I have tried
- Confirmed the input items and command are correct in the node.
- Each
wget
command (for each video URL) works 100% when executed directly via SSH in the same environment/container. - No error or non-zero exit code is reported by the node for the empty files.
- Tried toggling “Execute Once” options and different settings in the node.
Expected behavior
Each input item should result in a correctly downloaded file, not an empty file.
Screenshots and logs
- [Include screenshots of the workflow, node configs, and file stats if helpful. Describe the output and file sizes.]
- Only the first file is valid. All others: size 0, but no errors.
Environment
- n8n version: 1.101.2
- Docker/VPS
- OS: Alpine Linux edge (version 3.23.0_alpha20250612)
Additional context
- The bug seems to only occur when running the command node in n8n.
- Manual execution of the same commands works as expected for all files.
- Workflow and test links/logs available upon request.
Thanks for your help and suggestions! Let me know if you need more details or workflow export.