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-03-13T12:29:04.529Z",
"updatedAt": "2025-03-14T08:10:38.000Z",
"id": "2mHYoo6trxIx4zLd",
"name": "DocumentFlashThinking",
"active": true,
"nodes": [
{
"parameters": {
"promptType": "define",
"text": "={{ $('Webhook').item.json.body.message }}",
"messages": {
"messageValues": [
{
"message": "\u042f \u0442\u0435\u0431\u0435 \u0434\u0430\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u0434\u0430\u044e \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041f\u0440\u043e\u0441\u044c\u0431\u0430 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044f\u0441\u044c \u0418\u0421\u041a\u041b\u042e\u0427\u0418\u0422\u0415\u041b\u041d\u041e \u043d\u0430 \u0442\u0435\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0442\u0435\u0431\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e. \u041f\u0438\u0448\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0432\u0435\u0442 \u043f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443.\n\u041d\u043e \u043f\u0438\u0448\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u043d\u043e, \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0442\u0440\u0438 \u0430\u0431\u0437\u0430\u0446\u0430\n\u043d\u0435 \u043f\u0438\u0448\u0438 \u0444\u0440\u0430\u0437 \u0442\u0438\u043f\u0430 \"\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438\". \u041f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0432\u0435\u0442 \u0441\u0440\u0430\u0437\u0443. \n\u0421\u0434\u0435\u043b\u0430\u0439 \u0441\u0442\u0438\u043b\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0432\u0438\u0434\u0438\u0442 \u0442\u0435\u043a\u0441\u0442. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u043d\u0430\u0443\u0447\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c. \n\n\u041d\u0435 \u043b\u0435\u0439 \u0432\u043e\u0434\u0443 \u0442\u0438\u043f\u0430 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u0440\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0437\u0430\u0434\u0430\u0447"
},
{
"type": "HumanMessagePromptTemplate",
"message": "={{ $json.content }}"
}
]
}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.5,
"position": [
1900,
0
],
"id": "468978cc-aa35-48ed-95d6-94e9ba375f5f",
"name": "Basic LLM Chain"
},
{
"parameters": {
"model": "google/gemini-2.0-flash-thinking-exp-1219:free",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
2360,
-180
],
"id": "beac330d-1f78-4fdf-b193-d12b2a9c5ddd",
"name": "OpenRouter Chat Model",
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "get",
"documentURL": "https://docs.google.com/document/d/1BvJFzEBew0ExBGfj0jUO2OSevJxJ5PB5I_jtEXwK7iQ/edit?tab=t.0"
},
"type": "n8n-nodes-base.googleDocs",
"typeVersion": 2,
"position": [
1780,
0
],
"id": "7c0b73cc-1ad6-4317-ac32-91d14901a547",
"name": "Google Docs",
"credentials": {
"googleDocsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "GeminiFlashThinking",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
0,
0
],
"id": "bb17641f-5cec-4010-b7f0-4050674291b6",
"name": "Webhook"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.body.message }}",
"messages": {
"messageValues": [
{
"message": "\u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u043d\u0438\u0436\u0435: read \u0438\u043b\u0438 write.\n\n\n\n\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438: \t1.\t\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 (write): \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u043e\u0447\u0435\u0442 \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u044d\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e: write. \u041f\u0440\u0438\u043c\u0435\u0440\u044b: \t\u2022\t\u00ab\u0414\u043e\u0431\u0430\u0432\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u043e\u0432\u043e\u043c \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.\u00bb \t\u2022\t\u00ab\u041e\u0431\u043d\u043e\u0432\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0441\u043b\u0443\u0433 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.\u00bb \t\u2022\t\u00ab\u0418\u0441\u043f\u0440\u0430\u0432\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u043e\u0442\u0447\u0451\u0442\u0435.\u00bb \t\u2022\t\u00ab\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e \u0444\u0438\u043b\u0438\u0430\u043b\u0430\u0445.\u00bb \t2.\t\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (read): \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0441\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043b\u0438 \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0431\u0435\u0437 \u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u044d\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e: read. \u041f\u0440\u0438\u043c\u0435\u0440\u044b: \t\u2022\t\u00ab\u041f\u043e\u043a\u0430\u0436\u0438 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.\u00bb \t\u2022\t\u00ab\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.\u00bb \t\u2022\t\u00ab\u041a\u0430\u043a\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u043e \u043f\u0430\u0440\u0442\u043d\u0451\u0440\u0430\u0445?\u00bb \t\u2022\t\u00ab\u041d\u0430\u043f\u043e\u043c\u043d\u0438, \u0447\u0442\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043e \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.\u00bb"
}
]
}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.5,
"position": [
180,
20
],
"id": "6b588f0b-ba93-4006-9d55-38aee7a6b627",
"name": "Basic LLM Chain1"
},
{
"parameters": {
"respondWith": "text",
"responseBody": "={{ $json.text }}",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
2260,
20
],
"id": "816d2106-9dc4-4419-9b6d-f703b3be9b0b",
"name": "Respond to Webhook"
},
{
"parameters": {
"model": "google/gemini-2.0-flash-thinking-exp-1219:free",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
280,
240
],
"id": "3895e4a2-9f57-442e-bb10-f24960b7ebb5",
"name": "OpenRouter Chat Model1",
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "949ac7fe-524c-4f93-b5ae-c959a87f59fb",
"leftValue": "={{ $json.text }}",
"rightValue": "read",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
540,
20
],
"id": "70c38b06-fe66-4bc7-a8e0-446f20a61a82",
"name": "If"
},
{
"parameters": {
"respondWith": "text",
"responseBody": "\u0414\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u043d\u0435\u0441\u0435\u043d\u044b",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
2480,
340
],
"id": "e936aefc-3ab6-4986-b901-229e29001d2e",
"name": "Respond to Webhook1"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Webhook').item.json.body.message }}\n\n\n\u0423\u0434\u0430\u043b\u0438 \u0432\u043e\u0434\u0443 \u0438\u0437 \u0444\u0440\u0430\u0437\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432\u044b\u0448\u0435. ",
"messages": {
"messageValues": [
{
"message": "\u042f \u0442\u0435\u0431\u0435 \u0431\u0443\u0434\u0443 \u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0430 \u0442\u044b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u0443\u0434\u0435\u0448\u044c \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0444\u0430\u0439\u043b. \u041d\u0430\u043f\u0438\u0448\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. "
}
]
}
},
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.5,
"position": [
1000,
240
],
"id": "4c422320-39c9-49a8-874b-cb106bca1dcc",
"name": "Basic LLM Chain2"
},
{
"parameters": {
"model": "google/gemini-2.0-flash-thinking-exp-1219:free",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
1040,
460
],
"id": "8865c58f-7478-4869-bbeb-4d2ac687b440",
"name": "OpenRouter Chat Model2",
"credentials": {
"openRouterApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "get",
"documentURL": "https://docs.google.com/document/d/1BvJFzEBew0ExBGfj0jUO2OSevJxJ5PB5I_jtEXwK7iQ/edit?usp=drivesdk"
},
"type": "n8n-nodes-base.googleDocs",
"typeVersion": 2,
"position": [
1360,
240
],
"id": "4b8e490c-185b-458e-8d17-2a506098bb47",
"name": "Google Docs1",
"credentials": {
"googleDocsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "update",
"documentURL": "https://docs.google.com/document/d/1BvJFzEBew0ExBGfj0jUO2OSevJxJ5PB5I_jtEXwK7iQ/edit?tab=t.0#heading=h.8g3n5ap8bnhp",
"actionsUi": {
"actionFields": [
{
"action": "insert",
"text": "={{ $('Basic LLM Chain2').item.json.text }}"
}
]
}
},
"type": "n8n-nodes-base.googleDocs",
"typeVersion": 2,
"position": [
1580,
240
],
"id": "da214825-a659-4c9b-87f7-24a7f2d3419b",
"name": "Google Docs2",
"credentials": {
"googleDocsOAuth2Api": {
"name": "<your credential>"
}
}
}
],
"connections": {
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Basic LLM Chain": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Google Docs": {
"main": [
[
{
"node": "Basic LLM Chain",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Basic LLM Chain1",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain1": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model1": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Google Docs",
"type": "main",
"index": 0
}
],
[
{
"node": "Basic LLM Chain2",
"type": "main",
"index": 0
}
]
]
},
"Basic LLM Chain2": {
"main": [
[
{
"node": "Google Docs1",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model2": {
"ai_languageModel": [
[
{
"node": "Basic LLM Chain2",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Docs1": {
"main": [
[
{
"node": "Google Docs2",
"type": "main",
"index": 0
}
]
]
},
"Google Docs2": {
"main": [
[
{
"node": "Respond to Webhook1",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"versionId": "ff46c3e5-29fb-4d38-88aa-93ab4d9da65b",
"triggerCount": 1,
"tags": [
{
"createdAt": "2025-03-13T07:45:38.802Z",
"updatedAt": "2025-03-13T07:45:38.802Z",
"id": "VELAFVHgNsNNcoRf",
"name": "Memory"
},
{
"createdAt": "2025-03-13T12:37:42.433Z",
"updatedAt": "2025-03-13T12:37:42.433Z",
"id": "mS7hDKpZh1SMxZRW",
"name": "Chat"
}
]
}
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.
googleDocsOAuth2ApiopenRouterApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
DocumentFlashThinking. Uses chainLlm, lmChatOpenRouter, googleDocs. Webhook trigger; 13 nodes.
Source: https://github.com/AdminRHS/n8n-credentials-backup/blob/9be9e5c32e495d6bce2eb5bbc6a3411589f98c27/workflows/DocumentFlashThinking/DocumentFlashThinking.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.
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.
Sia — Portal de Expansão de Terrenos (Principal). Uses chainLlm, lmChatGroq, googleSheets. Webhook trigger; 12 nodes.