{
  "name": "PixelVault \u2014 Google Drive image to public URL",
  "nodes": [
    {
      "id": "8a7abe6f-c392-4d77-ad1b-8fa497879456",
      "name": "Run manually",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ],
      "parameters": {}
    },
    {
      "id": "9cfd3c7b-013e-4cbc-ba03-4e2c5d41532c",
      "name": "Download image from Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        240,
        300
      ],
      "parameters": {
        "resource": "file",
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "REPLACE_WITH_DRIVE_FILE_ID",
          "mode": "id"
        },
        "options": {
          "binaryPropertyName": "data"
        }
      }
    },
    {
      "id": "07ef03c1-5271-45ee-a7f7-3026a5e675d5",
      "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,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            },
            {
              "name": "folder",
              "value": "n8n"
            }
          ]
        },
        "options": {
          "timeout": 60000
        }
      }
    },
    {
      "id": "f0693d23-fba3-45ef-a551-3680c0c6199a",
      "name": "Public image URL",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        720,
        300
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7e02f8ef-a4ad-4cbc-98c7-8d7c792485f4",
              "name": "image_url",
              "value": "={{ $json.data.url }}",
              "type": "string"
            },
            {
              "id": "d7b0e780-4cc4-48ce-a2dd-4dae68583b94",
              "name": "image_id",
              "value": "={{ $json.data.id }}",
              "type": "string"
            },
            {
              "id": "1f976f09-0637-45cf-a0f1-3634013a2e5b",
              "name": "mime_type",
              "value": "={{ $json.data.mime_type }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "1e88a9bd-6dd2-4db4-82e8-03b12b7aa51b",
      "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": "Download image from Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download image from Drive": {
      "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": []
}
