I am having trouble getting the task_id of a web page using http request2. Thanks for your help

{
“name”: “crawl4ai”,
“nodes”: [
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.chatTrigger”,
“typeVersion”: 1.1,
“position”: [
-1940,
20
],
“id”: “3d172d67-ba97-41b4-a119-5bb01a173e14”,
“name”: “When chat message received”,
“webhookId”: “ed62944a-65a6-4fa6-9624-009057b7f606”
},
{
“parameters”: {
“url”: “={{ $json.chatInput }}”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
-1780,
20
],
“id”: “3c2141f1-abda-47eb-b571-098fb68b212d”,
“name”: “HTTP Request”
},
{
“parameters”: {
“options”: {}
},
“type”: “n8n-nodes-base.xml”,
“typeVersion”: 1,
“position”: [
-1620,
20
],
“id”: “db6d38af-9592-4406-8067-6bbbd168f10e”,
“name”: “XML”
},
{
“parameters”: {
“fieldToSplitOut”: “urlset.url”,
“options”: {}
},
“type”: “n8n-nodes-base.splitOut”,
“typeVersion”: 1,
“position”: [
-1460,
20
],
“id”: “bed32855-ba3f-4a2b-bfa2-87de9b082dc0”,
“name”: “Split Out”
},
{
“parameters”: {
“maxItems”: 5
},
“type”: “n8n-nodes-base.limit”,
“typeVersion”: 1,
“position”: [
-1300,
20
],
“id”: “b958424a-2bc9-43ae-bffe-d1439dd53e10”,
“name”: “Limit”
},
{
“parameters”: {
“options”: {}
},
“type”: “n8n-nodes-base.splitInBatches”,
“typeVersion”: 3,
“position”: [
-1120,
20
],
“id”: “25358811-2d1d-44eb-aba1-fbe598d9dcc4”,
“name”: “Loop Over Items”
},
{
“parameters”: {
“method”: “POST”,
“url”: “http://host.docker.internal:11235/crawl/”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendBody”: true,
“specifyBody”: “json”,
“jsonBody”: "={\n "urls": ["{{ $json.loc }}"],\n "priority": 10\n} ",
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
-900,
20
],
“id”: “4d3fe63d-13a6-4a55-b57d-e57f944d61b0”,
“name”: “HTTP Request1”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “kd2DNX21fyn35r7m”,
“name”: “Header Auth account”
}
}
},
{
“parameters”: {
“amount”: 7
},
“type”: “n8n-nodes-base.wait”,
“typeVersion”: 1.1,
“position”: [
-680,
20
],
“id”: “be5af91c-d865-442a-9d2d-bf5acbb18700”,
“name”: “Wait”,
“webhookId”: “701ae57e-5617-472f-82c8-f749ffcfad14”
},
{
“parameters”: {
“url”: “=http://host.docker.internal:11235/”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
-500,
20
],
“id”: “1a34a2fb-166a-4735-b31d-0fe6c489ef35”,
“name”: “HTTP Request2”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “kd2DNX21fyn35r7m”,
“name”: “Header Auth account”
}
}
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “9c108c11-3904-48df-a689-fe7dd12124a8”,
“leftValue”: “={{ $json.status }}”,
“rightValue”: “completed”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.2,
“position”: [
-320,
20
],
“id”: “393b0fd2-e5a9-47b2-8901-d033825d751a”,
“name”: “If”
},
{
“parameters”: {
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 2,
“position”: [
-120,
-240
],
“id”: “9c07fd80-f757-4f05-b03d-13cbbbaff551”,
“name”: “AI Agent”
},
{
“parameters”: {
“model”: “qwen3:8b”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOllama”,
“typeVersion”: 1,
“position”: [
-120,
-80
],
“id”: “8fa64982-d736-4592-99e9-e0fb2a32b5a3”,
“name”: “Ollama Chat Model”,
“credentials”: {
“ollamaApi”: {
“id”: “4UY42xtz6l0Aep3S”,
“name”: “Ollama account”
}
}
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “06b28481-0144-422b-9948-665902085440”,
“name”: “task_id”,
“value”: “={{ $(‘HTTP Request1’).item.json.task_id }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
-100,
120
],
“id”: “2cc4ce3f-3f58-457e-89c1-5f271929fa97”,
“name”: “Edit Fields”
},
{
“parameters”: {
“operation”: “toText”,
“sourceProperty”: “output”,
“options”: {
“fileName”: “={{$json.output.split(‘\n’[0])}}.md\n”
}
},
“type”: “n8n-nodes-base.convertToFile”,
“typeVersion”: 1.1,
“position”: [
200,
-240
],
“id”: “f85b42fd-c226-4c56-9ff9-2df2448da6d0”,
“name”: “Convert to File”
},
{
“parameters”: {
“operation”: “write”,
“fileName”: “=/home/node/{{new data().toISOString}}.md”,
“options”: {}
},
“type”: “n8n-nodes-base.readWriteFile”,
“typeVersion”: 1,
“position”: [
380,
-240
],
“id”: “70e29547-2ba1-44d8-9776-8fe263ea6694”,
“name”: “Read/Write Files from Disk”
}
],
“pinData”: {},
“connections”: {
“When chat message received”: {
“main”: [
[
{
“node”: “HTTP Request”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request”: {
“main”: [
[
{
“node”: “XML”,
“type”: “main”,
“index”: 0
}
]
]
},
“XML”: {
“main”: [
[
{
“node”: “Split Out”,
“type”: “main”,
“index”: 0
}
]
]
},
“Split Out”: {
“main”: [
[
{
“node”: “Limit”,
“type”: “main”,
“index”: 0
}
]
]
},
“Limit”: {
“main”: [
[
{
“node”: “Loop Over Items”,
“type”: “main”,
“index”: 0
}
]
]
},
“Loop Over Items”: {
“main”: [
,
[
{
“node”: “HTTP Request1”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request1”: {
“main”: [
[
{
“node”: “Loop Over Items”,
“type”: “main”,
“index”: 0
},
{
“node”: “Wait”,
“type”: “main”,
“index”: 0
}
]
]
},
“Wait”: {
“main”: [
[
{
“node”: “HTTP Request2”,
“type”: “main”,
“index”: 0
}
]
]
},
“HTTP Request2”: {
“main”: [
[
{
“node”: “If”,
“type”: “main”,
“index”: 0
}
]
]
},
“If”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Edit Fields”,
“type”: “main”,
“index”: 0
}
]
]
},
“Ollama Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Edit Fields”: {
“main”: [
[
{
“node”: “Wait”,
“type”: “main”,
“index”: 0
}
]
]
},
“Convert to File”: {
“main”: [
[
{
“node”: “Read/Write Files from Disk”,
“type”: “main”,
“index”: 0
}
]
]
},
“AI Agent”: {
“main”: [
[
{
“node”: “Convert to File”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: false,
“settings”: {
“executionOrder”: “v1”
},
“versionId”: “d971918f-8121-42aa-aab7-23d71fd7d331”,
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “c077c493f5a142a80779f80d2cd5d7aa9b4c4b2fee7801554daeb996fac2162b”
},
“id”: “1eGgNA77P40sYox1”,
“tags”:
}

Would you share your workflow as Preformatted text?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.