# Issues with the Sendorders in n8n Foundation course exercise

**URL:** <https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631>\
**Category:** Questions\
**Tags:** node\
**Created:** [July 1, 2026, 6:28am UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631 "2026-07-01T06:28:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![venu\_nair](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/venu_nair/32/180307_2.png) [@venu\_nair](https://community.n8n.io/u/venu_nair)\
**Post date:** [July 1, 2026, 6:28am UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631/1 "2026-07-01T06:28:35Z")

</div>

## Describe the problem/error/question

While sending Order to the n8n site, I get the below errors. I checked for spaces, calculations etc, but can’t find the error source. All my nodes are executing perfectly when done individually

## What is the error message (if any)? **Your request is invalid or could not be processed by the service.** Your order totals are incorrect. Please ensure you are calculating the totals correctly.

## Please share your workflow

```auto
{
  "nodes": [
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "6e58682d-4337-46a8-a36f-a6047502bfe7",
              "name": "order_id",
              "value": "={{ $json.order_id }}",
              "type": "string"
            },
            {
              "id": "2a009df0-7d77-43e6-9e91-a70e004bb17f",
              "name": "customer_name",
              "value": "={{ $json.customer_name }}",
              "type": "string"
            },
            {
              "id": "c36c31fc-c9a7-4dcb-8002-c7434369ea78",
              "name": "region",
              "value": "={{ $json.region }}",
              "type": "string"
            },
            {
              "id": "a6ad9769-cf53-4e2d-b27f-8869ec1506d3",
              "name": "status",
              "value": "={{ $json.status }}",
              "type": "string"
            },
            {
              "id": "ea21f188-1793-4fbc-80b4-14d080492695",
              "name": "order_total",
              "value": "={{Math.round($json.quantity * $json.unit_price)}}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        16,
        -112
      ],
      "id": "e5206f2a-e49f-4f97-a253-f42bbdee3f20",
      "name": "SetOrderTotals"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "orders",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        608,
        -320
      ],
      "id": "f4a9b2b7-cbb5-4092-adae-82a31b6faadf",
      "name": "AggregateOrders"
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C0BEZ3AKS9E",
          "mode": "list",
          "cachedResultName": "test"
        },
        "text": "=\"Sales pipeline complete. 50 orders processed, 38 delivered.\"\n\"North Order Total :\" {{ $json.region[0].average_order_total }}\n\"South Order Total:\" {{ $json.region[2].average_order_total }}\n\"West Order Total:\" {{ $json.region[1].average_order_total }}\n\"East Order Total:\" {{ $json.region[3].average_order_total }}",
        "otherOptions": {}
      },
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.5,
      "position": [
        816,
        -416
      ],
      "id": "27fbb4f2-ab2a-4977-bef1-5350b8a52c03",
      "name": "SendToSlack",
      "webhookId": "5a4cba28-edf6-40b0-b14f-d68952cccf47",
      "credentials": {
        "slackApi": {
          "id": "JsMFdrKSTabhvlb7",
          "name": "Slack account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://learn.app.n8n.cloud/webhook/course/n8n101/process-orders",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-assessment-id",
              "value": "dcaececa5196aa91d2a41fc5b5b53ec8"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "orders",
              "value": "={{ $json.orders }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        816,
        -224
      ],
      "id": "2a053049-1a4b-46f0-abf1-3787c72a1297",
      "name": "SendOrders",
      "credentials": {
        "httpHeaderAuth": {
          "id": "Ga9QOladMz18EL6I",
          "name": "n8n Academy API Key"
        }
      }
    },
    {
      "parameters": {
        "fieldsToSummarize": {
          "values": [
            {
              "aggregation": "sum",
              "field": "order_total"
            },
            {
              "field": "order_total"
            },
            {
              "aggregation": "average",
              "field": "order_total"
            }
          ]
        },
        "fieldsToSplitBy": "region",
        "options": {}
      },
      "type": "n8n-nodes-base.summarize",
      "typeVersion": 1.1,
      "position": [
        208,
        -320
      ],
      "id": "91cd6ef5-16d0-4ea0-89a6-b5d2499b1681",
      "name": "SummarizebyRegion"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "c271aab4-45e9-4cd8-bc1e-5fee1682718a",
              "name": "sum_order_total",
              "value": "={{ Math.round($json.sum_order_total *100)/100}}",
              "type": "number"
            },
            {
              "id": "8a43ca44-257c-4d5e-9240-396005282a88",
              "name": "count_order_total",
              "value": "={{ $json.count_order_total }}",
              "type": "number"
            },
            {
              "id": "4e9f85c6-ec6e-4a80-bd09-024fadd61c5f",
              "name": "average_order_total",
              "value": "={{ Math.round($json.average_order_total*100)/100 }}",
              "type": "number"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        416,
        -320
      ],
      "id": "ea9206a9-c0e7-4836-9194-9a07c0826961",
      "name": "Edit Fields"
    }
  ],
  "connections": {
    "SetOrderTotals": {
      "main": [
        [
          {
            "node": "SummarizebyRegion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AggregateOrders": {
      "main": [
        [
          {
            "node": "SendToSlack",
            "type": "main",
            "index": 0
          },
          {
            "node": "SendOrders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SummarizebyRegion": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AggregateOrders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "7134812ff1766ac00dec6d0b790eac6d9b713a9539f0e1c05a87cf2a2442a32d"
  }
}

Your request is invalid or could not be processed by the service
Your order totals are incorrect. Please ensure you are calculating the totals correctly.

```

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/3/d/3d6f1a9f30603e1c0cd61953ac310a4363e113cf.png)

