Workflow: Executecommand Readbinaryfile Automate

Workflow Details

Download Workflow
{
    "nodes": [
        {
            "name": "On clicking 'execute'",
            "type": "n8n-nodes-base.manualTrigger",
            "position": [
                250,
                300
            ],
            "parameters": [],
            "typeVersion": 1
        },
        {
            "name": "Read Binary File",
            "type": "n8n-nodes-base.readBinaryFile",
            "position": [
                440,
                300
            ],
            "parameters": {
                "filePath": "\/home\/n8n\/filelist.txt"
            },
            "typeVersion": 1
        },
        {
            "name": "Move Binary Data",
            "type": "n8n-nodes-base.moveBinaryData",
            "position": [
                610,
                300
            ],
            "parameters": {
                "options": [],
                "setAllData": false
            },
            "typeVersion": 1
        },
        {
            "name": "Function",
            "type": "n8n-nodes-base.function",
            "position": [
                810,
                300
            ],
            "parameters": {
                "functionCode": "items[0].json.arrData = items[0].json.data.split(\"\\n\");\nitems[0].json.data = {};\nitems[0].json.dataSize = items[0].json.arrData.length-2;\nreturn items;"
            },
            "typeVersion": 1
        },
        {
            "name": "Execute Command",
            "type": "n8n-nodes-base.executeCommand",
            "position": [
                1040,
                300
            ],
            "parameters": {
                "command": "=echo \"The file name is {{$node[\"Function\"].json[\"arrData\"][$runIndex]}}\" >> \/home\/n8n\/n8n-output.txt"
            },
            "typeVersion": 1
        },
        {
            "name": "IF",
            "type": "n8n-nodes-base.if",
            "position": [
                1250,
                520
            ],
            "parameters": {
                "conditions": {
                    "number": [
                        {
                            "value1": "={{$node[\"Function\"].json[\"dataSize\"]}}",
                            "value2": "={{$runIndex}}",
                            "operation": "larger"
                        }
                    ],
                    "string": []
                }
            },
            "typeVersion": 1
        },
        {
            "name": "NoOp",
            "type": "n8n-nodes-base.noOp",
            "position": [
                1450,
                540
            ],
            "parameters": [],
            "typeVersion": 1
        }
    ],
    "connections": {
        "IF": {
            "main": [
                [
                    {
                        "node": "Execute Command",
                        "type": "main",
                        "index": 0
                    }
                ],
                [
                    {
                        "node": "NoOp",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Function": {
            "main": [
                [
                    {
                        "node": "Execute Command",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Execute Command": {
            "main": [
                [
                    {
                        "node": "IF",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Move Binary Data": {
            "main": [
                [
                    {
                        "node": "Function",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Read Binary File": {
            "main": [
                [
                    {
                        "node": "Move Binary Data",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "On clicking 'execute'": {
            "main": [
                [
                    {
                        "node": "Read Binary File",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    }
}
Back to Workflows

Related Workflows

Splitout Code Create Webhook
View
Elasticsearch Cron Create Webhook
View
Send an SMS to a number whenever you go out
View
WooCommerce AI Chatbot Workflow for Post-Sales Support
View
Mailchimp Automate Triggered
View
Code Schedule Automate Scheduled
View
Convert the JSON data received from the CocktailDB API in XML
View
Stickynote Postgrestool Create Triggered
View
Image-to-3D
View
Respondtowebhook Form Automation Webhook
View