Templates / Get execute command data and transfer to JSON

Get execute command data and transfer to JSON

Needs changes

by jan · 2,951 views · created 2019-11-02 · Engineering

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Function Item (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 3 nodes and runs from “Execute Command” (no trigger node, so run it manually or call it from another workflow). It uses only n8n's built-in nodes.

How it runs

Trigger: From “Execute Command” (no trigger node, so run it manually or call it from another workflow).

  1. Execute Command: runs a shell command on the n8n host
  2. To Flow Data (Function Item): runs custom JavaScript per item (legacy Function Item node)
  3. If: checks a condition and branches into true / false

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • Function Item (legacy) in To Flow Data: replace with Code node, mode 'Run Once for Each Item'.
Removed in 3.0Replace with
Function Item (legacy)
To Flow Data
Code node, mode 'Run Once for Each Item'

Nodes used (3)

From the author

Shows how it is possible to use the data of a command line tool which returns JSON. Example shows how: 1. to bring data in flow 2. to use data directly in a node Note that the 'execute command' node is not available on n8n Cloud.

Excerpt from jan'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.