{
  "name": "Convertfleet \u2013 File Conversion API (MCP-Ready)",
  "nodes": [
    {
      "parameters": {
        "content": "## Convertfleet File Conversion \u2014 MCP-Ready Workflow\n\n**Setup (3 steps):**\n1. Replace `YOUR_API_KEY` in the **Set Credentials** node with your real key from convertfleet.com/dashboard/api\n2. Activate the workflow \u2014 copy the Webhook URL shown on the **Conversion Request** node.\n3. **Claude Code / MCP config:** add this webhook URL as a tool endpoint in `mcp_servers` so Claude can call it directly.\n\n**Test with curl:**\n```\ncurl -X POST YOUR_WEBHOOK_URL \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"fileUrl\":\"https://example.com/report.docx\",\"outputFormat\":\"pdf\"}'\n```\n**Supported formats:** PDF, DOCX, XLSX, PPTX, PNG, JPG, WEBP, MP4, MP3, WAV, GIF, SVG \u2014 no local ffmpeg or LibreOffice needed.",
        "height": 290,
        "width": 580,
        "color": 7
      },
      "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567801",
      "name": "Setup Guide",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -300
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "convert",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567802",
      "name": "Conversion Request",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        100
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "apiKey",
              "value": "YOUR_API_KEY",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "fileUrl",
              "value": "={{ $json.body.fileUrl }}",
              "type": "string"
            },
            {
              "id": "a3",
              "name": "outputFormat",
              "value": "={{ $json.body.outputFormat ?? 'pdf' }}",
              "type": "string"
            },
            {
              "id": "a4",
              "name": "callbackUrl",
              "value": "={{ $json.body.callbackUrl ?? '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567803",
      "name": "Set Credentials",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        300,
        100
      ]
    },
    {
      "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": "keypairs",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file_url",
              "value": "={{ $json.fileUrl }}"
            },
            {
              "name": "output_format",
              "value": "={{ $json.outputFormat }}"
            },
            {
              "name": "callback_url",
              "value": "={{ $json.callbackUrl }}"
            }
          ]
        },
        "options": {}
      },
      "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567804",
      "name": "Submit Conversion Job",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        600,
        100
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "={{ 'https://api.convertfleet.com/v1/jobs/' + $json.job_id }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer YOUR_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567805",
      "name": "Poll Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        900,
        100
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "cond-1",
              "leftValue": "={{ $json.status }}",
              "rightValue": "complete",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        }
      },
      "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567806",
      "name": "Job Complete?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1200,
        100
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ success: true, downloadUrl: $json.download_url, outputFormat: $json.output_format, jobId: $json.job_id, fileSizeBytes: $json.file_size_bytes, expiresAt: $json.expires_at }) }}",
        "options": {
          "responseCode": 200
        }
      },
      "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567807",
      "name": "Return Download URL",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1500,
        0
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({ success: false, status: $json.status, jobId: $json.job_id, message: 'Conversion still processing. Poll GET /v1/jobs/' + $json.job_id + ' or pass callbackUrl in the request for async delivery.', estimatedSecondsRemaining: $json.estimated_seconds ?? 30 }) }}",
        "options": {
          "responseCode": 202
        }
      },
      "id": "b1a2c3d4-e5f6-7890-abcd-ef1234567808",
      "name": "Return Pending Status",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1500,
        280
      ]
    }
  ],
  "connections": {
    "Conversion Request": {
      "main": [
        [
          {
            "node": "Set Credentials",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Credentials": {
      "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 Pending Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}