{
  "createdAt": "2025-06-11T11:50:36.319Z",
  "updatedAt": "2025-06-11T11:50:43.234Z",
  "id": "XqbaGVq6uqnIY0ka",
  "name": "CourseJSON_Generator",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "promptType": "define",
        "text": " ",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "message": "\u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439 \u041e\u0414\u0418\u041d \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 JSON-\u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u043f\u043e \u0414\u0410\u041d\u041d\u042b\u041c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0440\u0438\u0448\u043b\u044e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438. \u0421\u043e\u0431\u043b\u044e\u0434\u0430\u0439 \u0412\u0421\u0415 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043f\u0440\u043e\u0432\u0435\u0440\u044c \u0441\u0435\u0431\u044f \u043f\u043e \u0447\u0435\u043a-\u043b\u0438\u0441\u0442\u0443 \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0432\u0435\u0434\u0438 \u0442\u043e\u043b\u044c\u043a\u043e JSON. \u0415\u0441\u043b\u0438 \u043f\u043e\u043d\u044f\u043b \u2014 \u043e\u0442\u0432\u0435\u0442\u044c:  \u0414\u0430, \u0436\u0434\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.   \u2e3b  1\u2003\u0428\u0430\u0431\u043b\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u041e\u0411\u042f\u0417\u0410\u0422\u0415\u041b\u042c\u041d\u041e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c  {   \"title\": \"\",   \"description\": \"\",   \"category\": \"681dfaab642ad2b18ee6e8d3\",   \"difficulty\": \"beginner\",   \"image\": \"\",   \"imagePreview\": \"\",   \"modules\": [     {       \"title\": \"\",       \"description\": \"\",       \"content\": \"\",       \"lessons\": [         {           \"title\": \"\",           \"content\": \"\",           \"duration\": 15,           \"type\": \"text\",           \"contentType\": \"standard\"         }       ],       \"tests\": []     }   ] }  \u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430, \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0439.  \u2e3b  2\u2003\u041a\u0430\u043a \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u044f  \u0423\u0440\u043e\u0432\u0435\u043d\u044c\t\u041f\u043e\u043b\u0435\t\u0427\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u041a\u0443\u0440\u0441\ttitle, description\t\u0411\u0435\u0440\u0438 \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e \u0438\u0437 \u043c\u043e\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0443\u0440\u0441\timage, imagePreview\t\u041e\u0441\u0442\u0430\u0432\u044c \"\", \u0435\u0441\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a. \u041c\u043e\u0434\u0443\u043b\u044c\ttitle, description\t\u041a\u043e\u043f\u0438\u0440\u0443\u0439 \u0434\u043e\u0441\u043b\u043e\u0432\u043d\u043e. \u041c\u043e\u0434\u0443\u043b\u044c\tcontent\t\u0420\u043e\u0432\u043d\u043e \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435-\u0441\u0430\u043c\u043c\u0430\u0440\u0438 \u043e \u0441\u0443\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u044f. \u0423\u0440\u043e\u043a\ttitle\t\u041a\u043e\u043f\u0438\u0440\u0443\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0443\u0440\u043e\u043a\u0430. \u0423\u0440\u043e\u043a\tcontent\t\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a: 1. \u2026 \\\\n2. \u2026 \u0431\u0435\u0437 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0439. \u0423\u0440\u043e\u043a\tduration\t\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u0447\u0438\u0441\u043b\u043e \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 15. \u0423\u0440\u043e\u043a\ttype, contentType\t\u0412\u0441\u0435\u0433\u0434\u0430 \"text\" \u0438 \"standard\". \u041c\u043e\u0434\u0443\u043b\u044c\ttests\t\u0412\u0441\u0435\u0433\u0434\u0430 [].   \u2e3b  3\u2003\u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \t\u2022\t\u0412\u0435\u0440\u043d\u0438 \u0442\u043e\u043b\u044c\u043a\u043e JSON \u0431\u0435\u0437 Markdown-\u0431\u043b\u043e\u043a\u043e\u0432, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u0438 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439. \t\u2022\t\u041e\u0442\u0432\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 { \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f }. \t\u2022\t\u0412\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \", \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044b \u0432 content \u2014 \u0447\u0435\u0440\u0435\u0437 \\\\n.  \u2e3b  4\u2003\u0427\u0435\u043a-\u043b\u0438\u0441\u0442 \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \t\u2022\t\u041a\u043e\u043b-\u0432\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u0443\u0440\u043e\u043a\u043e\u0432 \u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 (\u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043e). \t\u2022\t\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0435\u0441\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u0443\u0440\u043e\u043a. \t\u2022\tcontent \u043c\u043e\u0434\u0443\u043b\u044f = 1 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \t\u2022\tcontent \u0443\u0440\u043e\u043a\u0430 = \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0435\u0437 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0439. \t\u2022\t\u0412\u0435\u0441\u044c JSON \u0432\u0430\u043b\u0438\u0434\u0435\u043d (\u0441\u043a\u043e\u0431\u043a\u0438, \u0437\u0430\u043f\u044f\u0442\u044b\u0435, \u043a\u0430\u0432\u044b\u0447\u043a\u0438).  \u2e3b  5\u2003\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e  \u041e\u0448\u0438\u0431\u043a\u0430\t\u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u043b\u043e\u0445\u043e\t\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u041f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0448\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f { \"modules\":[ {\u2026} ] }\t\u041f\u043e\u0442\u0435\u0440\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439.\t\u0412\u044b\u0432\u0435\u0434\u0438 \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438\u043c\u0435\u0440 \u2193 \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0448\u044c \u0443\u0440\u043e\u043a\u0438 \u041c\u043e\u0434\u0443\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 1 \u0443\u0440\u043e\u043a \u0432\u043c\u0435\u0441\u0442\u043e 3.\t\u041d\u0430\u0440\u0443\u0448\u0435\u043d\u0430 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u0443\u0440\u0441\u0430.\t\u0412\u043a\u043b\u044e\u0447\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0440\u043e\u043a \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. content \u043c\u043e\u0434\u0443\u043b\u044f = \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u043e\u043a\t\u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 1 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435.\tcontent : \u201cSummarise whole module in one sentence.\u201d content \u0443\u0440\u043e\u043a\u0430 = \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e\t\u0414\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a 1., 2. \u2026\tcontent : \u201c1. Step one\u2026\\n2. Step two\u2026\u201d \u0414\u043e\u0431\u0430\u0432\u0438\u043b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 // TODO \u0438\u043b\u0438 <!-- -->\tJSON \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c.\t\u0423\u0431\u0435\u0440\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043e\u0441\u0442\u0430\u0432\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u044b\u0432\u0435\u043b Markdown  ```json \u2026\t\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442.\t\u041f\u0440\u043e\u0441\u0442\u043e JSON \u0431\u0435\u0437 \u043e\u0431\u0451\u0440\u0442\u043a\u0438.   \u2e3b  6\u2003\u0414\u0432\u0430 \u0443\u0447\u0435\u0431\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 (\u041d\u0415 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435)  \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430  {   \"title\": \"Demo\",   \"modules\": [     { \"title\": \"Only module\" }   ] }  \u041e\u0448\u0438\u0431\u043a\u0438: \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f, content \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d, \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0443\u0440\u043e\u043a\u0438, JSON \u0443\u0441\u0435\u0447\u0451\u043d.  \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430  {   \"title\": \"Demo Course\",   \"description\": \"Quick demo.\",   \"category\": \"681dfaab642ad2b18ee6e8d3\",   \"difficulty\": \"beginner\",   \"image\": \"\",   \"imagePreview\": \"\",   \"modules\": [     {       \"title\": \"Module A\",       \"description\": \"Intro module.\",       \"content\": \"This module gives an overview of the whole course.\",       \"lessons\": [         {           \"title\": \"Lesson 1\",           \"content\": \"1. Do X\\\\n2. Do Y\",           \"duration\": 15,           \"type\": \"text\",           \"contentType\": \"standard\"         }       ],       \"tests\": []     }   ] }  \u0412\u0441\u0435 \u043a\u043b\u044e\u0447\u0438 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, content \u043c\u043e\u0434\u0443\u043b\u044f = 1 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, content \u0443\u0440\u043e\u043a\u0430 = \u0441\u043f\u0438\u0441\u043e\u043a.  \u2e3b  \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u2014 \u043e\u0442\u0432\u0435\u0442\u044c \u0440\u043e\u0432\u043d\u043e:  \u0414\u0430, \u0436\u0434\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435."
            },
            {
              "type": "AIMessagePromptTemplate",
              "message": "\u0414\u0430, \u0436\u0434\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435."
            },
            {
              "type": "HumanMessagePromptTemplate",
              "message": "={{ $json.body.message }}"
            }
          ]
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        -240,
        -20
      ],
      "id": "d14815b8-cc49-4b91-acb7-012f17e25ac8",
      "name": "Basic LLM Chain"
    },
    {
      "parameters": {
        "model": "google/gemma-3-27b-it",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        -180,
        220
      ],
      "id": "2d488610-9a6d-40ef-a27c-57c7049443f2",
      "name": "OpenRouter Chat Model",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "CourseJSONGenerator",
        "responseMode": "lastNode",
        "options": {
          "responseContentType": "text/plain"
        }
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -660,
        20
      ],
      "id": "1caa1233-f222-4f58-8058-4214e942647d",
      "name": "Webhook"
    },
    {
      "parameters": {
        "jsCode": "// \u041f\u0440\u0438\u0439\u043c\u0430\u0454 \u0440\u044f\u0434\u043e\u043a \u0437 ```json \u2026 ``` \u0456 \u043f\u043e\u0432\u0435\u0440\u0442\u0430\u0454 \u0447\u0438\u0441\u0442\u0438\u0439 JSON-\u043e\u0431\u2019\u0454\u043a\u0442\nreturn items.map(item => {\n  const raw = (item.json?.text || '').trim();\n\n  // \u0412\u0438\u0434\u0430\u043b\u044f\u0454\u043c\u043e \u0432\u0441\u0456 \u0432\u0430\u0440\u0456\u0430\u043d\u0442\u0438 \u043f\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044c ```json \u0442\u0430 ```\n  const cleaned = raw\n    .replace(/```json/gi, '')\n    .replace(/```/g, '')\n    .trim();\n\n  const data = JSON.parse(cleaned);\n\n  return { json: data };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        280,
        -20
      ],
      "id": "e67580c4-1454-47f1-bd09-c76fcf102b97",
      "name": "Code"
    }
  ],
  "connections": {
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "82aa87ec-e697-49bb-903f-bdbcd9d05684",
  "triggerCount": 0,
  "tags": []
}