How to get a variable expression to resolve

We declared a variable and we set the value of that variable in a previous workflow and the sub workflow is not resolving the value of that variable when we use it in an expression. When we use the S3 node to download a file, it is not returning the file because it is not grabbing the value that the previous workflow set to. Even though on the input on the node, the variable appears with the correct value (file path to json)

When we manually set the file path in the node, the node downloads the file as expected. What do we need to do to get the value to resolve correctly?

Hi @Brian_Starfore Welcome to n8n :n8n: community :tada:

If you depend on a variable from a sub-workflow that is used in the main workflow, ensure that you enable the “Wait For Sub-Workflow Completion” option in the sub-workflow settings:

This option helps guarantee that the variable value is properly transferred before it is used in subsequent nodes…

Why is the variable expression not evaluating in the AWS S3 module?
We need the value of the variable that we declared to appear in the File Key for the AWS S3 node. When we execute the workflow, we can see the correct value in the variable, and the variable appears in the input of the node, but it evaluates to Empty in the node itself. Is this a bug?



We just figured this issue out. We did not see it in N8N’s documentation.
This is the correct string: {{ $json.$vars.Exercise_Results }}

So it was a syntax issue, to get it to resolve in the node. You need the $json in front. Thanks for all that helped us!