AutomationFlowsGeneral › Showitems

Showitems

ShowItems. Uses executeCommand. Webhook trigger; 9 nodes.

Webhook trigger★★★★☆ complexity9 nodesExecute Command
General Trigger: Webhook Nodes: 9 Complexity: ★★★★☆ Added:

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 →

Download .json
{
  "name": "ShowItems",
  "nodes": [
    {
      "parameters": {
        "command": "cd /tmp/n8n_rewrite/new && ls"
      },
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        120,
        -140
      ],
      "id": "049d94ee-7652-4cd5-9ab9-6fc33dff627f",
      "name": "Execute Command"
    },
    {
      "parameters": {
        "path": "slotjudge-clone",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -240,
        -60
      ],
      "id": "15fcdb0c-04d9-4e30-9baa-c452158030a9",
      "name": "Webhook"
    },
    {
      "parameters": {
        "command": "cd /tmp/n8n_rewrite/raw && ls"
      },
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        100,
        80
      ],
      "id": "f72180d7-83f6-45b5-a38d-001682fabf1f",
      "name": "Execute Command1"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const fileRaws = $json.stdout.split(\"\\n\")\nconst files = fileRaws.map((x)=>{\n  const nameArr = x.replaceAll(\".md\",\"\").split(\"=\");\n  return {\n    name: x,\n    date: nameArr[1]\n  }\n})\n\nreturn {\n  new: files,\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        360,
        -140
      ],
      "id": "844c4ef7-a741-4a57-8f2a-8fe51ccc0805",
      "name": "Code"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const fileRaws = $json.stdout.split(\"\\n\")\nconst files = fileRaws.map((x)=>{\n  const nameArr = x.replaceAll(\".md\",\"\").split(\"=\");\n  return {\n    name: x,\n    date: nameArr[1]\n  }\n})\n\n\nreturn {\n  raw: files\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        360,
        80
      ],
      "id": "6ee9aca2-b4c3-4128-8abe-e2027b2f207f",
      "name": "Code1"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.1,
      "position": [
        580,
        -60
      ],
      "id": "f9d808d7-abb1-4a4a-a952-a9634b2a68dd",
      "name": "Merge"
    },
    {
      "parameters": {
        "jsCode": "let result = {}\nconst template = `\n<li>\n  <a href=\"get-md?name={{name}}\">\n    <strong>{{name}}</strong>\n  </a>\n</li>\n`\nfunction render (item) {\n  const html = template.replaceAll(\"{{name}}\", item.name);\n  \n  return html;\n};\n\nfor (const item of $input.all()) {\n  if (item.json.new) {\n    result = {\n      ...result,\n      new: item.json.new.map((x)=>render(x))\n    }\n  }\n  else {\n    result = {\n      ...result,\n      raw: item.json.raw.map((x)=>render(x))\n    }\n  }\n}\n\nreturn result;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        760,
        -60
      ],
      "id": "6e0eff94-8f57-46bd-acda-2d80c1b0d94c",
      "name": "Merge1"
    },
    {
      "parameters": {
        "html": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <title>Collections Page</title>\n    <link\n      rel=\"stylesheet\"\n      href=\"https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css\"\n    />\n    <style>\n      /* Add more space between list items */\n      .box ul li {\n        margin-bottom: 1.25rem; /* Adjust as needed */\n      }\n      /* Remove margin from the last item */\n      .box ul li:last-child {\n        margin-bottom: 0;\n      }\n      /* Highlight effect on hover */\n      .box ul li a {\n        display: block;\n        padding: 0.75rem 1rem;\n        border-radius: 8px;\n        transition: background 0.2s, box-shadow 0.2s;\n        color: inherit;\n        text-decoration: none;\n      }\n      .box ul li a:hover,\n      .box ul li a:focus {\n        background: #f5f5f5;\n        box-shadow: 0 2px 8px rgba(10, 10, 10, 0.05);\n        color: #363636;\n        text-decoration: none;\n      }\n    </style>\n  </head>\n  <body>\n    <section class=\"section\">\n      <div class=\"container\">\n        <h1 class=\"title\">Collections</h1>\n        <div class=\"columns\">\n          <!-- Raw Collection -->\n          <div class=\"column\">\n            <h2\n              class=\"subtitle has-text-weight-bold is-size-4 has-text-primary mb-4\"\n            >\n              Raw\n            </h2>\n            <div class=\"box\">\n              <ul>\n                {{ $json.raw.join(\"\") }}\n              </ul>\n            </div>\n          </div>\n          <!-- New Collection -->\n          <div class=\"column\">\n            <h2\n              class=\"subtitle has-text-weight-bold is-size-4 has-text-link mb-4\"\n            >\n              New\n            </h2>\n            <div class=\"box\">\n              <ul>\n                {{ $json.new.join(\"\") }}\n              </ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  </body>\n</html>"
      },
      "type": "n8n-nodes-base.html",
      "typeVersion": 1.2,
      "position": [
        980,
        -60
      ],
      "id": "31d69b67-1737-4457-974f-745f229cdaaa",
      "name": "HTML"
    },
    {
      "parameters": {
        "respondWith": "text",
        "responseBody": "={{ $json.html }}",
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1200,
        -60
      ],
      "id": "ec11379e-20eb-4baf-8b8a-dc07c3e88025",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Execute Command": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Command1": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Execute Command",
            "type": "main",
            "index": 0
          },
          {
            "node": "Execute Command1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "21f8b2bf-3bf3-47f8-ac61-f48427c1ef06",
  "id": "F10uXrCC4zV2yAIV",
  "tags": []
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

ShowItems. Uses executeCommand. Webhook trigger; 9 nodes.

Source: https://gitlab.com/starixvn/l1_n8n_workflow/-/blob/dev/saba-review/rewrite-slotjudge/ShowItems.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

TITANIUM_OS — Milestone → Content Pipeline. Uses executeCommand. Webhook trigger; 7 nodes.

Execute Command
General

TestMultiCredentials. Uses executeCommand. Webhook trigger; 13 nodes.

Execute Command
General

PDF Processing via Shell. Uses executeCommand. Webhook trigger; 3 nodes.

Execute Command
General

Clara Pipeline B - Onboarding Update. Uses executeCommand. Webhook trigger; 3 nodes.

Execute Command
General

Clara Automation Pipeline – Run All. Uses executeCommand. Webhook trigger; 2 nodes.

Execute Command