عالق كبير مع دورة N8N 102

{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-512,
208
],
“id”: “c94cabc3-98bb-414a-9f7a-57d043c3a748”,
“name”: “TriggerManual”
},
{
“parameters”: {
“url”: “https://learn.app.n8n.cloud/webhook/course/n8n102/orders”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “X-Assessment-ID”,
“value”: “4bc05b1b9cc576b8cd6cd3cccc29a8da”
}
]
},
“options”: {
“pagination”: {
“pagination”: {
“parameters”: {
“parameters”: [
{
“name”: “page”,
“value”: “={{ $pageCount + 1 }}”
}
]
}
}
}
}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.4,
“position”: [
-288,
112
],
“id”: “40e35e92-29c4-4b0b-b670-79d3ede50dd5”,
“name”: “GetOrders”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “vMHAPkPKaravjcEZ”,
“name”: “n8n Academy API Key”
}
}
},
{
“parameters”: {
“url”: “https://learn.app.n8n.cloud/webhook/course/n8n102/customers”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “X-Assessment-ID”,
“value”: “4bc05b1b9cc576b8cd6cd3cccc29a8da”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.4,
“position”: [
-288,
304
],
“id”: “3fad8be8-4433-49ec-8bad-bfc781e676ba”,
“name”: “GetCustomers”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “vMHAPkPKaravjcEZ”,
“name”: “n8n Academy API Key”
}
}
},
{
“parameters”: {
“mode”: “combine”,
“fieldsToMatchString”: “customer_id”,
“joinMode”: “enrichInput1”,
“options”: {}
},
“type”: “n8n-nodes-base.merge”,
“typeVersion”: 3.2,
“position”: [
-64,
208
],
“id”: “fc2ed990-2d94-4a4b-aed3-79ed3688e53c”,
“name”: “MergeOrdersCustomers”
},
{
“parameters”: {
“aggregate”: “aggregateAllItemData”,
“destinationFieldName”: “enriched_orders”,
“options”: {}
},
“type”: “n8n-nodes-base.aggregate”,
“typeVersion”: 1,
“position”: [
160,
-16
],
“id”: “a1934843-0eaa-4990-8a3f-12fa0f60c4bd”,
“name”: “AggregateOrders”
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://learn.app.n8n.cloud/webhook/course/n8n102/orders-queue”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “X-Assessment-ID”,
“value”: “4bc05b1b9cc576b8cd6cd3cccc29a8da”
}
]
},
“sendBody”: true,
“bodyParameters”: {
“parameters”: [
{
“name”: “enriched_orders”,
“value”: “={{ $json.enriched_orders }}”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.4,
“position”: [
384,
-16
],
“id”: “0cf07ce8-68ad-4fec-bdd5-9e3e593795d6”,
“name”: “SendToOrdersQueue”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “vMHAPkPKaravjcEZ”,
“name”: “n8n Academy API Key”
}
}
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“id”: “92dde10e-a0ac-4901-985e-6a0e8a1963e4”,
“leftValue”: “={{ $json.subscription }}”,
“rightValue”: “Enterprise”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.if”,
“typeVersion”: 2.3,
“position”: [
160,
304
],
“id”: “cec1001d-a5b4-4e84-9470-06d40d4f90b4”,
“name”: “CheckSubscriptionTier”
},
{
“parameters”: {
“rules”: {
“values”: [
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“leftValue”: “={{ $json.region }}”,
“rightValue”: “north”,
“operator”: {
“type”: “string”,
“operation”: “equals”
},
“id”: “9585e06c-4bf6-4422-b8d9-c65c8aa315ad”
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “North”
},
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“id”: “4002a616-dbfd-4991-a1e0-72c888ac3bd9”,
“leftValue”: “={{ $json.region }}”,
“rightValue”: “south”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “South”
},
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“id”: “9f1f69c9-19bc-4738-a1e2-7cc2be1ba95f”,
“leftValue”: “={{ $json.region }}”,
“rightValue”: “e”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “East”
},
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“id”: “6a7b5b7f-1a45-4b11-9efb-5b3b7cbe7e76”,
“leftValue”: “={{ $json.region }}”,
“rightValue”: “west”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “West”
}
]
},
“options”: {
“fallbackOutput”: “extra”
}
},
“type”: “n8n-nodes-base.switch”,
“typeVersion”: 3.4,
“position”: [
384,
368
],
“id”: “4cca393c-d01e-4552-a4c4-60f20c5d9a76”,
“name”: “RouteByRegion”
},
{
“parameters”: {
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“id”: “6f605cb6-29ce-47ad-adc2-ae26af637db2”,
“leftValue”: “={{ $json.status }}”,
“rightValue”: “delivered”,
“operator”: {
“type”: “string”,
“operation”: “notEquals”
}
}
],
“combinator”: “and”
},
“options”: {}
},
“type”: “n8n-nodes-base.filter”,
“typeVersion”: 2.3,
“position”: [
384,
176
],
“id”: “cbeb6ae5-04d7-42bb-b562-a7dc31997144”,
“name”: “FilterDelivered”
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://learn.app.n8n.cloud/webhook/course/n8n102/priority-queue”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpHeaderAuth”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{
“name”: “X-Assessment-ID”,
“value”: “4bc05b1b9cc576b8cd6cd3cccc29a8da”
}
]
},
“sendBody”: true,
“bodyParameters”: {
“parameters”: [
{
“name”: “order_id”,
“value”: “={{ $json.order_id }}”
},
{
“name”: “customer_id”,
“value”: “={{ $json.customer_id }}”
},
{
“name”: “company_name”,
“value”: “={{ $json.customer_name }}”
},
{
“name”: “subscription”,
“value”: “={{ $json.subscription }}”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.4,
“position”: [
704,
176
],
“id”: “648920ef-df9c-41ad-a978-70b082ce97d9”,
“name”: “SendToPriorityQueue”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “vMHAPkPKaravjcEZ”,
“name”: “n8n Academy API Key”
}
}
}
],
“connections”: {
“TriggerManual”: {
“main”: [
[
{
“node”: “GetOrders”,
“type”: “main”,
“index”: 0
},
{
“node”: “GetCustomers”,
“type”: “main”,
“index”: 0
}
]
]
},
“GetOrders”: {
“main”: [
[
{
“node”: “MergeOrdersCustomers”,
“type”: “main”,
“index”: 0
}
]
]
},
“GetCustomers”: {
“main”: [
[
{
“node”: “MergeOrdersCustomers”,
“type”: “main”,
“index”: 1
}
]
]
},
“MergeOrdersCustomers”: {
“main”: [
[
{
“node”: “AggregateOrders”,
“type”: “main”,
“index”: 0
},
{
“node”: “CheckSubscriptionTier”,
“type”: “main”,
“index”: 0
}
]
]
},
“AggregateOrders”: {
“main”: [
[
{
“node”: “SendToOrdersQueue”,
“type”: “main”,
“index”: 0
}
]
]
},
“SendToOrdersQueue”: {
“main”: [

]
},
“CheckSubscriptionTier”: {
“main”: [
[
{
“node”: “FilterDelivered”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “RouteByRegion”,
“type”: “main”,
“index”: 0
}
]
]
},
“FilterDelivered”: {
“main”: [
[
{
“node”: “SendToPriorityQueue”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“instanceId”: “1b202188b62737e64678f469a8e86b98e8d2c2147255e95f1e4af4dc019b5e9d”
}
}

@Usman_Waheed سير العمل يتم استيراده بدون مشاكل هنا، لذا أحتاج إلى معرفة ما يسبب الخلل بالفعل، أي عقدة تعطل الرسالة الخطأ الدقيقة التي تظهرها. إذا كانت إحدى خطوات الطابور (SendToOrdersQueue / SendToPriorityQueue) فالتصق بما تعيده تلك العقدة وسأثبتها.

إليك مخرجات عقدة node: SendToPriorityQueue التي تحتوي على المشكلة

{
“errorMessage”: “طلبك غير صحيح أو لم تتمكن الخدمة من معالجته”,
“errorDescription”: “معرّف الطلب (order_id) غير صحيح. يرجى التأكد من أنك تُرسل معرّف الطلب الصحيح”,
“errorDetails”: {
“rawErrorMessage”: [
“422 - “{\“error\”:\“معرّف الطلب (order_id) غير صحيح. يرجى التأكد من أنك تُرسل معرّف الطلب الصحيح\”}””
],
“httpCode”: “422”
},
“n8nDetails”: {
“nodeName”: “SendToPriorityQueue”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.4,
“itemIndex”: 0,
“time”: “6/26/2026, 5:47:45 PM”,
“n8nVersion”: “2.22.5 (Self Hosted)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: طلبك غير صحيح أو لم تتمكن الخدمة من معالجته”,
" at ExecuteContext.execute (C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-nodes-base\nodes\HttpRequest\V3\HttpRequestV3.node.ts:849:16)“,
" at WorkflowExecute.executeNode (C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1053:9)”,
" at WorkflowExecute.runNode (C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1327:11)“,
" at C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1778:27”,
" at C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:2426:11"
]
}
}

@Usman_Waheed حسناً، أستطيع أن أراها في ملف JSON الخاص بك، SendToPriorityQueue تربط order_id بـ {{ $json.order_id }}، لكن في تلك العقدة هذا الحقل على الأرجح يتحلل إلى قيمة فارغة، وهذا بالضبط ما يعنيه الخطأ 422. افتح العقدة وتحقق من لوحة الإدخال، فنقطة نهاية الطلبات على الأرجح تُرجع المعرّف تحت اسم مختلف (غالباً ما يكون id فقط، وليس order_id) أو قد تكون عملية الدمج أعادت تسميته. أعد تعيين order_id إلى اسمه الفعلي كما يظهر هناك وستنجح.

No it is fine, see this image

@Usman_Waheed نعم أنت محق، order_id بخير (ORD-005). لكن انظر إلى الصف الذي فوقه، الـ status هو “pending”، لكن هذا العنصر مرّ عبر FilterDelivered، إذاً الـ filter لا يعمل بشكل صحيح، queue مخصصة للطلبات المسلّمة فقط تستقبل طلب بحالة pending والـ api يرفضه كـ invalid. تحقق من شرط FilterDelivered، يجب أن يسمح فقط بـ status = delivered. صحّح ذلك والطلبات بحالة pending مثل ORD-005 لن تُرسل.

أتابع البرنامج التعليمي بشكل صحيح وقمت باتباع الخطوات المشار إليها أدناه، بل بدأت من الصفر تماماً لكن يبدو أن البرنامج التعليمي غير صحيح

أضف عقدة Filter

  1. أعد تسميتها إلى FilterDelivered
  2. اضبط الشرط:
    • Value 1: {{ $json.status }}
    • Operation: is not equal to
    • Value 2: delivered
  3. نفّذ عقدة Filter وتحقق من أن لديك 12 عنصراً بدلاً من 20 عنصر إدخال
  4. أضف عقدة HTTP Request متصلة بعقدة FilterDelivered
  5. أعد تسميتها إلى SendToPriorityQueue

@Usman_Waheed أنت محق، البرنامج التعليمي خاطئ هنا. شرط “is not equal to delivered” يحتفظ بـ 12 طلب غير مسلّم (الطلبات المعلقة) ويرسلها إلى قائمة الانتظار، لذلك يرفضها كغير صحيحة. اقلب الشرط إلى “is equal to delivered”، وبعد ذلك ستمر فقط الـ 8 طلبات المسلّمة و 422 سيختفي. التعليمات عكستها ببساطة.

يعرض 8 عناصر تدخل إلى عقدة Sendpriorityqueue، لكن يبدو أنني لا أستطيع تجاوز هذه النقطة حيث لم يتم إصلاح الخطأ حتى بعد تشغيل سير العمل بالكامل. لقد طلبت حتى من Gemini ولم يتمكن من تقديم إصلاح مناسب. لقد أهدرت يومي بالكامل اليوم لتجاوز هذا الأمر مما يجعل تقدم الدورة عالقاً.

إليك الخطأ الآن

من HTTP Request

رمز الخطأ

422

الرسالة الكاملة

422 - "{\"error\":\"Invalid order_id. Please ensure you are sending the correct order_id\"}"

الطلب

{ "body": { "order_id": "ORD-018", "customer_id": "CUST-007", "company_name": "Summit Enterprises", "subscription": "Enterprise" }, "headers": { "x-assessment-id": "4bc05b1b9cc576b8cd6cd3cccc29a8da", "**hidden**": "**hidden**", "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7" }, "method": "POST", "uri": "https://learn.app.n8n.cloud/webhook/course/n8n102/priority-queue", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "sendCredentialsOnCrossOriginRedirect": false, "followAllRedirects": true, "timeout": 300000, "encoding": null, "json": false, "useStream": true }
معلومات أخرى

فهرس العنصر

0

نوع العقدة

n8n-nodes-base.httpRequest

إصدار العقدة

4.4 (أحدث إصدار)

إصدار n8n

2.22.5 (Self Hosted)

الوقت

6/26/2026, 6:11:40 PM

تتبع المكدس

NodeApiError: Your request is invalid or could not be processed by the service at ExecuteContext.execute (C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-nodes-base\nodes\HttpRequest\V3\HttpRequestV3.node.ts:849:16) at WorkflowExecute.executeNode (C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1053:9) at WorkflowExecute.runNode (C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1327:11) at C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_modules\n8n-core\src\execution-engine\workflow-execute.ts:1778:27 at C:\Users\Usman\AppData\Roaming\npm\node_modules\n8n\node_mod

@Usman_Waheed حسناً مهم جداً، بما أن الطلب المسلّم (ORD-018) يحصل على نفس الخطأ 422، إذاً المشكلة ليست في مرشح الحالة، بل هي ترفض كل طلب بغض النظر، لذا السبب هو كيفية إرسال الطلب وليس أي طلبات. تفريغك يُظهر json: false، لذا قد لا يتم إرسال الجسم كـ application/json، تحقق من Body Content Type = JSON على تلك العقدة، أو غيّر Body إلى raw والصق JSON مباشرة. إذا لم يحل المشكلة، عدة أشخاص عالقون في هذه الخطوة بالذات قد تكون هناك حاجة لرفعها على موضوع تصحيحات الأكاديمية.

تم اقتراح نفس الشيء بواسطة Gemini للتعامل معه، لكنه ينتهي فقط بتغيير الخطأ إلى شيء آخر، أو العودة إلى الخطأ الأصلي. هل هناك طريقة للتجاوز حتى أتمكن من الانتقال إلى الخطوات التالية وإكمال الدورة؟ وأخبرني أيضاً بالضبط أين يجب أن أبلغ عنه مع لقطات الشاشة/رمز JSON

@Usman_Waheed قام بالتحقق من هذا بشكل صحيح وإعدادك صحيح فعلاً، الـ URL هو n8n102 الصحيح و order_id يتحل بشكل جيد (ORD-018)، و 422 يصيب الطلبات المسلمة والقيد معاً، لذا ليس في مرشحك أو في تعيين البيانات الخاص بك، بل في نقطة نهاية priority-queue نفسها ترفض معرّفات طلبات صحيحة. عدة أشخاص آخرين عالقون في هذه الخطوة بالذات بدون حل فعال، لذا هي من جانب الأكاديمية، وليس خطأ منك. لا يجب أن يقفل التمرين العملي المسار بشكل كامل، لذا يجب أن تتمكن من المتابعة، وتستحق الإشارة إليها في منتدى n8n-academy حيث يقوم الفريق بإصلاح أخطاء القسم 2 الأخرى.