{
  "name": "PixelVault \u2014 Generated image URL to public URL",
  "nodes": [
    {
      "id": "7adc4b63-8c68-48f7-b943-d699e5bb23f0",
      "name": "Run manually",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ],
      "parameters": {}
    },
    {
      "id": "5dcc729a-1268-432c-9330-410b37d49e00",
      "name": "Set source image URL",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        240,
        300
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "47e97131-9f9a-4e5f-8613-29cc6ffdd504",
              "name": "source_url",
              "value": "https://example.com/replace-with-image.jpg",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "ae2d81fb-a6b4-4524-9f86-e7545833cb07",
      "name": "Upload to PixelVault",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        480,
        300
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.pixelvault.dev/v1/images",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ { url: $json.source_url, folder: \"n8n\" } }}",
        "options": {
          "timeout": 60000
        }
      }
    },
    {
      "id": "1b1d0b88-f329-448c-a2b6-2461636cc1b5",
      "name": "Public image URL",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        720,
        300
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "2bdfdef2-5bef-4123-a68a-5ab70a1adf3a",
              "name": "image_url",
              "value": "={{ $json.data.url }}",
              "type": "string"
            },
            {
              "id": "c0d0e8cb-dc0f-4999-bb88-c4e6f31f37d6",
              "name": "image_id",
              "value": "={{ $json.data.id }}",
              "type": "string"
            },
            {
              "id": "8344bfd1-f50f-43f7-bbb0-a02c2104838d",
              "name": "mime_type",
              "value": "={{ $json.data.mime_type }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "29ef0fcc-548f-476b-9e0b-fdb996beb738",
      "name": "Setup instructions",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -100
      ],
      "parameters": {
        "content": "## PixelVault image hosting\n1. Configure the source node.\n2. In Upload to PixelVault select a Header Auth credential: Name = Authorization; Value = Bearer YOUR_PIXELVAULT_API_KEY.\n3. Execute manually. The final node returns image_url, image_id and mime_type.\n4. Connect your image publishing node and map image_url.\n\nUploads become publicly accessible. Use an image intended for publication. For Instagram start with a compliant JPEG. This workflow hosts images; it does not publish to Instagram.\n\nSetup guide: https://pixelvault.dev/integrations/n8n/",
        "height": 320,
        "width": 850
      }
    }
  ],
  "connections": {
    "Run manually": {
      "main": [
        [
          {
            "node": "Set source image URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set source image URL": {
      "main": [
        [
          {
            "node": "Upload to PixelVault",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to PixelVault": {
      "main": [
        [
          {
            "node": "Public image URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "tags": []
}
