{
  "name": "Pharlo — Publish video via REST",
  "nodes": [
    {
      "parameters": {},
      "id": "a1000000-0000-4000-8000-000000000001",
      "name": "When clicking Execute",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "c1", "name": "connectionId", "value": "YOUR_CONNECTION_UUID", "type": "string" },
            { "id": "c2", "name": "title", "value": "Launch recap", "type": "string" },
            { "id": "c3", "name": "mediaUrl", "value": "https://cdn.example.com/launch.mp4", "type": "string" }
          ]
        },
        "options": {}
      },
      "id": "a1000000-0000-4000-8000-000000000002",
      "name": "Set inputs",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [460, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://pharlo.io/api/v1/assignments",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Authorization", "value": "=Bearer {{$env.PHARLO_API_KEY}}" },
            { "name": "Content-Type", "value": "application/json" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ connectionId: $json.connectionId, type: 'video', payload: { title: $json.title, privacy: 'public' }, mediaUrl: $json.mediaUrl }) }}",
        "options": {}
      },
      "id": "a1000000-0000-4000-8000-000000000003",
      "name": "Pharlo: Create assignment",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [680, 300]
    }
  ],
  "connections": {
    "When clicking Execute": { "main": [[{ "node": "Set inputs", "type": "main", "index": 0 }]] },
    "Set inputs": { "main": [[{ "node": "Pharlo: Create assignment", "type": "main", "index": 0 }]] }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "pinData": {},
  "meta": {}
}
