{
  "name": "File Conversion MCP Server \u2014 Convertfleet",
  "nodes": [
    {
      "parameters": {
        "content": "## File Conversion MCP Server \u2014 Convertfleet\n\n**Setup:**\n1. Replace `YOUR_CONVERTFLEET_API_KEY` in the **Set API Config** node.\n2. Activate this workflow \u2014 copy the Webhook URL.\n3. In your MCP server config (`mcp.json`), set the `convertFile` tool URL to this webhook.\n4. **POST body:** `{ \"fileUrl\": \"https://\u2026\", \"targetFormat\": \"pdf\" }`\n\n**Supported formats:** PDF, DOCX, XLSX, PPTX, PNG, JPG, MP4, MP3 (ffmpeg backend \u2014 no local install needed).",
        "height": 240,
        "width": 420,
        "color": 4
      },
      "id": "a1b2c3d4-0001-0001-0001-000000000001",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        200,
        160
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "convert-file",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "a1b2c3d4-0002-0002-0002-000000000002",
      "name": "Webhook \u2014 Convert File",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        680,
        360
      ]
    },
    {
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "f1",
              "name": "apiKey",
              "value": "YOUR_CONVERTFLEET_API_KEY",
              "type": "string"
            },
            {
              "id": "f2",
              "name": "baseUrl",
              "value": "https://api.convertfleet.com/v1",
              "type": "string"
            },
            {
              "id": "f3",
              "name": "fileUrl",
              "value": "={{ $json.body.fileUrl }}",
              "type": "string"
            },
            {
              "id": "f4",
              "name": "targetFormat",
              "value": "={{ $json.body.targetFormat }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "a1b2c3d4-0003-0003-0003-000000000003",
      "name": "Set API Config",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        900,
        360
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $json.baseUrl }}/convert",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $json.apiKey }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"source_url\": \"{{ $json.fileUrl }}\",\n  \"target_format\": \"{{ $json.targetFormat }}\"\n}",
        "options": {}
      },
      "id": "a1b2c3d4-0004-0004-0004-000000000004",
      "name": "Submit Conversion Job",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1120,
        360
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "=https://api.convertfleet.com/v1/jobs/{{ $json.job_id }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_CONVERTFLEET_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "id": "a1b2c3d4-0005-0005-0005-000000000005",
      "name": "Poll Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1340,
        360
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.status }}",
              "rightValue": "done",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "a1b2c3d4-0006-0006-0006-000000000006",
      "name": "Job Complete?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1560,
        360
      ]
    },
    {
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "s1",
              "name": "success",
              "value": true,
              "type": "boolean"
            },
            {
              "id": "s2",
              "name": "download_url",
              "value": "={{ $json.output_url }}",
              "type": "string"
            },
            {
              "id": "s3",
              "name": "target_format",
              "value": "={{ $json.target_format }}",
              "type": "string"
            },
            {
              "id": "s4",
              "name": "expires_at",
              "value": "={{ $json.expires_at }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "a1b2c3d4-0007-0007-0007-000000000007",
      "name": "Return Download URL",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        1780,
        240
      ]
    },
    {
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "e1",
              "name": "success",
              "value": false,
              "type": "boolean"
            },
            {
              "id": "e2",
              "name": "error",
              "value": "={{ $json.error || ('Job still processing \u2014 poll again with job_id: ' + $json.job_id) }}",
              "type": "string"
            },
            {
              "id": "e3",
              "name": "job_id",
              "value": "={{ $json.job_id }}",
              "type": "string"
            },
            {
              "id": "e4",
              "name": "status",
              "value": "={{ $json.status }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "a1b2c3d4-0008-0008-0008-000000000008",
      "name": "Return Error or Pending",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        1780,
        480
      ]
    }
  ],
  "connections": {
    "Webhook \u2014 Convert File": {
      "main": [
        [
          {
            "node": "Set API Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set API Config": {
      "main": [
        [
          {
            "node": "Submit Conversion Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Conversion Job": {
      "main": [
        [
          {
            "node": "Poll Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Job Status": {
      "main": [
        [
          {
            "node": "Job Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Job Complete?": {
      "main": [
        [
          {
            "node": "Return Download URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Return Error or Pending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}