{
  "name": "Quiz Generator Workflow",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "generate-quiz",
        "responseMode": "onReceivedCall",
        "options": {}
      },
      "id": "webhook-trigger",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "url": "http://host.docker.internal:8000/webhook/generate-quiz",
        "method": "POST",
        "bodyParameters": {
          "parameters": [
            {
              "name": "document_id",
              "value": "={{$json.document_id}}"
            },
            {
              "name": "num_questions",
              "value": "={{$json.num_questions || 5}}"
            }
          ]
        },
        "options": {
          "timeout": 120000
        }
      },
      "id": "http-generate-quiz",
      "name": "Generate Quiz",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [
        500,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{$json.data.quiz}}",
        "options": {}
      },
      "id": "respond-node",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        750,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Generate Quiz",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Quiz": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "id": "quiz-generator-workflow"
}