{
  "name": "HTML to image with Cofferdock",
  "nodes": [
    {
      "parameters": {
        "content": "## HTML to image (Cofferdock)\n1. Open **HTML to image** and replace `YOUR_API_KEY` with your key (dashboard → + Create key).\n2. Change the texts in **Card data**.\n3. Click **Test workflow**: the last node returns the PNG as a file (`data`).\n\nGuide: https://cofferdock.com/blog/html-to-image-n8n",
        "height": 260,
        "width": 420
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-520, -300],
      "name": "Sticky Note",
      "id": "5b0c1a8e-2f5d-4a7e-9c11-3d2a7f6e0b01"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [-480, 40],
      "name": "When clicking Test workflow",
      "id": "5b0c1a8e-2f5d-4a7e-9c11-3d2a7f6e0b02"
    },
    {
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            { "id": "5b0c1a8e-2f5d-4a7e-9c11-3d2a7f6e0b10", "name": "title", "value": "Automate your images with n8n", "type": "string" },
            { "id": "5b0c1a8e-2f5d-4a7e-9c11-3d2a7f6e0b11", "name": "subtitle", "value": "One HTTP Request node, one PNG per item", "type": "string" }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [-240, 40],
      "name": "Card data",
      "id": "5b0c1a8e-2f5d-4a7e-9c11-3d2a7f6e0b03"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.cofferdock.com/capture",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            { "name": "width", "value": "1200" },
            { "name": "height", "value": "630" },
            { "name": "format", "value": "png" }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "x-api-key", "value": "YOUR_API_KEY" },
            { "name": "Content-Type", "value": "text/html" }
          ]
        },
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "text/html",
        "body": "=<html><body style=\"margin:0;width:1200px;height:630px;box-sizing:border-box;padding:80px;background:linear-gradient(135deg,#1f1a17,#3a2a1c);color:#fff;font-family:Arial,Helvetica,sans-serif;display:flex;flex-direction:column;justify-content:center\"><div style=\"font-size:26px;letter-spacing:4px;text-transform:uppercase;color:#f0b35a\">Made with n8n</div><div style=\"margin-top:24px;font-size:72px;font-weight:800;line-height:1.1\">{{ $json.title }}</div><div style=\"margin-top:28px;font-size:34px;color:#e6d9c8\">{{ $json.subtitle }}</div></body></html>",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [0, 40],
      "name": "HTML to image",
      "id": "5b0c1a8e-2f5d-4a7e-9c11-3d2a7f6e0b04"
    }
  ],
  "connections": {
    "When clicking Test workflow": { "main": [[{ "node": "Card data", "type": "main", "index": 0 }]] },
    "Card data": { "main": [[{ "node": "HTML to image", "type": "main", "index": 0 }]] }
  },
  "pinData": {},
  "settings": { "executionOrder": "v1" }
}
