{
  "name": "Convertfleet MCP File Conversion \u2013 Claude Code Ready",
  "nodes": [
    {
      "parameters": {
        "content": "## Convertfleet File Conversion API \u2014 MCP Ready\n\n**Setup**\n1. In \"Prepare Params\" set `apiKey` to your Convertfleet key\n2. Activate the workflow and copy the webhook URL\n3. Paste the URL into your MCP config:\n\n```json\n{\n  \"mcpServers\": {\n    \"convertfleet\": {\n      \"command\": \"node\",\n      \"args\": [\"mcp-http-bridge.js\"],\n      \"env\": { \"ENDPOINT\": \"<webhook-url>\" }\n    }\n  }\n}\n```\n\n**Accepted body:** `{ \"fileUrl\": \"https://\u2026\", \"toFormat\": \"pdf\", \"fromFormat\": \"docx\" }`\n**Returns:** `{ \"status\": \"success\", \"downloadUrl\": \"\u2026\", \"fileName\": \"\u2026\" }`",
        "height": 320,
        "width": 400,
        "color": 4
      },
      "id": "sticky-setup",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        200,
        180
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "mcp-convert",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "MCP Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        680,
        380
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "apiKey",
              "value": "YOUR_CONVERTFLEET_API_KEY",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "fileUrl",
              "value": "={{ $json.body.fileUrl }}",
              "type": "string"
            },
            {
              "id": "a3",
              "name": "toFormat",
              "value": "={{ $json.body.toFormat || 'pdf' }}",
              "type": "string"
            },
            {
              "id": "a4",
              "name": "fromFormat",
              "value": "={{ $json.body.fromFormat || 'auto' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "set-params",
      "name": "Prepare Params",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        900,
        380
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.convertfleet.com/v1/convert",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $json.apiKey }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"file_url\": \"{{ $json.fileUrl }}\",\n  \"from\": \"{{ $json.fromFormat }}\",\n  \"to\": \"{{ $json.toFormat }}\"\n}",
        "options": {
          "timeout": 90000,
          "response": {
            "response": {
              "fullResponse": false
            }
          }
        }
      },
      "id": "http-convert",
      "name": "Submit to Convertfleet",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1120,
        380
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.download_url }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "if-success",
      "name": "Conversion OK?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1340,
        380
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "s1",
              "name": "status",
              "value": "success",
              "type": "string"
            },
            {
              "id": "s2",
              "name": "downloadUrl",
              "value": "={{ $json.download_url }}",
              "type": "string"
            },
            {
              "id": "s3",
              "name": "fileName",
              "value": "={{ $json.file_name }}",
              "type": "string"
            },
            {
              "id": "s4",
              "name": "mimeType",
              "value": "={{ $json.mime_type }}",
              "type": "string"
            },
            {
              "id": "s5",
              "name": "sizeBytes",
              "value": "={{ $json.size_bytes }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "id": "set-success",
      "name": "Format Success",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1560,
        260
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "e1",
              "name": "status",
              "value": "error",
              "type": "string"
            },
            {
              "id": "e2",
              "name": "message",
              "value": "={{ $json.error || $json.message || 'Conversion failed \u2014 verify file URL and format pair' }}",
              "type": "string"
            },
            {
              "id": "e3",
              "name": "code",
              "value": "={{ $json.code || 422 }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "id": "set-error",
      "name": "Format Error",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1560,
        500
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {
          "responseCode": "={{ $json.status === 'success' ? 200 : 422 }}"
        }
      },
      "id": "respond-webhook",
      "name": "Return to MCP Caller",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1780,
        380
      ]
    }
  ],
  "connections": {
    "MCP Webhook Trigger": {
      "main": [
        [
          {
            "node": "Prepare Params",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Params": {
      "main": [
        [
          {
            "node": "Submit to Convertfleet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit to Convertfleet": {
      "main": [
        [
          {
            "node": "Conversion OK?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Conversion OK?": {
      "main": [
        [
          {
            "node": "Format Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Success": {
      "main": [
        [
          {
            "node": "Return to MCP Caller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Error": {
      "main": [
        [
          {
            "node": "Return to MCP Caller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}