Hi n8n/Make Community,
I’m encountering a persistent issue with image handling in my automation workflow and would greatly appreciate some guidance from someone experienced with file operations, especially involving Google Drive and image generation.
My Workflow Overview:
My scenario automates the generation and posting of content to LinkedIn (and eventually Instagram/Twitter). The core flow for image handling is as follows:
-
Idea Generation: A custom module (Idea Generator
, ID 4) creates content ideas, including a textual description of an image.
-
Image Generation: An OpenAI Image
module (ID 5) takes this textual description and generates an image.
- Crucial Point: The
OpenAI Image
module’s output for the image is b64_json
(Base64-encoded binary data), not a direct URL.
- Base64 to File Conversion: A
Convert to File
module (ID 6) takes the b64_json
output from OpenAI and converts it into a binary file object.
- Input:
{{ 5.data[0].b64_json }}
- Output:
6.data
(a binary file object)
- Save Image to Google Drive: A
Save Image
module (ID 7) uploads this binary file object (6.data
) to Google Drive. This module successfully provides id
, webContentLink
, and webViewLink
in its output.
- Input:
{{ 6.data }}
- Output includes:
7.id
, 7.webContentLink
, 7.webViewLink
The Problematic Part - Auto Posting Branch:
In my “Auto Posting” branch, after fetching the post content (Get Ready Posts
, Pick One
):
-
I previously had a Download Image
module (ID 10) that was supposed to download the image from Google Drive.
-
The original error was “Not a valid Google Drive File URL” or “ERROR: File parameter’s value is invalid. This is likely because the URL entered is incorrect.”
-
I attempted to configure the Download Image
module’s File
field using:
{{ 7.id }}
(when File
method was By ID
)
{{ 7.webContentLink }}
(when File
method was By URL
)
- In both cases, I consistently received
[ERROR: invalid syntax]
or invalid syntax
messages in the module’s output, even when the variable was seemingly correctly placed. It seems like the module wasn’t interpreting the variable correctly, or it was expecting a different type of input despite setting “Expression”.
Current Situation & What I’ve Tried:
-
My workflow sporadically worked in the past, allowing me to post images to LinkedIn, but now it consistently fails to upload the image.
-
I can only get it to work if I manually select a specific image file from Google Drive in the Download Image
module, which defeats the automation purpose.
-
My goal is to dynamically pass the generated and uploaded image to the Publish Post
module (LinkedIn) so it can be attached to the post.
Please help a friend out that really wants to automated his Linked 
So you have a Download Image node where you are getting an error which says “Invalid syntax”, and the workflow fails with “Not a valid Google Drive File URL”.
This makes sense, because I am as confused about this expression as n8n is.
Me and n8n right now
What {{ 7.webContentLink }}
is supposed to mean? How is this a link? What is supposed to go there (the idea this would be a url link to the file you need to download. Where do you keep it in the workflow for this node to pick up?
Hi Jabbson, thanks for responding. The webViewLink and webContentLink do contain the image, but the solution was using {{ $node[“Save Image”].json.id }}.
I implemented this change and now my marketing automation is working perfectly. You can check the examples on my demo LinkedIn page. Do you think this is a solution you might have considered as well?
Now i have this error again in the download image node?
{
"errorMessage": "Referenced node is unexecuted",
"errorDetails": {},
"n8nDetails": {
"itemIndex": 0,
"runIndex": 0,
"parameter": "fileId",
"time": "29-7-2025, 10:59:24",
"n8nVersion": "1.102.4 (Self Hosted)",
"binaryDataMode": "default",
"cause": {
"__rl": true,
"value": "={{ $node[\"Save Image\"].json.id }}",
"mode": "id"
},
"stackTrace": [
"ExpressionError: Referenced node is unexecuted",
" at WorkflowDataProxy.getNodeExecutionData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-workflow@file+packages+workflow/node_modules/n8n-workflow/src/workflow-data-proxy.ts:405:11)",
" at WorkflowDataProxy.getNodeExecutionOrPinnedData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-workflow@file+packages+workflow/node_modules/n8n-workflow/src/workflow-data-proxy.ts:350:16)",
" at Object.get (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-workflow@file+packages+workflow/node_modules/n8n-workflow/src/workflow-data-proxy.ts:508:34)",
" at Proxy.eval (eval at getFunction (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]/node_modules/@n8n/tournament/src/FunctionEvaluator.ts:13:16), <anonymous>:6:66)",
" at FunctionEvaluator.evaluate (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]/node_modules/@n8n/tournament/src/FunctionEvaluator.ts:20:13)",
" at Tournament.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]/node_modules/@n8n/tournament/src/index.ts:45:25)",
" at evaluateExpression (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-workflow@file+packages+workflow/node_modules/n8n-workflow/src/expression-evaluator-proxy.ts:20:9)",
" at Expression.renderExpression (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-workflow@file+packages+workflow/node_modules/n8n-workflow/src/expression.ts:332:29)",
" at Expression.resolveSimpleParameterValue (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-workflow@file+packages+workflow/node_modules/n8n-workflow/src/expression.ts:311:28)",
" at resolveParameterValue (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-workflow@file+packages+workflow/node_modules/n8n-workflow/src/expression.ts:503:16)"
]
}
}
First of all you cant use numbers as variable names like 5, 6 or 7 in your download node. You need to use a proper variable name and then reference the id instead of trying to use the id directly as a variable.
Dont use the $node expression ({{ $node["Save Image"].json.id }}), instead reference previous node with {{ $(“Save Image”).json.id }}. Which node is giving this error?
Please can you share your workflow in a code block so I can check some node properties and help you fix the issue
Hi Wouter,
See below the code blocks. The node that is giving the error is download image. I also have an error in my perplexity research. I have set up the correct credentials but after 1 or 2 times it falls out again. Nevertheless the automation is still working with an error in the perplexity node.
Code Block Workflow
Code Block Perplexity
Look forward to your reaction
Jim
Hi @jimvlieger
you cannot reference a node which wasn’t in the path of the execution. Your workflows are not connected, which makes it impossible for the Download Image node to reach Save Image node.
If they are logically connected (they are the same workflow) - you just connect them, if they are not - you dont.
If you have to share the data - use database or other type of data storage, like Google Sheet. I see you already are storing something in Google Sheets after the Save Image node - so you can save the ID there and before you use the Download Image you also read the same Sheet. So, why not use it for storing that information, then your workflows will have a way to communicate.
Hi Jabbson,
Which value from the Saved Post to add in the download image node. I tried the image: {{ $(‘Idea Generator’).item.json.output.image }} but that one is not working
which ever value you are looking to re-use in the other workflow.
how is it not working exactly?
For your perplexity issue, just use the perplexity node.
Then to fix the main issue. When you save the generated image to Google drive, you will get a file ID back from the Save node. YOU HAVE TO SAVE THIS TO YOUR SHEET for later retrieval. So add a file_id column to your google sheet so you can store the file id to download in your secord step. You cannot reference nodes which are not connected and never ran in the same execution.
Then in your second step where you attempt to download the file, simply use the google drive file id you stored in the excel to retrieve the file
1 Like
Wouter,
Thanks a lot!! The workflow is working correctly and the save image and download image node are connected and I see the overview in my google docs. Thank you so much.
One last question.
I receive an error in my Perplexity node and I think the reason is an empty query in my workflow perplexity research? If I compare your screens than I see activity in that query and mine is empty..
Look forward to your reacton.
Jim
Oh I forgot to tell you to fix the tool sub node below your agent. Click this magic button and the agent will figure out what value to send to the perplexity workflow
If the above solution worked for you, please mark my answer as the solution
1 Like
I will mark it as a solution.
What should I fill in here?
How did you get that test dialog? You can just dismiss it maybe and see whether it states the model will auto fill the field. What version of n8n are you running?
Here is the node if you want to copy it
1 Like
Oh wait I see you clicked the Execute step on the tool call. You dont have to do that. Just dismiss that test and run it from you main workflow.
1 Like
Cheers mate! Your help is much appreciate. I’m looking for the button to mark your answer as the right solution.. can’t find it.. Let me know and I will do it!
Thanks again 
There should be a solution option below the post I sent to mark it
That button is hidden or something (look screen example). I have looked to all your previous post but no solution mark button at the end. I will ask n8n if they will solve it asap.