{
  "name": "Lulubanana: approved Mirror draft → your posting tool (draft)",
  "nodes": [
    {
      "name": "How it works",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        -360
      ],
      "parameters": {
        "content": "## Lulubanana: approved Mirror draft → your posting tool (as a draft)\n1. Create a **Header Auth** credential: Name `Authorization`, Value `Bearer lb_...` (your key from Lulubanana Settings → API) and pick it in every Lulubanana node.\n2. Activate this workflow, copy the **Production URL** of the \"Lulubanana event\" node into \"Your Production URL\" and run \"Subscribe (run once)\" one time.\n3. Every `mirror.draft_reviewed` event now arrives here, signed (X-Lulubanana-Signature-V2) and retried. Remove it with DELETE /hooks/{id}.\n4. \"Create the draft in Buffer\" uses Buffer's API with saveToDraft: true; add a Header Auth credential with your Buffer key and your channel id. Swap it for your own tool's draft call if you use another one. It never publishes.",
        "width": 460,
        "height": 340
      },
      "id": "9db9a977-bb89-4d5c-aa92-230084e89626"
    },
    {
      "name": "Lulubanana event",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "lulubanana-mirror-reviewed",
        "responseMode": "onReceived",
        "options": {}
      },
      "id": "156da4a5-226e-48bc-a547-0d822d7434e5"
    },
    {
      "name": "Only approved drafts",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        220,
        0
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "2687f86e-d678-4b8a-afca-36e6c468e12a",
              "leftValue": "={{ $json.body.data.data.decision }}",
              "rightValue": "approve",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "82ea8c24-fadc-4583-abc3-21f416e45163"
    },
    {
      "name": "Get the draft",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        -20
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL",
          "name": "Lulubanana API key (Header Auth: Authorization = Bearer lb_...)"
        }
      },
      "parameters": {
        "method": "GET",
        "url": "=https://lulubanana.com/api/v3/mirror/drafts/{{ $json.body.data.data.draft_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "id": "166ef0d0-32e0-4312-a531-5d5c1fee478a"
    },
    {
      "name": "Create the draft in Buffer",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        680,
        -20
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL",
          "name": "Buffer API key (Header Auth: Authorization = Bearer ...)"
        }
      },
      "parameters": {
        "method": "POST",
        "url": "https://api.buffer.com",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ query: \"mutation($input: CreatePostInput!) { createPost(input: $input) { __typename } }\", variables: { input: { channelId: \"PASTE your Buffer channel id\", text: [$json.data.package?.hook?.line, $json.data.package?.caption].filter(Boolean).join(\"\\n\\n\"), schedulingType: \"automatic\", mode: \"addToQueue\", saveToDraft: true } } }) }}",
        "options": {}
      },
      "id": "880221d9-b2c6-402e-a8fe-831899efe052"
    },
    {
      "name": "Subscribe (run once)",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        420
      ],
      "parameters": {},
      "id": "1eeb5ca0-54fa-496f-a35f-cfd2e6ead2d4"
    },
    {
      "name": "Your Production URL",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        420
      ],
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "d2253c9e-136e-4ec6-acf0-b23e0d476aff",
              "name": "target_url",
              "type": "string",
              "value": "PASTE the Production URL of the \"Lulubanana event\" node here"
            }
          ]
        },
        "options": {}
      },
      "id": "b8e0d5fe-7e70-490e-a1f4-8da747c9e547"
    },
    {
      "name": "Subscribe to mirror.draft_reviewed",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        440,
        420
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL",
          "name": "Lulubanana API key (Header Auth: Authorization = Bearer lb_...)"
        }
      },
      "parameters": {
        "method": "POST",
        "url": "https://lulubanana.com/api/v3/hooks",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ target_url: $json.target_url, event: 'mirror.draft_reviewed', source: 'n8n' }) }}",
        "options": {}
      },
      "id": "69bf71af-9314-4168-a189-022042e25fd7"
    }
  ],
  "connections": {
    "Lulubanana event": {
      "main": [
        [
          {
            "node": "Only approved drafts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only approved drafts": {
      "main": [
        [
          {
            "node": "Get the draft",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Get the draft": {
      "main": [
        [
          {
            "node": "Create the draft in Buffer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Subscribe (run once)": {
      "main": [
        [
          {
            "node": "Your Production URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Your Production URL": {
      "main": [
        [
          {
            "node": "Subscribe to mirror.draft_reviewed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false,
    "description": "When you approve a Creator Mirror draft, its package goes to your posting tool as a DRAFT (Buffer shown; nothing is ever published for you).",
    "source": "https://lulubanana.com/developers/automation-zapier-make-n8n/"
  },
  "tags": [
    {
      "name": "lulubanana"
    },
    {
      "name": "mirror"
    },
    {
      "name": "drafts"
    }
  ]
}
