Need help processing a binary file in the Webhook node

Hey!
I have a webhook node that receives such a CSV file (see screenshot). How can I convert it to “readable” JSON with a set of objects = rows of this table (original CSV file)?
I tried the Move Binary Data node but couldn’t get it to work.

I also tried to sort out the different “types” of submitting this file based on these community topics (Handling of binary data in webhook and Raw/binaries source to webhook to write binary file), but failed. I ask for help).

The example below should do it:

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        -700,
        -560
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "body.file",
              "value": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAM1BMVEX/////bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVr/bVp1UGgsAAAAEHRSTlMAEEBwgK+/n1AwYN+PIO/PaMs2HQAAC3JJREFUeJzt3deC6joMQNFJIQmd///ae4A7BSTZllMIZq/nKSGKmyKbry8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIC3UNVN2266rm/bYfvqi/l01a7fXx50LUF5md3motkfjq++sk9UtXs1HDeb+tWX93F2Jzsct66LVrKk7Tkcjqv21Rf5Qdp4OP45M7wvo+qS4nG5nHavvtSPkNJd0W0tZxsZzR/1r77c4vniQUTmVjnjcbkcXn3JRasc48c3RvYZ9f54XE7MfmczZMTj33qkevV1l8o/gNwx+Z1JqMM6h4JFXmsWWysWzT23exx6Iyrdi6+8UHrGpH94/Hd6Tp5s/AzUBiKz7I3WSmgiM9BGEG24VnNdjCKTq5TbrK/5tNUj6/XJ7VLjoUbktOi1fgRZ0GDnDZUMJMP61MQt3gcW4A19lkNVt32XkSV8EkwaitnvealP92627fhQ3OyD/0aOOAt9vvdS7SaKxiWaVRdNhEFEqNrM5KAqksI9OAP4gWKlbT6xt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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIrwH1mHaJIXQj0xAAAAAElFTkSuQmCC"
            }
          ]
        },
        "options": {}
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        -440,
        -560
      ],
      "notesInFlow": true,
      "notes": "Mockup data"
    },
    {
      "parameters": {
        "mode": "jsonToBinary",
        "convertAllData": false,
        "sourceKey": "file",
        "options": {
          "encoding": "base64",
          "mimeType": "image/png",
          "useRawData": true
        }
      },
      "name": "Move Binary Data",
      "type": "n8n-nodes-base.moveBinaryData",
      "typeVersion": 1,
      "position": [
        120,
        -560
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "file",
              "value": "={{ $node[\"Set\"].json[\"body\"][\"file\"].split(',')[1] }}"
            }
          ]
        },
        "options": {}
      },
      "name": "Set1",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        -170,
        -560
      ],
      "notesInFlow": true,
      "notes": "Remove unnecessary data"
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "Set1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set1": {
      "main": [
        [
          {
            "node": "Move Binary Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
2 Likes

@RicardoE105 , thanks a lot!
With minor modifications, I got the result I wanted.