Execute multiple Command Lines based on Text File Inputs — n8n Workflow
Overview
This workflow takes a text file as input. It pulls the information from the text file and used it as a parameter to execute a command for each text line.
This workflow references a file /home/n8n/filelist.txt in the Read Binary File node which will need to be changed to work properly. You can also edit the Execute Command node to modify what happens for each of these lines of text.
Note: This workflow requires the Execute Command node which is only available on the on-premise version of n8n.
Nodes used
Workflow Preview
How it Works
- 1
Trigger
The workflow starts with a trigger trigger.
- 2
Process
Data flows through 7 nodes, connecting executecommand, function, if.
- 3
Output
The workflow completes its automation and delivers the result to the configured destination.
Node Details (7)
On clicking 'execute'
manualTrigger
Read Binary File
readBinaryFile
Move Binary Data
moveBinaryData
Function
function
Execute Command
executeCommand
IF
if
NoOp
noOp
How to Import This Workflow
- 1Click Download JSON button on the right to save the workflow file.
- 2Open your n8n instance. Go to Workflows → New → Import from file.
- 3Select the downloaded
execute-multiple-command-lines-based-on-text-file-inputsfile and click Import. - 4Set up credentials for each service node (API keys, OAuth, etc.).
- 5Click Test Workflow to verify everything works, then activate it.
Or paste directly in n8n → Import from JSON:
Integrations
Created by
jason
@tephlon
Tags
New to n8n?
n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.
Get n8n Free →