{ "kind": "open-flow-workflow", "version": 1, "name": "Merge Downloaded Files into One Item", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_accb550a8493b88b": { "name": "Run the example", "kind": "start", "inputDefs": [] }, "n_88208a11b0c5757a": { "inputs": { "urls": { "kind": "value", "value": [ "https://static.thomasmartens.eu/n8n/file01.jpg", "https://static.thomasmartens.eu/n8n/file02.jpg", "https://static.thomasmartens.eu/n8n/file03.jpg" ] } }, "name": "Download and combine files", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "string" } }, "nullable": false, "handle": "urls" } ], "outputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "binary_keys" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "files" } ], "name": "Download and combine files", "moduleId": "n_5ba4967b6e11b99c", "capabilities": [ { "kind": "http", "hosts": [ "static.thomasmartens.eu" ] } ] } }, "n_164a6e94dab7dbbf": { "name": "Combined files", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "binary_keys" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "files" } ], "outputMappings": { "binary_keys": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_88208a11b0c5757a", "output": "binary_keys" } ] }, "files": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_88208a11b0c5757a", "output": "files" } ] } } } }, "edges": [ { "source": "n_accb550a8493b88b", "target": "n_88208a11b0c5757a" }, { "source": "n_88208a11b0c5757a", "target": "n_164a6e94dab7dbbf" } ] } }, "modules": { "n_5ba4967b6e11b99c": { "name": "Download and combine files", "imports": [], "source": "import{Buffer}from'node:buffer';export default async function merge({urls},context){const files={},keys=[];for(let i=0;i