N8N102 第2部分實作練習的修正

大家好,

我正在進行 N8N102 課程,進行到第 2 部分的實作練習。

我發現了說明中的一些錯誤,這些錯誤可能來自於舊版基礎課程。

  1. webhook 測試器在第 1 次執行時為 total 發送了無效的字符串而非數字。這會導致工作流程無法正確執行,除非勾選「在需要時轉換類型」選項。

  2. 在調用的子工作流程的「InsertOrder」節點中,我認為「status」應該設置為「received」。我嘗試用「processed」狀態調用 ProcessingAPI,但收到了「failed」狀態的回應。

  3. 「CallProcessingAPI」webhook URL 是 https://learn.app.n8n.cloud/webhook/course/foundations/process-order。它應該是 https://learn.app.n8n.cloud/webhook/course/n8n102/process-order

  4. 完成步驟 3 後,步驟 2 的測試似乎不再通過。我想檢查全部 3 個測試單元是否都通過了,但必須將主工作流程恢復到之前發佈的版本才能通過。

你好,

感謝你指出這些問題。

  1. 這個已經修復了
  2. 這個已經更新了
  3. 這個已經更新了。
  4. 從第 3 步開始的完整工作流程應該能在所有測試中正常運作,我剛剛測試了我的版本,它通過了全部 3 個步驟。

乾杯,

嘿,

感謝你的幫助!我在測試 Webhook Tester 的第一步時,仍然收到相同的「Wrong type: ‘1’ is a string but was expecting a number [condition 1, item 0]」錯誤。

以下是我的前兩個節點:

我想不出這個節點運作所缺少的部分 :sweat_smile:

你好,

我已複製你的兩個節點,並在之後新增了所需的 webhook 回應節點,目前運作順利。我們的測試人員正在傳送正確的型別。

你能否提供傳送到你端點的完整日誌,以便我檢查?

謝謝,

你好,能麻煩你幫忙嗎?我無法進行到第 1 步之後。這是我得到的錯誤

這是我的工作流程的樣子:

[
{
“headers”: {
“host”: “mbakari.app.n8n.cloud”,
“user-agent”: “n8n”,
“content-length”: “46”,
“accept”: “application/json,text/html,application/xhtml+xml,application/xml,text/;q=0.9, image/;q=0.8, /;q=0.7”,
“accept-encoding”: “gzip, br”,
“cdn-loop”: “cloudflare; loops=1; subreqs=1”,
“cf-connecting-ip”: “4.184.78.241”,
“cf-ew-via”: “15”,
“cf-ipcountry”: “DE”,
“cf-ray”: “a1188fed6cb2bb61-FRA”,
“cf-visitor”: “{“scheme”:“https”}”,
“cf-worker”: “n8n.cloud”,
“content-type”: “application/json”,
“x-api-key”: “pFT1jtDoVHAmVan$7eb6”,
“x-forwarded-for”: “4.184.78.241, 172.68.192.157”,
“x-forwarded-host”: “mbakari.app.n8n.cloud”,
“x-forwarded-port”: “443”,
“x-forwarded-proto”: “https”,
“x-forwarded-server”: “traefik-prod-users-swc-20-df7569f7f-6tb77”,
“x-is-trusted”: “yes”,
“x-real-ip”: “4.184.78.241”
},
“params”: {},
“query”: {},
“body”: {
“order_id”: “1”,
“total”: “1”,
“customer_id”: “1”
},
“webhookUrl”: “https://mbakari.app.n8n.cloud/webhook-test/course/n8n102/new-order”,
“executionMode”: “test”
}
]

同樣的問題,無法繼續,因為 400 不會返回任何東西

天啊!他們會修好嗎?我們卡住了嗎?我們該怎麼辦?

更新:n8n 團隊已經修復了此問題,所以不再需要此技巧。

各位好,

我遇到了相同的問題,但找到了這個解決方法,這樣我們就可以完成第 2 和第 3 部分,避免浪費這個週末等待官方修復。希望您覺得有幫助。

我們可以在不先完成第 1 步的情況下啟用「執行第 2 步測試」按鈕。

結果:

我發現這個地方有個錯誤,開發人員可以修復這個問題嗎?無法通過課程!Screenshot 2026-06-26 081127|690x366

我卡在了 SendToPriorityQueue 節點,我今天花了一整天嘗試修復它,但我無法通過這一點,這正在永久阻礙我在課程中的進度。發送完整的 json 和錯誤文字如下

完整 JSON:
{
“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”
}
}

錯誤輸出: *****
{
“errorMessage”: “您的請求無效或無法由服務處理 [項目 0]”,
“errorDescription”: “無效的 order_id。請確保您發送的是正確的 order_id”,
“errorDetails”: {
“rawErrorMessage”: [
“422 - "{\"error\":\"無效的 order_id。請確保您發送的是正確的 order_id\"}"”
],
“httpCode”: “422”
},
“n8nDetails”: {
“nodeName”: “SendToPriorityQueue”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.4,
“itemIndex”: 0,
“time”: “2026 年 6 月 26 日 下午 6:29:18”,
“n8nVersion”: “2.22.5 (自主託管)”,
“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"
]
}
}

我也有完全相同的問題

我遇到了同樣的問題,請幫忙修復

有遇到訂單問題錯誤的人可以移到這裡嗎?N8n: N8N102 Integrations: APIs & Connected Workflows - #5 by achamm

大家好,

很抱歉延遲了,這是一個非常有趣的臭蟲,花了一段時間才追蹤、修復和測試。現在已經修復了。

乾杯,

嗨 Jamie,

非常感謝你的後續跟進!我可以看到現在所有執行都正確通過了。

如果已實施步驟 2 和 3,Webhook 測試器在步驟 1 仍會失敗。webhook 回應與預期回應不符,傳送

{ 
"order_id": 
"VALIDURL-TEST",
   
"processing_result": 
"processed",
  
"processed_at": 
"\"2026-06-28T06:48:25.712Z\"",
  
"stored": 
"true",
  
"stored_order": 
"{\"order_id\":\"VALIDURL-TEST\",\"customer_id\":\"VALIDURL-TEST\",\"total\":0,\"status\":\"processed\",\"received_at\":\"2026-06-27T19:42:24.838Z\",\"processed_at\":\"2026-06-28T06:48:25.712Z\",\"id\":36,\"createdAt\":\"2026-06-27T19:42:24.846Z\",\"updatedAt\":\"2026-06-27T19:42:26.643Z\"}"
}

而不是預期的

{
  "status": "accepted",
  "order_id": "{{ $('WebhookNewOrder').item.json.body.order_id }}",
  "message": "Order received and queued for processing"
}

如果有人在完成練習的步驟 2 或 3 後需要透過 Webhook 測試器重新驗證他們的工作,他們將在步驟 1 驗證時卡住。

我不確定這是否需要更正,但我想提醒你注意這一點。

你得到解決方案了嗎

是的,但我真的記不太清楚了,有一件事是肯定的,我通過發送螢幕截圖並詢問解決方案或成功運行工作流程的替代方法來使用 ChatGPT/Gemini,然後就完成了