{
  "name": "FilePost — Remote file to permanent public URL",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "archive-remote-file",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "a8fd6377-603c-4e97-a344-8c1ced6cd816",
      "name": "Receive Temporary URL",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [-560, 0],
      "webhookId": "filepost-remote-template"
    },
    {
      "parameters": {
        "url": "={{ $json.body.file_url || $json.file_url }}",
        "options": {"response": {"response": {"responseFormat": "file", "outputPropertyName": "data"}}}
      },
      "id": "004ac8e0-9d37-428f-b694-a2c8c07f96bb",
      "name": "Download File",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [-300, 0]
    },
    {
      "parameters": {
        "operation": "upload",
        "binaryPropertyName": "data",
        "expiresIn": "",
        "filenameMode": ""
      },
      "id": "dd885af4-f0ba-42b5-ad48-19879151acb2",
      "name": "Create Permanent URL",
      "type": "n8n-nodes-filepost.filePost",
      "typeVersion": 1,
      "position": [-40, 0]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { url: $json.url, file_id: $json.file_id } }}",
        "options": {}
      },
      "id": "e538a7ee-82af-4084-96ef-f1dbe2604b0f",
      "name": "Return Permanent URL",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.4,
      "position": [220, 0]
    }
  ],
  "connections": {
    "Receive Temporary URL": {"main": [[{"node": "Download File", "type": "main", "index": 0}]]},
    "Download File": {"main": [[{"node": "Create Permanent URL", "type": "main", "index": 0}]]},
    "Create Permanent URL": {"main": [[{"node": "Return Permanent URL", "type": "main", "index": 0}]]}
  },
  "active": false,
  "settings": {"executionOrder": "v1"},
  "versionId": "99dfa253-172a-4488-8de0-ed498681bc3f",
  "meta": {"templateCredsSetupCompleted": false},
  "tags": []
}
