Templates / Execute multiple command lines based on text file inputs

Execute multiple command lines based on text file inputs

Needs changes

by jason ✓ · 4,108 views · created 2021-01-31 · DevOps

Needs changes. This template uses 3 thing(s) that n8n 3.0 removes: Read Binary File, Convert to/from binary data, Function (legacy). 3 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 7 nodes and runs manually, when you click “Execute workflow”. It uses only n8n's built-in nodes.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Read Binary File: uses Read Binary File
  2. Move Binary Data (Convert to/from binary data): uses Convert to/from binary data
  3. Function: runs custom JavaScript (legacy Function node)
  4. Execute Command: runs a shell command on the n8n host
  5. If: checks a condition and branches into true / false

Before you upgrade to n8n 3.0

3 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:

  • Read Binary File: replace with Read/Write Files from Disk.
  • Convert to/from binary data in Move Binary Data: replace with Convert to File or Extract from File.
  • Function (legacy) in Function: replace with Code node, mode 'Run Once for All Items'.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
Read Binary File
Read Binary File
Read/Write Files from Disk
Convert to/from binary data
Move Binary Data
Convert to File or Extract from File
Function (legacy)
Function
Code node, mode 'Run Once for All Items'

Nodes used (7)

From the author

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…

Excerpt from jason's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.