# \[Bug\] Nodes can't Input 2+ nodes back

**URL:** <https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223>\
**Category:** Questions\
**Tags:** core, data-transformation, node, workflow-building\
**Created:** [October 30, 2023, 1:18pm UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223 "2023-10-30T13:18:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Lourd](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kevin_lourd/32/31454_2.png) [@Kevin\_Lourd](https://community.n8n.io/u/Kevin_Lourd)\
**Post date:** [October 30, 2023, 1:18pm UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223/1 "2023-10-30T13:18:09Z")

</div>

## Describe the problem/error/question

When I edit a node,  
When I choose the Input of that Node  
When I select a “2 nodes back” input  
Then it does not save with this input.

Instead, it always saves with the “1 node back” input.

## What is the error message (if any)?

## Please share your workflow

{  
“meta”: {  
“instanceId”: “b14cfa157861b83637cb9723041071ab605725e767e436e60afbfad0f5c00eea”  
},  
“nodes”: [  
{  
“parameters”: {  
“rule”: {  
“interval”: [  
{  
“field”: “cronExpression”,  
“expression”: “0 1 \* \* SAT”  
}  
]  
}  
},  
“id”: “661a43a1-68ca-46a4-b528-5719c0ece44a”,  
“name”: “Schedule Trigger”,  
“type”: “n8n-nodes-base.scheduleTrigger”,  
“typeVersion”: 1.1,  
“position”: [  
580,  
260  
]  
},  
{  
“parameters”: {  
“method”: “POST”,  
“url”: “=[https://api.browse.ai/v2/robots/](https://api.browse.ai/v2/robots/){{ $json.robot\_id }}/tasks”,  
“sendHeaders”: true,  
“headerParameters”: {  
“parameters”: [  
{  
“name”: “Authorization”,  
“value”: “Bearer 5c4a0ffb-3a7d-4e6e-94f8-7dca87b2a396:07288f5b-5b80-48b5-b2dd-bb287c74076c”  
}  
]  
},  
“sendBody”: true,  
“bodyParameters”: {  
“parameters”: [  
{  
“name”: “item\_list\_limit”,  
“value”: “5000”  
}  
]  
},  
“options”: {}  
},  
“id”: “2bbfc8c2-fe3f-4d5f-b1cf-dca8294f4989”,  
“name”: “HTTP Request”,  
“type”: “n8n-nodes-base.httpRequest”,  
“typeVersion”: 4.1,  
“position”: [  
1340,  
260  
]  
},  
{  
“parameters”: {  
“mode”: “raw”,  
“jsonOutput”: “{\n "robot\_id": "3010386b-b7fe-4c6a-8914-814bc8bec1eb"\n}”,  
“include”: “none”,  
“options”: {}  
},  
“id”: “f645557b-5afd-4c40-adad-1fd6d30d48e1”,  
“name”: “Edit Fields”,  
“type”: “n8n-nodes-base.set”,  
“typeVersion”: 3.2,  
“position”: [  
1160,  
260  
]  
},  
{  
“parameters”: {  
“operation”: “delete”,  
“tableId”: “browse\_ai\_responses”,  
“filters”: {  
“conditions”: [  
{  
“keyName”: “id”,  
“condition”: “gt”,  
“keyValue”: “0”  
}  
]  
}  
},  
“id”: “59f22852-558a-4119-9641-6739c89ab253”,  
“name”: “Supabase”,  
“type”: “n8n-nodes-base.supabase”,  
“typeVersion”: 1,  
“position”: [  
980,  
260  
],  
“alwaysOutputData”: true,  
“credentials”: {  
“supabaseApi”: {  
“id”: “ue8AKSsRQvX00P2U”,  
“name”: “Supabase account”  
}  
}  
}  
],  
“connections”: {  
“Schedule Trigger”: {  
“main”: [  
[  
{  
“node”: “Supabase”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Edit Fields”: {  
“main”: [  
[  
{  
“node”: “HTTP Request”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Supabase”: {  
“main”: [  
[  
{  
“node”: “Edit Fields”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
}  
}  
}

```auto
(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.)

```

## Share the output returned by the last node

## Information on your n8n setup

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

---

<div class="post-metadata">

**Author:** ![nico-kow](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/nico-kow/32/31285_2.png) [@nico-kow](https://community.n8n.io/u/nico-kow)\
**Post date:** [October 30, 2023, 1:34pm UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223/2 "2023-10-30T13:34:00Z")

</div>

Hey @Kevin_Lourd,  
welcome to the community. Here is the workflow of yours.

Even though I really don’t understand what is not working like you would have had expected. Maybe you can share some screenshots.

---

<div class="post-metadata">

**Author:** ![Kevin\_Lourd](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kevin_lourd/32/31454_2.png) [@Kevin\_Lourd](https://community.n8n.io/u/Kevin_Lourd)\
**Post date:** [October 30, 2023, 2:51pm UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223/3 "2023-10-30T14:51:03Z")

</div>

Thanks for your quick help @nico-kow!

 ![Screenshot 2023-10-30 at 15.48.52](https://europe1.discourse-cdn.com/n8n/original/3X/0/1/01c8eccef69a8949d80607250dd78ae34704b8d6.jpeg)

When I select “Schedule Trigger” (2 node back) and leave the Edit of this Node, then it doesn’t save. Instead when I reopen the Edit I see that the Input is always back to Supabase (1 node back)

Maybe it is a feature and not a bug 😉

Is my issue clearer now?  
Thanks!

---

<div class="post-metadata">

**Author:** ![nico-kow](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/nico-kow/32/31285_2.png) [@nico-kow](https://community.n8n.io/u/nico-kow)\
**Post date:** [October 30, 2023, 3:22pm UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223/4 "2023-10-30T15:22:05Z")

</div>

Okay I see @Kevin_Lourd,

this is acutally normal behaviour. With that you don’t define the input of that node. You have access to all results of all nodes before. You can think of this as a visual helper to find the data you want and need to access. In the following example you can see that the Result Node has access to all results (outcomes) before.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/9/8/988e4cbe76196b6cab2802d12955e8552b6a1456.png)

Cheers.

---

<div class="post-metadata">

**Author:** ![Kevin\_Lourd](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kevin_lourd/32/31454_2.png) [@Kevin\_Lourd](https://community.n8n.io/u/Kevin_Lourd)\
**Post date:** [October 31, 2023, 9:02am UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223/5 "2023-10-31T09:02:29Z")

</div>

@nico-kow is there a functional solution within a Code node as well?

I tried the same syntax as you mentions in a Code node but get an error in that case

```auto
let str = $('Supabase').item.json.item_visible;

```

 ![Screenshot 2023-10-31 at 10.01.03](https://europe1.discourse-cdn.com/n8n/original/3X/3/1/317c69db019caf2ec5abcab015288b40f8b97015.jpeg)

---

<div class="post-metadata">

**Author:** ![nico-kow](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/nico-kow/32/31285_2.png) [@nico-kow](https://community.n8n.io/u/nico-kow)\
**Post date:** [October 31, 2023, 10:13pm UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223/6 "2023-10-31T22:13:09Z")

</div>

Hey @Kevin_Lourd,

this is a little more complex because we need to handle mulitple items in code by ourselfs. This is because it is possible that your _Supabase_ Node returned multiple items and in code you have access to all of them, not just for the current item you want to transform.

Therefore the code which should work for you is something like this (this will not work directly, because you don’t define the items):

```auto
let str = $('Supabase').all()[items.indexOf(item)].item.json.item_visible;

```

If your supabase node is just returning one item then you could use this line which will work directly:

```auto
let str = $('Supabase').first().item.json.item_visible;

```

Here is a workflow which shows the dataflow from node to node and how to handle this in the code nodes. It is based on your example.

Cheers.

---

<div class="post-metadata">

**Author:** ![Kevin\_Lourd](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kevin_lourd/32/31454_2.png) [@Kevin\_Lourd](https://community.n8n.io/u/Kevin_Lourd)\
**Post date:** [November 2, 2023, 1:22pm UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223/7 "2023-11-02T13:22:58Z")

</div>

It is working beautifully, thank you!

---

<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:** [January 31, 2024, 1:23pm UTC](https://community.n8n.io/t/bug-nodes-cant-input-2-nodes-back/32223/8 "2024-01-31T13:23:03Z")

</div>

Closed on January 31, 2024, 1:23pm UTC

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