Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
That implies to any JSON output you would like to share with us.
The reference of an item in the previous nodes (not immediately preceding the current one) by means of .item. is the default one. It implies an automatic inference of the linked item. It normally works fine until the data flow gets split with nodes like If and Switch or Merged. In this case n8n might need some help from you to point out at the actual item in the node prior the data branching.
The solution would be using the methods like first(), last(), etc. You still could use .item. but you need to make sure there is no data splitting between the current and the referenced nodes. That also might imply passing the data you need to that referenced node from the actual source of the data.
If you want to dig deeper into the mechanism of the linked items you can read the following docs: