{
  "name": "Convertfleet File Conversion API \u2014 MCP-Ready",
  "nodes": [
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000001",
      "name": "Setup Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        200,
        140
      ],
      "parameters": {
        "content": "## Convertfleet File Conversion \u2014 MCP-Ready\n\n**Setup:**\n1. Replace `YOUR_API_KEY` in both HTTP Request nodes (Authorization header).\n2. Activate the workflow and copy the webhook URL.\n3. POST `{ \"fileUrl\": \"https://\u2026\", \"inputFormat\": \"pdf\", \"outputFormat\": \"docx\" }` to trigger.\n4. As an MCP tool: add this webhook URL as the `convert_file` tool endpoint in your `claude_desktop_config.json` \u2192 `mcpServers`.\n5. Increase the Wait node delay for large video/audio jobs (30\u201360 s).\n\n**Supported:** PDF\u2194Office, image format/resize, audio/video via FFmpeg \u2014 all server-side.",
        "height": 280,
        "width": 420,
        "color": 5
      }
    },
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000002",
      "name": "Receive Conversion Request",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        700,
        320
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "convert-file",
        "responseMode": "responseNode",
        "options": {}
      },
      "webhookId": "convert-file-mcp-webhook"
    },
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000003",
      "name": "Prepare Params",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        920,
        320
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "assign-1",
              "name": "fileUrl",
              "value": "={{ $json.body.fileUrl }}",
              "type": "string"
            },
            {
              "id": "assign-2",
              "name": "inputFormat",
              "value": "={{ $json.body.inputFormat }}",
              "type": "string"
            },
            {
              "id": "assign-3",
              "name": "outputFormat",
              "value": "={{ $json.body.outputFormat }}",
              "type": "string"
            },
            {
              "id": "assign-4",
              "name": "webhook",
              "value": "={{ $json.body.webhook ?? '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000004",
      "name": "Submit Conversion Job",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1140,
        320
      ],
      "parameters": {
        "method": "POST",
        "url": "https://api.convertfleet.com/v1/jobs",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "contentType": "json",
        "bodyParameters": {
          "parameters": [
            {
              "name": "fileUrl",
              "value": "={{ $json.fileUrl }}"
            },
            {
              "name": "inputFormat",
              "value": "={{ $json.inputFormat }}"
            },
            {
              "name": "outputFormat",
              "value": "={{ $json.outputFormat }}"
            },
            {
              "name": "webhookUrl",
              "value": "={{ $json.webhook }}"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000005",
      "name": "Wait for Processing",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        1360,
        320
      ],
      "parameters": {
        "resume": "timeInterval",
        "amount": 8,
        "unit": "seconds"
      }
    },
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000006",
      "name": "Poll Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        1580,
        320
      ],
      "parameters": {
        "method": "GET",
        "url": "=https://api.convertfleet.com/v1/jobs/{{ $('Submit Conversion Job').item.json.jobId }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000007",
      "name": "Conversion Complete?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1800,
        320
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "cond-status",
              "leftValue": "={{ $json.status }}",
              "rightValue": "completed",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000008",
      "name": "Return Download URL",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        2020,
        220
      ],
      "parameters": {
        "respondWith": "json",
        "responseCode": 200,
        "responseBody": "={{ JSON.stringify({ success: true, downloadUrl: $json.downloadUrl, jobId: $json.jobId, outputFormat: $json.outputFormat, expiresAt: $json.expiresAt, sizeBytes: $json.sizeBytes }) }}"
      }
    },
    {
      "id": "a1b2c3d4-fc01-0000-0000-000000000009",
      "name": "Return Pending Status",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        2020,
        440
      ],
      "parameters": {
        "respondWith": "json",
        "responseCode": 202,
        "responseBody": "={{ JSON.stringify({ success: false, status: $json.status, jobId: $json.jobId, message: 'Job still processing \u2014 poll GET /v1/jobs/' + $json.jobId + ' or retry in a few seconds.' }) }}"
      }
    }
  ],
  "connections": {
    "Receive Conversion Request": {
      "main": [
        [
          {
            "node": "Prepare Params",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Params": {
      "main": [
        [
          {
            "node": "Submit Conversion Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Conversion Job": {
      "main": [
        [
          {
            "node": "Wait for Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Processing": {
      "main": [
        [
          {
            "node": "Poll Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Job Status": {
      "main": [
        [
          {
            "node": "Conversion Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Conversion Complete?": {
      "main": [
        [
          {
            "node": "Return Download URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Return Pending Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}