## Information on your n8n setup

- **n8n version: Community**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system: Windows**

---

<div class="post-metadata">

**Author:** ![Swapnil\_Mandloi](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/swapnil_mandloi/32/174348_2.png) [@Swapnil\_Mandloi](https://community.n8n.io/u/Swapnil_Mandloi)\
**Post date:** [July 1, 2026, 7:36am UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631/2 "2026-07-01T07:36:14Z")

</div>

Hi Venu,

The error “Your order totals are incorrect” almost always points to an issue with the JSON payload format in your `SendOrders` (HTTP Request) node.

When you use `={{ $json.orders }}` in the value field, n8n often defaults to passing the data as a string, but the n8n Academy API endpoint specifically expects a **JSON Object** containing the array of orders.

**Here is how to fix it:**

1. **Change the Body Content Type:** In your `SendOrders` node, ensure the **Send Body** option is enabled, but look for an option like “JSON” or “Body Parameters” and ensure it isn’t forcing the data into a string format.

2. **Use the Expression Editor correctly:** In the **Value** field for your `orders` body parameter, try using an expression that forces the JSON object structure: `={{ JSON.stringify($json.orders) }}` or, better yet, if the node supports it, change the **Body Parameters** type to **JSON** and use `{{ $json.orders }}` directly without quotes.

3. **Check your `SetOrderTotals` node:** You are using `Math.round($json.quantity * $json.unit_price)`. Double-check that your input data doesn’t have hidden strings or null values. If `quantity` or `unit_price` are being interpreted as strings, the math might be failing silently or producing unexpected types. Try wrapping them in `Number()`: `={{ Math.round(Number($json.quantity) * Number($json.unit_price)) }}`

---

<div class="post-metadata">

**Author:** ![venu\_nair](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/venu_nair/32/180307_2.png) [@venu\_nair](https://community.n8n.io/u/venu_nair)\
**Post date:** [July 1, 2026, 8:29am UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631/3 "2026-07-01T08:29:02Z")

</div>

Hi Swapnil

Thankyou for such a prompt response. Let me explain what I did before I posted this issue

1. I checked all nodes if the data type for the order total is correct. it is set as numbers
2. In the Send Node,
  1. In body, the Body content type is JSON
  2. Specify Fields :  
Name: orders
  3. 

```
    Value: {{ $json.orders }}

```

All the nodes execute perfectly well without any errors.

I tried the Webhook too and there are no errors there.

The below is the webook result

{“orders”:[{“sum\_order\_total”:5348,“count\_order\_total”:16,“average\_order\_total”:334.25,“region”:“north”},{“sum\_order\_total”:2507,“count\_order\_total”:10,“average\_order\_total”:250.7,“region”:“west”},{“sum\_order\_total”:2353,“count\_order\_total”:14,“average\_order\_total”:168.07,“region”:“south”},{“sum\_order\_total”:2263,“count\_order\_total”:10,“average\_order\_total”:226.3,“region”:“east”}]}

---

<div class="post-metadata">

**Author:** ![kristinker](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kristinker/32/176408_2.png) [@kristinker](https://community.n8n.io/u/kristinker)\
**Post date:** [July 1, 2026, 12:50pm UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631/4 "2026-07-01T12:50:07Z")

</div>

Hi @venu_nair ,

You might need to compare your workflow with the instructions again, as I see your above branch has a bit more nodes than the previous time I did.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/8/0/803d853aafbfe5d91608b7544744a5d0eb748594.png)

---

<div class="post-metadata">

**Author:** ![Jaideep\_Satghare](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jaideep_satghare/32/178659_2.png) [@Jaideep\_Satghare](https://community.n8n.io/u/Jaideep_Satghare)\
**Post date:** [July 3, 2026, 8:52am UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631/5 "2026-07-03T08:52:19Z")

</div>

Hello All,

I am getting similar error for the same workflow which is share at the URL [Course | n8n Platform](https://apps.learn.n8n.io/learning/course/course-v1:n8n+N8N101+2026H2/block-v1:n8n+N8N101+2026H2+type@sequential+block@fe12797b7d1e4672b86a0bc29dbc1e09/block-v1:n8n+N8N101+2026H2+type@vertical+block@79b8c989829e4c26a39d3778b9da2700)

Following is my workflow and the error message.

Any help spotting the issue is much appreciated! 🙂

**Worklfow**

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/a/b/abc5c4e259fda54ac9f77c44a438ec45ed0c9a62.png)

**Workflow Code**

[Section 2 - Sales Data Pipeline.json](https://community.n8n.io/uploads/short-url/eioNZ0BldyHCFS7vd5ANUhBu0l4.json) (5.6 KB)

**Error Obtained in the last Node - SendOrders**

{  
“errorMessage”: “Your request is invalid or could not be processed by the service”,  
“errorDescription”: “Your order totals are incorrect. Please ensure you are calculating the totals correctly.”,  
“errorDetails”: {  
“rawErrorMessage”: [  
“422 - “{\“error\”:\“Your order totals are incorrect. Please ensure you are calculating the totals correctly.\”}””  
],  
“httpCode”: “422”  
},  
“n8nDetails”: {  
“nodeName”: “SendOrders”,  
“nodeType”: “n8n-nodes-base.httpRequest”,  
“nodeVersion”: 4.4,  
“itemIndex”: 0,  
“time”: “03/07/2026, 14:12:47”,  
“n8nVersion”: “2.27.5 (Self Hosted)”,  
“binaryDataMode”: “filesystem”,  
“stackTrace”: [  
“NodeApiError: Your request is invalid or could not be processed by the service”,  
" at ExecuteContext.execute (C:\Users\Jaideep Satghare\AppData\Roaming\npm\node\_modules\n8n\node\_modules\n8n-nodes-base\nodes\HttpRequest\V3\HttpRequestV3.node.ts:869:16)“,  
" at WorkflowExecute.executeNode (C:\Users\Jaideep Satghare\AppData\Roaming\npm\node\_modules\n8n\node\_modules\n8n-core\src\execution-engine\workflow-execute.ts:1067:8)”,  
" at WorkflowExecute.runNode (C:\Users\Jaideep Satghare\AppData\Roaming\npm\node\_modules\n8n\node\_modules\n8n-core\src\execution-engine\workflow-execute.ts:1367:11)“,  
" at C:\Users\Jaideep Satghare\AppData\Roaming\npm\node\_modules\n8n\node\_modules\n8n-core\src\execution-engine\workflow-execute.ts:1829:27”,  
" at C:\Users\Jaideep Satghare\AppData\Roaming\npm\node\_modules\n8n\node\_modules\n8n-core\src\execution-engine\workflow-execute.ts:2521:11"  
]  
}  
}

---

<div class="post-metadata">

**Author:** ![kristinker](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kristinker/32/176408_2.png) [@kristinker](https://community.n8n.io/u/kristinker)\
**Post date:** [July 3, 2026, 9:15am UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631/6 "2026-07-03T09:15:03Z")

</div>

Hi @Jaideep_Satghare, please check the configuration of your “SetOrderTotals” node’s “order\_total” field according to the instructions. I see it’s different.

Also, your issue is a bit different, so it’s worth opening another post so others can help you too, thanks.

---

<div class="post-metadata">

**Author:** ![Jaideep\_Satghare](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jaideep_satghare/32/178659_2.png) [@Jaideep\_Satghare](https://community.n8n.io/u/Jaideep_Satghare)\
**Post date:** [July 3, 2026, 9:43am UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631/7 "2026-07-03T09:43:06Z")

</div>

@kristinker , thank you for your reply. 😃

I intentionally modified the “order\_total” field using Math rounding function to force the integer conversion.

Nevertheless, I was able to find the issue it was a trailing space in the field name for order\_total. I was using "order\_total " instead of “order\_total”. I corrected it and it has worked fine.

Thank you for asking me to take a relook at the node. 😃

This issue can be closed as far as I am concerned. I will open a new thread in the future for similar issues.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 1, 2026, 9:43am UTC](https://community.n8n.io/t/issues-with-the-sendorders-in-n8n-foundation-course-exercise/301631/8 "2026-10-01T09:43:34Z")

</div>

Closed on October 1, 2026, 9:43am UTC

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