{
  "name": "Enroutia · Product page from a form",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Write a product page",
        "formDescription": "Name, features and tone in; title, descriptions, bullets and a meta description out.",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Product name",
              "requiredField": true
            },
            {
              "fieldLabel": "Features",
              "fieldType": "textarea",
              "requiredField": true,
              "placeholder": "One per line: materials, sizes, what it does"
            },
            {
              "fieldLabel": "Tone",
              "placeholder": "e.g. warm and plain, no superlatives"
            },
            {
              "fieldLabel": "Language",
              "placeholder": "English"
            },
            {
              "fieldLabel": "Client",
              "placeholder": "Optional: the shop this is for"
            }
          ]
        },
        "options": {}
      },
      "name": "Product form",
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        0,
        0
      ],
      "webhookId": "enroutia-product-form"
    },
    {
      "parameters": {
        "resource": "chat",
        "operation": "message",
        "model": "=enroutia/product-copy",
        "prompt": "=Product: {{ $json['Product name'] }}\nFeatures:\n{{ $json.Features }}\nTone: {{ $json.Tone || 'clear and concrete' }}\nLanguage: {{ $json.Language || 'English' }}",
        "options": {
          "systemMessage": "You write e-commerce product pages. Only use the features given; never invent certifications, measurements or claims. Return a JSON object with: title (max 70 characters), short_description (1 sentence), long_description (2 short paragraphs), bullets (array of 3 to 5), meta_description (max 155 characters).",
          "jsonOutput": true,
          "temperature": 0.7,
          "maxTokens": 1200,
          "clientTag": "={{ $json.Client || '' }}"
        }
      },
      "name": "Write product copy",
      "type": "n8n-nodes-enroutia.enroutia",
      "typeVersion": 1,
      "position": [
        240,
        0
      ],
      "credentials": {
        "enroutiaApi": {
          "name": "Enroutia account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// The Enroutia node returns the answer as text; with Guaranteed JSON Output on it is\n// always valid JSON (an invalid answer is retried once and billed once).\nreturn $input.all().map((item) => {\n  const parsed = JSON.parse(item.json.text);\n  return { json: { ...parsed, model: item.json.model, resolvedModel: item.json.resolvedModel } };\n});\n"
      },
      "name": "Parse JSON",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        480,
        0
      ]
    }
  ],
  "connections": {
    "Product form": {
      "main": [
        [
          {
            "node": "Write product copy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write product copy": {
      "main": [
        [
          {
            "node": "Parse JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
