N8N Academy, error de problema en pedido

Describe the problem/error/question

I reach this stage: Hands-on Exercise: Building an API Integration Pipeline Step 2.5: Send enterprise orders to priority queue. After execute the entire workflow, below error came out.

What is the error message (if any)?

Your request is invalid or could not be processed by the service [item 0]

Invalid order_id. Please ensure you are sending the correct order_id

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -32,
        112
      ],
      "id": "fee606ca-797e-47d8-af47-b655ffdc8fe1",
      "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": "1d6f2263fd81b44480a5486782c87be0"
            }
          ]
        },
        "options": {
          "pagination": {
            "pagination": {
              "parameters": {
                "parameters": [
                  {
                    "name": "page",
                    "value": "={{ $pageCount + 1 }}"
                  }
                ]
              }
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        208,
        0
      ],
      "id": "f46e1a0c-072f-487b-ae64-de7188cb4bc4",
      "name": "GetOrders",
      "credentials": {
        "httpHeaderAuth": {
          "id": "IZ1z1MYLBwpoKx2J",
          "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": "1d6f2263fd81b44480a5486782c87be0"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        208,
        224
      ],
      "id": "7e000a51-f7f0-4e57-b93b-8f858f077833",
      "name": "GetCustomers",
      "credentials": {
        "httpHeaderAuth": {
          "id": "IZ1z1MYLBwpoKx2J",
          "name": "n8n Academy API Key"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "fieldsToMatchString": "customer_id",
        "joinMode": "enrichInput1",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        432,
        112
      ],
      "id": "c09f91fd-fd86-414e-a24f-5e56aa38d9c2",
      "name": "MergeOrdersCustomers"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "enriched_orders",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        640,
        112
      ],
      "id": "47ffb582-3bbc-40af-97af-d8c4546c2d6e",
      "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": "1d6f2263fd81b44480a5486782c87be0"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "enriched_orders",
              "value": "={{ $json.enriched_orders }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        880,
        112
      ],
      "id": "d80c1831-d69a-42da-bc3a-7e646393475d",
      "name": "SendToOrdersQueue",
      "credentials": {
        "httpHeaderAuth": {
          "id": "IZ1z1MYLBwpoKx2J",
          "name": "n8n Academy API Key"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "d9ae70e7-274b-47c6-a87d-5469702d4b8a",
              "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": [
        624,
        336
      ],
      "id": "1c1e831c-ebb1-45d9-b560-acfea9bc2cbf",
      "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": "13963a78-1120-4e9e-bcc2-6485b63107ab"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "North"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 3
                },
                "conditions": [
                  {
                    "id": "ff9f6d08-d005-416f-8e0f-8460d894a709",
                    "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": "cfa065fc-5a61-40b9-a7b9-6a348dcdbd75",
                    "leftValue": "={{ $json.region }}",
                    "rightValue": "east",
                    "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": "b1a239e1-bbe9-4f6e-b986-533415c4a262",
                    "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": [
        832,
        432
      ],
      "id": "e2ecffd6-dcd7-4625-9abd-8400e0fd75a2",
      "name": "RouteByRegion"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 3
          },
          "conditions": [
            {
              "id": "1a49d28e-2cf9-4ea4-a355-c85a6f146ae0",
              "leftValue": "={{ $json.status }}",
              "rightValue": "delivered",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.3,
      "position": [
        1120,
        320
      ],
      "id": "606971a9-c796-4cb8-8ffc-af10dfbce473",
      "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": "1d6f2263fd81b44480a5486782c87be0"
            }
          ]
        },
        "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": [
        1328,
        320
      ],
      "id": "02e77179-3856-4454-88dc-c391ae6ebcde",
      "name": "SendToPriorityQueue",
      "credentials": {
        "httpHeaderAuth": {
          "id": "IZ1z1MYLBwpoKx2J",
          "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": "bed2988fb684ee16b2cfbdee45dcd5e341307ecfd375cd84c432f4ed9cece2d3"
  }
}

Share the output returned by the last node

Error code

422

Full message

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

Request

{ "body": { "order_id": "ORD-037", "customer_id": "CUST-007", "company_name": "Summit Enterprises", "subscription": "Enterprise" }, "headers": { "x-assessment-id": "1d6f2263fd81b44480a5486782c87be0", "**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 }

Information on your n8n setup

    1. n8n version: 2.15.0
    2. Database: SQLite (default)
    3. EXECUTIONS_PROCESS setting: main
    4. Running n8n via: Docker (on Zeabur)
    5. Operating system: Linux (Ubuntu 24, Zeabur hosted)

Estoy atrapado en este mismo error, jaja. ¿Cómo resolverlo?

Tengo exactamente el mismo problema

¿lo resolviste? estoy atascado con el mismo error

@nicknock @evanmoo @Vonn_Villasor este es un bug que muchos están experimentando

@jamiemadden_n8n

Hola a todos,

Por favor, verifica que tus parámetros no tengan espacios antes o después del nombre de la variable. Podría ser difícil verlo en la interfaz de usuario.

Saludos,

Verifiqué dos veces y recreé todo el flujo de trabajo dos veces tanto en la nube como en auto-hospedado. Devuelve el mismo error en la solicitud POST para este nodo específico. Es exactamente igual que el tutorial de la academia, aún así el backend devuelve Invalid order_id.

Tengo los mismos dos problemas aquí en N8N102 (actualmente atascado en 63%, necesito 70% para el certificado):slight_smile:

  1. La sección 1 priority-queue es el error que mencionó @achamm. Devuelve 422 “Invalid order_id” para cada pedido empresarial. Probé directamente contra el endpoint y confirmé: un order_id REAL, uno FALSO y una cadena VACÍA devuelven todos el error idéntico “Invalid order_id” — así que el conjunto de validación parece estar vacío para mi evaluación. El order_id de /orders está limpio (sin espacios en blanco), así que la solución alternativa de “espacios adicionales” no se aplica aquí. orders-queue funciona bien (orders_queued: 50). Esto bloquea tanto la evaluación de Priority Orders Queue como la de Finalization.

  2. Mi Hands-on de la Sección 2 (Webhooks) está completamente aprobado — las cuatro evaluaciones muestran 1.0/1.0 en la página del ejercicio (Secure Webhook, Data Storage, Order Processing, Processing Pipeline; “All Tests Passed”). Pero no cuenta para mi calificación: en la página de Progreso la calificación “n8n Workflow” sigue siendo 33.33% (solo Sección 1) y la Sección 2 no aparece en Graded Scores. Parece ser un problema de sincronización del libro de calificaciones.

ID de Evaluación: 34513bee…982bf9 (ID completo disponible bajo solicitud). ¿Podría el equipo por favor reparar el endpoint priority-queue y/o sincronizar la calificación de la Sección 2? ¡Gracias!

Hey everyone,

I am experiencing the same bug on Step 2.5 of the N8N102 course that others have mentioned recently.

My SendToPriorityQueue node is throwing a 422 - "Invalid order_id" error, even though the order ID being sent is valid (e.g., ORD-005).

I have verified my workflow setup:

  • Data mapping is correct (={{ $json.order_id }}).
  • The BatchPriorityOrders loop is properly closed.
  • Batch size is correctly set to 5.

Here are screenshots showing the error:

And here is my workflow code for reference:

@jamiemadden_n8n @testn8n_Santiago
Thanks @jamiemadden_n8n and the team for looking into this bug.

Hola,

¡Encontré el error, ya ha sido corregido! ¡Inténtalo de nuevo!

¡Saludos,