# Error: Missing pairedItem data

**URL:** <https://community.n8n.io/t/error-missing-paireditem-data/39875>\
**Category:** Questions\
**Created:** [7. Februar 2024 um 14:07 UTC](https://community.n8n.io/t/error-missing-paireditem-data/39875 "2024-02-07T14:07:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![seank1968](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/seank1968/32/4081_2.png) [@seank1968](https://community.n8n.io/u/seank1968)\
**Post date:** [7. Februar 2024 um 14:07 UTC](https://community.n8n.io/t/error-missing-paireditem-data/39875/1 "2024-02-07T14:07:20Z")

</div>

I have the following in a Code node - it creates a number of HTML links from a previous node - the output is then passed to a HTML node to be formatted. Later on, this HTML is added to the body of an Email node.

```auto
let htmlRows = "";

// called 'myNewField' to the JSON of each one
for (const item of $input.all()) {
  htmlRows += item.json.html;
}

return [{htmlRows:htmlRows}];

```

The HTML is generate fine and appears in the preview of the email node - but I get the error: Missing pairedItem data (node ‘Code’ probably didn’t supply it) when the email tries to send.

This was working fine in an older 0.2 install - I’m trying to migrate it to 1.20.0 which is where the error is.

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [7. Februar 2024 um 14:07 UTC](https://community.n8n.io/t/error-missing-paireditem-data/39875/2 "2024-02-07T14:07:21Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [8. Februar 2024 um 13:37 UTC](https://community.n8n.io/t/error-missing-paireditem-data/39875/3 "2024-02-08T13:37:18Z")

</div>

Hey @seank1968,

You may find this page handy: [Item linking in the Code node | n8n Docs](https://docs.n8n.io/data/data-mapping/data-item-linking/item-linking-code-node/) or this [Item linking errors | n8n Docs](https://docs.n8n.io/data/data-mapping/data-item-linking/item-linking-errors/#errors-when-using-the-code-node)

The code node would need to output the paired item index for each input as well so you can continue referencing data from earlier nodes.

---

<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:** [8. Mai 2024 um 13:37 UTC](https://community.n8n.io/t/error-missing-paireditem-data/39875/4 "2024-05-08T13:37:21Z")

</div>

Geschlossen, am 8. Mai 2024 um 13:37 UTC

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