This workflow follows the Chainllm → OpenRouter Chat recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"createdAt": "2025-05-13T14:19:17.174Z",
"updatedAt": "2025-05-16T09:24:31.000Z",
"id": "VbQSEVRl8VWCiuXt",
"name": "CourseJSON Generator",
"active": 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": [
480,
100
],
"id": "2a4e80e3-64a6-40fa-8a6f-e1ae4bd35fe4",
"name": "Basic LLM Chain"
},
{
"parameters": {
"model": "google/gemma-3-27b-it",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
540,
340
],
"id": "df966a9b-99cf-42a9-8f72-95edb2edb1aa",
"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": [
60,
140
],
"id": "e79b5b1b-d607-4c88-a363-6469394304e5",
"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": [
1000,
100
],
"id": "fb50ac14-1f6f-41d9-8744-76cf7f6f75b0",
"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
}
]
]
},
"Code": {
"main": [
[]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"versionId": "7832065f-f6de-4a0c-a639-b47f4b75a36e",
"triggerCount": 0,
"tags": [
{
"createdAt": "2025-05-13T14:20:15.668Z",
"updatedAt": "2025-05-13T14:20:15.668Z",
"id": "0VUURrJm77Y2zHCC",
"name": "generator"
},
{
"createdAt": "2025-05-13T14:20:13.639Z",
"updatedAt": "2025-05-13T14:20:13.639Z",
"id": "75ekeNpi1wLMIwAX",
"name": "json"
},
{
"createdAt": "2025-03-17T12:51:58.346Z",
"updatedAt": "2025-03-17T12:51:58.346Z",
"id": "CO1guCcQNZgNjhhs",
"name": "bot"
},
{
"createdAt": "2025-05-13T14:20:12.005Z",
"updatedAt": "2025-05-13T14:20:12.005Z",
"id": "Ca15t5dw65lILi6Y",
"name": "onboarding"
},
{
"createdAt": "2025-03-04T15:18:45.103Z",
"updatedAt": "2025-03-04T15:18:45.103Z",
"id": "Lv0IHVqEPpRYfyh7",
"name": "AI Onboarding"
}
]
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
openRouterApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
CourseJSON_Generator. Uses chainLlm, lmChatOpenRouter. Webhook trigger; 4 nodes.
Source: https://github.com/AdminRHS/n8n_creds_and_workflows/blob/cc2b1b66f8a3b0c4bd367e9b90faa9d21a131b69/workflows/XqbaGVq6uqnIY0ka.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
CourseJSON Generator. Uses chainLlm, lmChatOpenRouter. Webhook trigger; 4 nodes.
DocumentFlashThinking. Uses chainLlm, lmChatOpenRouter, googleDocs. Webhook trigger; 13 nodes.
ESG analysts, investors, procurement teams, activists and sustainability professionals who need comprehensive, objective assessments of companies' environmental impact and animal welfare policies. Per
TWBS. Uses httpRequest, chainLlm, lmChatAzureOpenAi. Webhook trigger; 14 nodes.
Stickynote Executeworkflow. Uses executeWorkflowTrigger, chainLlm, outputParserStructured, lmChatOpenRouter. Event-driven trigger; 12 nodes.