{
  "name": "Publish a social media post with Swonkie",
  "nodes": [
    {
      "id": "6153cff6-ceeb-4c2d-b4d9-1e643448efd8",
      "name": "Sticky - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        64
      ],
      "parameters": {
        "width": 1824,
        "height": 108,
        "content": "## 🚀 Swonkie – Publish a Social Media Post\nThis workflow publishes a post to a Swonkie-connected social profile via the **Swonkie Public API**. It covers the full flow: upload media → create post → va"
      }
    },
    {
      "id": "bc3ef4fe-205c-4c33-932c-e38b36e421e2",
      "name": "Sticky - Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        192
      ],
      "parameters": {
        "width": 400,
        "height": 450,
        "content": "## ⚙️ Setup - Edit This Node First\n\nOpen the **Configure** node below and fill in:\n\n- **apiId**: Your App ID\n- **apiKey**: Your API Key\n- **profileId**: Target social profile ID\n- **caption**: Post te"
      }
    },
    {
      "id": "60b5ff29-bfde-40e1-b349-5998431c8d8d",
      "name": "Sticky - Media Upload",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        192
      ],
      "parameters": {
        "width": 416,
        "height": 452,
        "content": "## 📤 Media Upload\nSwonkie requires a 3-step upload before a file can be attached to a post:\n1. **Create Media Entry**: registers the file with Swonkie, returns an `uploadUrl` and a `mediaId`\n2. **Down"
      }
    },
    {
      "id": "b6d67b37-3818-4d1d-9c89-b238deb1aa0a",
      "name": "Sticky - Post Publishing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        192
      ],
      "parameters": {
        "width": 452,
        "height": 452,
        "content": "## 📝 Post Publishing\n1. **Create Post**: creates an IDEA post with the uploaded media, caption, and profile\n2. **Validate Post**: checks the post meets all network rules: caption length, media format,"
      }
    },
    {
      "id": "02a8db34-c1ae-4ed5-9a8e-02dcde07aa72",
      "name": "Sticky - Error Handling",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        192
      ],
      "parameters": {
        "width": 484,
        "height": 444,
        "content": "## ❌ Error Handling\nBoth failure paths use the **Stop and Error** node, which marks the execution as **failed** (shown in red in n8n's execution history) and triggers any error workflow configured und"
      }
    },
    {
      "id": "e018d93b-1594-467f-a14c-6c0c7163a82b",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -992,
        864
      ]
    },
    {
      "id": "1662902f-26d7-47c4-9054-2c6296e61147",
      "name": "Configure",
      "type": "n8n-nodes-base.set",
      "position": [
        -768,
        864
      ]
    },
    {
      "id": "515d8a5c-7a91-4236-a874-6916c559e3d9",
      "name": "Create Media Entry",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -480,
        816
      ]
    },
    {
      "id": "c66da8de-a070-4dfb-8e03-0103165801cb",
      "name": "Download & Attach Binary",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -272,
        816
      ]
    },
    {
      "id": "53325d9b-5022-4ebc-9280-5b2c8f13ac22",
      "name": "Upload File to Blob",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -48,
        816
      ]
    },
    {
      "id": "95f716d2-eccc-436b-961f-70e63edd7b7c",
      "name": "Confirm Upload",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        176,
        816
      ]
    },
    {
      "id": "0347a11f-5710-48fb-b375-208107c133a6",
      "name": "Wait for Processing",
      "type": "n8n-nodes-base.wait",
      "position": [
        400,
        816
      ]
    },
    {
      "id": "f0ee4557-fe53-4774-878c-cc988b2d3eed",
      "name": "Check Media Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        608,
        816
      ]
    },
    {
      "id": "4fa24821-084e-45dd-bdd4-77d845a5eb5e",
      "name": "Media Ready?",
      "type": "n8n-nodes-base.switch",
      "position": [
        832,
        816
      ]
    },
    {
      "id": "65a37632-92bb-4b16-96ef-9fc08f0dd96b",
      "name": "Create Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1312,
        816
      ]
    },
    {
      "id": "12e28f73-403b-4459-98f6-df6cf66ce169",
      "name": "Validate Post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1536,
        816
      ]
    },
    {
      "id": "618aaa2a-b0be-441b-9799-3ce858703b64",
      "name": "Post Valid?",
      "type": "n8n-nodes-base.if",
      "position": [
        1744,
        816
      ]
    },
    {
      "id": "41a6c82b-ae0d-4dd2-98c0-785f79fc4b19",
      "name": "Change Stage",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2288,
        864
      ]
    },
    {
      "id": "50d3d293-2f4b-4b9b-8c8d-84776ab3b07f",
      "name": "Post Published",
      "type": "n8n-nodes-base.set",
      "position": [
        2512,
        864
      ]
    },
    {
      "id": "7df1da80-b229-4647-b488-f8f323ae6752",
      "name": "Media Processing Failed",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        1088,
        944
      ]
    },
    {
      "id": "9676ef6b-deb7-4c11-a7a6-e917e7a81257",
      "name": "Validation Failed",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        1984,
        928
      ]
    },
    {
      "id": "f7481383-ca5f-4f5d-904b-97730e25806b",
      "name": "Sticky - Media Upload1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        672
      ],
      "parameters": {
        "width": 1776,
        "height": 484,
        "content": "## Media Upload\n"
      }
    },
    {
      "id": "80ea18ff-59e5-465e-8d6a-55ddfa7b81e2",
      "name": "Sticky - Post Publishing1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        672
      ],
      "parameters": {
        "width": 884,
        "height": 484,
        "content": "## Create Post"
      }
    },
    {
      "id": "5da6d3d3-0e05-41e4-a205-c7373d4ad796",
      "name": "Sticky - Post Publishing2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        672
      ],
      "parameters": {
        "width": 564,
        "height": 484,
        "content": "## Publish Post"
      }
    },
    {
      "id": "e0ab6c97-bb2f-421a-b6db-994a41b4ef24",
      "name": "Sticky - Post Publishing3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        672
      ],
      "parameters": {
        "width": 484,
        "height": 484,
        "content": "## Trigger & Configure"
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Configure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure": {
      "main": [
        [
          {
            "node": "Create Media Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Post": {
      "main": [
        [
          {
            "node": "Validate Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Valid?": {
      "main": [
        [
          {
            "node": "Change Stage",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Validation Failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Change Stage": {
      "main": [
        [
          {
            "node": "Post Published",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Media Ready?": {
      "main": [
        [
          {
            "node": "Create Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Media Processing Failed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Post": {
      "main": [
        [
          {
            "node": "Post Valid?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Confirm Upload": {
      "main": [
        [
          {
            "node": "Wait for Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Media Status": {
      "main": [
        [
          {
            "node": "Media Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Media Entry": {
      "main": [
        [
          {
            "node": "Download & Attach Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload File to Blob": {
      "main": [
        [
          {
            "node": "Confirm Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Processing": {
      "main": [
        [
          {
            "node": "Check Media Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download & Attach Binary": {
      "main": [
        [
          {
            "node": "Upload File to Blob",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}