{
  "name": "support-pilot: one Novita support reply",
  "nodes": [
    {
      "parameters": {},
      "id": "manual-trigger-1",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "prompt-1",
              "name": "prompt",
              "type": "string",
              "value": "Ticket T-1000: item SKU-1000 arrived damaged; customer asks for a refund of $19.00 on order ORD-1000."
            }
          ]
        },
        "options": {}
      },
      "id": "prepare-1",
      "name": "Prepare Example",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        240,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.novita.ai/openai/v1/chat/completions",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"deepseek/deepseek-v4.1-flash-1017\",\n  \"max_tokens\": 128,\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a support agent for a fictional store. Policy: refunds go to the original payment method within 5-10 business days; password reset links are emailed and expire in 30 minutes; shipments with no scans for 24-48 hours get a carrier trace; plan changes are prorated and take effect at the next billing cycle. In every reply, restate the relevant ids (order/account/tracking/workspace) and amounts exactly as given, state the action, and give the timing. Under 80 words.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": {{ JSON.stringify($json.prompt) }}\n    }\n  ]\n}",
        "options": {
          "timeout": 30000,
          "redirect": {
            "redirect": {
              "followRedirects": false
            }
          }
        }
      },
      "id": "novita-1",
      "name": "Novita Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        480,
        0
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "reply-1",
              "name": "reply",
              "type": "string",
              "value": "={{ $json.choices[0].message.content }}"
            },
            {
              "id": "usage-1",
              "name": "usage",
              "type": "string",
              "value": "={{ JSON.stringify($json.usage) }}"
            }
          ]
        },
        "options": {}
      },
      "id": "show-1",
      "name": "Show Reply",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        720,
        0
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Prepare Example",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Example": {
      "main": [
        [
          {
            "node": "Novita Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Novita Request": {
      "main": [
        [
          {
            "node": "Show Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "pinData": {},
  "active": false
}
