{
  "name": "PDFops: merge two PDFs with your API key",
  "nodes": [
    {
      "parameters": {
        "content": "## Merge two PDFs with your PDFops API key\n\n1. Open **Merge PDFs**, create a **PDFops API** credential and paste the key from your email. Pick the same credential on **Check Quota**.\n2. Click **Execute workflow**.\n3. **Merge PDFs** outputs one `merged.pdf`; **Check Quota** shows what your key has left this month.\n\nSwap the two URLs in **Sample PDF URLs** for your own files.",
        "width": 420,
        "height": 300
      },
      "id": "note-overview",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-520, -120]
    },
    {
      "parameters": {},
      "id": "manual-trigger",
      "name": "Run Example",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "jsCode": "return [\n  { json: { url: 'https://pdfops.dev/invoice-template.pdf' } },\n  { json: { url: 'https://pdfops.dev/flat-sample.pdf' } },\n];"
      },
      "id": "sample-urls",
      "name": "Sample PDF URLs",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [220, 0]
    },
    {
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "data"
            }
          }
        }
      },
      "id": "download-pdf",
      "name": "Download PDF",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [440, 0]
    },
    {
      "parameters": {
        "operation": "merge",
        "binaryPropertyName": "data",
        "outputBinaryPropertyName": "data",
        "fileName": "merged.pdf"
      },
      "id": "pdfops-merge",
      "name": "Merge PDFs",
      "type": "n8n-nodes-pdfops.pdfops",
      "typeVersion": 1,
      "position": [660, 0],
      "credentials": {
        "pdfopsApi": {
          "id": "",
          "name": "PDFops account"
        }
      }
    },
    {
      "parameters": {
        "operation": "usage"
      },
      "id": "pdfops-usage",
      "name": "Check Quota",
      "type": "n8n-nodes-pdfops.pdfops",
      "typeVersion": 1,
      "position": [880, 0],
      "credentials": {
        "pdfopsApi": {
          "id": "",
          "name": "PDFops account"
        }
      }
    }
  ],
  "connections": {
    "Run Example": {
      "main": [[{ "node": "Sample PDF URLs", "type": "main", "index": 0 }]]
    },
    "Sample PDF URLs": {
      "main": [[{ "node": "Download PDF", "type": "main", "index": 0 }]]
    },
    "Download PDF": {
      "main": [[{ "node": "Merge PDFs", "type": "main", "index": 0 }]]
    },
    "Merge PDFs": {
      "main": [[{ "node": "Check Quota", "type": "main", "index": 0 }]]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
