{
  "id": "wordToPdfPage001",
  "name": "Word to PDF with PDFConversionAPI",
  "nodes": [
    {
      "id": "a1",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "a2",
      "name": "Read Word files",
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1.1,
      "position": [
        220,
        0
      ],
      "parameters": {
        "operation": "read",
        "fileSelector": "/home/node/.n8n-files/in/*.docx",
        "options": {}
      }
    },
    {
      "id": "a3",
      "name": "Convert to PDF",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.5,
      "position": [
        660,
        100
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.pdfconversionapi.com/v2/convert/docx/to/pdf",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "File",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {
          "timeout": 240000
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "pdfcapiBearer01",
          "name": "PDFConversionAPI key"
        }
      }
    },
    {
      "id": "a4",
      "name": "Base64 to PDF file",
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        880,
        100
      ],
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "Files[0].FileData",
        "binaryPropertyName": "data",
        "options": {
          "fileName": "={{ $json.Files[0].FileName }}",
          "mimeType": "application/pdf"
        }
      }
    },
    {
      "id": "a5",
      "name": "Write PDF",
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1.1,
      "position": [
        1100,
        100
      ],
      "parameters": {
        "operation": "write",
        "fileName": "=/home/node/.n8n-files/out/{{ $binary.data.fileName }}",
        "dataPropertyName": "data",
        "options": {}
      }
    },
    {
      "id": "a6",
      "name": "One file at a time",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        440,
        0
      ],
      "parameters": {
        "batchSize": 1,
        "options": {}
      }
    },
    {
      "id": "a7",
      "name": "How to use",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -60,
        -260
      ],
      "parameters": {
        "width": 620,
        "height": 220,
        "content": "## Word to PDF with PDFConversionAPI\n1. In **Convert to PDF**, create a **Bearer Auth** credential and paste your API key as the token. Get a key at https://pdfconversionapi.com (250 conversions a month free, no card).\n2. Replace **Read Word files** with your own source (Google Drive, Gmail, a webhook): any node that puts the .docx in the binary field `data`.\n3. **One file at a time** keeps to the Free plan's one conversion at a time. On a paid plan, raise its batch size to your plan's limit.\n\nGuide: https://pdfconversionapi.com/guides/docx-to-pdf-n8n"
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Read Word files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Word files": {
      "main": [
        [
          {
            "node": "One file at a time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to PDF": {
      "main": [
        [
          {
            "node": "Base64 to PDF file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Base64 to PDF file": {
      "main": [
        [
          {
            "node": "Write PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "One file at a time": {
      "main": [
        [],
        [
          {
            "node": "Convert to PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write PDF": {
      "main": [
        [
          {
            "node": "One file at a time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false,
  "pinData": {}
}