Can't get AI agent to read my json properly

:white_check_mark: Describe your goal clearly – What problem are you trying to solve?
I have a google spreadsheet doc where I want to read 3 different table spreadsheets from. Since for the standard AI tools agent you can only specify 1 spreadsheet in a doc, I’ve created a sub workflow which reads all 3 spreadsheets seperately, and then brings them into 1 correctly formatted JSON using Code node + JS:

In my main workflow I have an AI agent which this JSON should be passed to, and each of the 3 data parts should be used for a prompt. I refer to it using the standard json expression.

My Problem:
Already in the view where the prompt is defined, the last two parts (characters and existing_stories) are marked red, so it does not seem to be referenced correctly. This can also be seen in the execution of the AI agent.
I have 2 problems there:

  1. the contents from the first part (series_info) are only referenced as [object Object],[object Object], etc.
  2. the last two parts (characters and existing_stories) are completely empty

Unfortunately, when I try to resolve this with AI, I just go round in circles. Can someone perhaps help me to solve this? It doesn’t necessarily have to happen with the sub workflow

Surely can help if you can share your workflow, sometimes the errors are not initiated from the previous nodes