{
  "name": "Upload & categorize files with Supabase Storage and secure URL generation",
  "nodes": [
    {
      "id": "ece7684b-64fa-4c80-9697-c6e7a4999eeb",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -1420,
        620
      ]
    },
    {
      "id": "6d600da3-a9e7-4015-bc73-a0fb5e400724",
      "name": "Prepare Upload Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -940,
        440
      ]
    },
    {
      "id": "5b5b91e9-b082-4d57-a191-c0fd71c84eae",
      "name": "Success Response",
      "type": "n8n-nodes-base.set",
      "position": [
        200,
        440
      ]
    },
    {
      "id": "aa6355d3-5c2e-4b55-9f04-fcd1f5246428",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -720,
        440
      ]
    },
    {
      "id": "2c1f3cf0-3726-4dd9-9121-e060e684d633",
      "name": "temp form to test workflow",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1420,
        300
      ]
    },
    {
      "id": "64932e5f-b7fc-46ad-9946-41703fec5823",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1800,
        -100
      ],
      "parameters": {
        "width": 1100,
        "height": 260,
        "content": "## 📦 Upload files to Supabase Storage\n\n- Link to [Supabase docs](https://supabase.com/docs/guides/storage)\n\nThis workflow shows how you could upload files to a Supabase Storage Instance. It's primaril"
      }
    },
    {
      "id": "96202c5f-d481-4b20-a526-7ba0c79396a1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1800,
        180
      ],
      "parameters": {
        "width": 340,
        "height": 340,
        "content": "## 🧪  Quick Test Form during building\n\n\nThis form allowed me to quickly check this flow without having to execute another workflow.\n\nOf course you could also pin data, but given the fact i wanted to c"
      }
    },
    {
      "id": "c95e5ad4-0bad-4670-814b-198f51ecb1bb",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1800,
        540
      ],
      "parameters": {
        "width": 340,
        "height": 280,
        "content": "## ⚖️ Pro's and Con's of base64 encoding here\n\nI used the encoding step to be able to define input schema in this node below, it comes with a trade off though: file size of base 64 encoded files are 3"
      }
    },
    {
      "id": "36278709-336e-43a7-8f66-6f7b29cdca74",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        180
      ],
      "parameters": {
        "width": 460,
        "height": 240,
        "content": "## 🔧Highlevel dataprep explanation\n\n\n**Prepare Upload Data:** maps inputs to buckets based on mimetype - passes through all other inputs.\n\n**Convert to file:** converts base64 encoded files back to ac"
      }
    },
    {
      "id": "0a2490ad-78ce-4252-884d-900e9848d865",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        180
      ],
      "parameters": {
        "width": 640,
        "height": 240,
        "content": "## 🔑 About Supabase Storage\n\nSupabase Storage uses HTTP API with Bearer YOUR_TOKEN_HERE authentication, not traditional AWS S3 SDK protocols.\n\nIn this set up we use an anon key/service key. We dont wa"
      }
    },
    {
      "id": "309c7e12-bcfa-4756-85e8-2d54639296a6",
      "name": "Upload to Supabase Storage",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -460,
        440
      ]
    },
    {
      "id": "ad17d932-adc3-4a93-8e02-1f52fe8a8196",
      "name": "Generate Signed Url",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -220,
        440
      ]
    },
    {
      "id": "9be14ebe-84f1-4d91-8c54-392fabf89c05",
      "name": "Upload Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        -260,
        620
      ]
    },
    {
      "id": "8dbc6a1e-1a6b-4cc1-ac9f-51fe38c386b8",
      "name": "add domain",
      "type": "n8n-nodes-base.set",
      "position": [
        -20,
        440
      ]
    },
    {
      "id": "e21970f6-23d8-4e23-b42b-f5636dd52358",
      "name": "Sign Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        -20,
        620
      ]
    }
  ],
  "connections": {
    "add domain": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Upload to Supabase Storage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Response": {
      "main": [
        []
      ]
    },
    "Generate Signed Url": {
      "main": [
        [
          {
            "node": "add domain",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sign Error Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Upload Data": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Supabase Storage": {
      "main": [
        [
          {
            "node": "Generate Signed Url",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload Error Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "temp form to test workflow": {
      "main": [
        [
          {
            "node": "Prepare Upload Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Prepare Upload Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}