{
  "name": "ApexApi — Prompt → Image → Post",
  "nodes": [
    {
      "parameters": {},
      "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
      "name": "When clicking Test",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [260, 300]
    },
    {
      "parameters": {
        "resource": "image",
        "operation": "generate",
        "model": "openai/dall-e-3",
        "prompt": "A cozy isometric coffee shop, warm lighting, soft shadows",
        "options": { "size": "1024x1024", "n": 1 }
      },
      "id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
      "name": "ApexApi — Generate Image",
      "type": "n8n-nodes-apexapi.apexApi",
      "typeVersion": 1,
      "position": [520, 300],
      "credentials": { "apexApiApi": { "id": "REPLACE_ME", "name": "ApexApi account" } }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "specifyHeaders": "keypair",
        "headerParameters": {
          "parameters": [
            { "name": "blotato-api-key", "value": "YOUR_BLOTATO_API_KEY" }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"YOUR_BLOTATO_ACCOUNT_ID\",\n    \"target\": { \"targetType\": \"instagram\" },\n    \"content\": { \"text\": \"Made with ApexApi\", \"platform\": \"instagram\", \"mediaUrls\": [ {{ JSON.stringify($json.urls[0]) }} ] }\n  }\n}",
        "options": {}
      },
      "id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
      "name": "Publish to Blotato",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [780, 300],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    },
    {
      "parameters": {
        "content": "## 📲 Social posting with Blotato\n\nThis template publishes the generated image through **Blotato** — one API that posts to Instagram, X/Twitter, LinkedIn, TikTok, Facebook, Threads, Pinterest & more.\n\n### Setup\n1. Create a Blotato account + API key → **https://tolt.link/automatelikecrazy**\n2. Settings → API keys → copy your key into the **blotato-api-key** header on the *Publish to Blotato* node.\n3. Set `accountId` and `targetType` (e.g. `instagram`, `twitter`) in the request body. The generated image URL is passed automatically in `mediaUrls`.\n\nDocs: help.blotato.com/api · Get Blotato → **https://tolt.link/automatelikecrazy**",
        "height": 320,
        "width": 420,
        "color": 4
      },
      "id": "sticky-blotato",
      "name": "Social posting with Blotato",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [720, 0]
    }
  ],
  "connections": {
    "When clicking Test": { "main": [[{ "node": "ApexApi — Generate Image", "type": "main", "index": 0 }]] },
    "ApexApi — Generate Image": { "main": [[{ "node": "Publish to Blotato", "type": "main", "index": 0 }]] }
  },
  "settings": {},
  "active": false
}
