Task: Export executions to Logstash

n8n workflow:
{"nodes":[{"name":"On clicking 'execute'","type":"n8n-nodes-base.manualTrigger","position":[260,-390],"parameters":{},"typeVersion":1},{"name":"Get Executions","type":"n8n-nodes-base.httpRequest","position":[970,180],"parameters":{"url":"={{$node[\"Init\"].parameter[\"values\"][\"string\"][0][\"value\"]}}/rest/executions/?limit=100&firstId={{$node[\"Get static data\"].json[\"lastExecutionId\"]}}","options":{},"jsonParameters":true,"allowUnauthorizedCerts":true},"typeVersion":1},{"name":"Init","type":"n8n-nodes-base.set","position":[780,180],"parameters":{"values":{"string":[{"name":"n8nEndpoint","value":"http://localhost:5678"},{"name":"logstashEndpoint","value":"=http://localhost:5001"}]},"options":{}},"typeVersion":1},{"name":"Get Executions Details","type":"n8n-nodes-base.httpRequest","position":[1540,-140],"parameters":{"url":"={{$node[\"Init\"].parameter[\"values\"][\"string\"][0][\"value\"]}}/rest/executions/{{$json[\"id\"]}}?unflattedResponse=1","options":{}},"typeVersion":1},{"name":"Push to Logstash","type":"n8n-nodes-base.httpRequest","position":[1770,-140],"parameters":{"url":"={{$node[\"Init\"].parameter[\"values\"][\"string\"][1][\"value\"]}}/n8nExecution/{{$json[\"data\"][\"id\"]}}","options":{},"requestMethod":"PUT","jsonParameters":true,"responseFormat":"string","bodyParametersJson":"={{$json[\"data\"]}}"},"typeVersion":1},{"name":"Transform to table","type":"n8n-nodes-base.function","position":[1160,180],"parameters":{"functionCode":"const returnItems = [];\n\nfor (const item of $node[\"Get Executions\"].json[\"data\"][\"results\"]) {\n  if(item.workflowId != $workflow.id) {\n    returnItems.push({json: item});\n  }\n}\n\nreturn returnItems;\n"},"typeVersion":1},{"name":"Store static data","type":"n8n-nodes-base.function","position":[2200,-150],"parameters":{"functionCode":"// Get the global workflow static data\nconst staticData = getWorkflowStaticData('global');\n\n// Update its data\nstaticData.lastExecutionId= $node[\"Transform to table\"].json['id'];\n\nvar returnItems = [];\n\nreturnItems.push({\"json\":staticData});\n\nreturn returnItems;\n"},"typeVersion":1},{"name":"Get static data","type":"n8n-nodes-base.function","position":[590,180],"parameters":{"functionCode":"// Get the global workflow static data\nconst staticData = getWorkflowStaticData('global');\n\nvar returnItems = [];\n\nreturnItems.push({\"json\": staticData});\n\nreturn returnItems;\n"},"typeVersion":1},{"name":"Cron","type":"n8n-nodes-base.cron","position":[260,-140],"parameters":{"triggerTimes":{"item":[{"mode":"everyX","unit":"minutes","value":5}]}},"typeVersion":1},{"name":"IF already running","type":"n8n-nodes-base.if","position":[880,-270],"parameters":{"conditions":{"number":[{"value1":"= {{$json[\"runningWorkflows\"]}}","value2":1,"operation":"larger"}],"string":[],"boolean":[]}},"typeVersion":1},{"name":"NoOp","type":"n8n-nodes-base.noOp","position":[1070,-290],"parameters":{},"typeVersion":1},{"name":"SplitInBatches","type":"n8n-nodes-base.splitInBatches","position":[1750,180],"parameters":{"options":{},"batchSize":2},"typeVersion":1},{"name":"IF no more batches","type":"n8n-nodes-base.if","position":[1930,-140],"parameters":{"conditions":{"number":[],"boolean":[{"value1":"={{$node[\"SplitInBatches\"].context[\"noItemsLeft\"]}}","value2":true}]}},"typeVersion":1},{"name":"Get runningWorkflows","type":"n8n-nodes-base.function","position":[710,-270],"parameters":{"functionCode":"const returnItems = [];\nvar runningWorkflows = 0;\n\nfor (const item of $node[\"Get current Executions\"].json[\"data\"]) {\n  if(item.workflowId == $workflow.id) {\n    runningWorkflows++;\n  }\n}\n\nreturnItems.push({json: {\"runningWorkflows\": runningWorkflows}});\n\nreturn returnItems;\n"},"typeVersion":1},{"name":"Get current Executions","type":"n8n-nodes-base.httpRequest","position":[530,-270],"parameters":{"url":"={{$node[\"Init\"].parameter[\"values\"][\"string\"][0][\"value\"]}}/rest/executions-current","options":{},"jsonParameters":true,"allowUnauthorizedCerts":true},"typeVersion":1}],"connections":{"Cron":{"main":[[{"node":"Get current Executions","type":"main","index":0}]]},"Init":{"main":[[{"node":"Get Executions","type":"main","index":0}]]},"Get Executions":{"main":[[{"node":"Transform to table","type":"main","index":0}]]},"SplitInBatches":{"main":[[{"node":"Get Executions Details","type":"main","index":0}]]},"Get static data":{"main":[[{"node":"Init","type":"main","index":0}]]},"Push to Logstash":{"main":[[{"node":"IF no more batches","type":"main","index":0}]]},"IF already running":{"main":[[{"node":"NoOp","type":"main","index":0}],[{"node":"Get static data","type":"main","index":0}]]},"IF no more batches":{"main":[[{"node":"Store static data","type":"main","index":0}],[{"node":"SplitInBatches","type":"main","index":0}]]},"Transform to table":{"main":[[{"node":"SplitInBatches","type":"main","index":0}]]},"Get runningWorkflows":{"main":[[{"node":"IF already running","type":"main","index":0}]]},"On clicking 'execute'":{"main":[[{"node":"Get current Executions","type":"main","index":0}]]},"Get Executions Details":{"main":[[{"node":"Push to Logstash","type":"main","index":0}]]},"Get current Executions":{"main":[[{"node":"Get runningWorkflows","type":"main","index":0}]]}}}