Dear n8n Support Team,
I am experiencing a persistent issue with a workflow on my n8n cloud instance ([your-instance-name].n8n.cloud, e.g., re-think-tank.app.n8n.cloud) where a Code node does not appear to be executing its script or receiving input, despite the preceding node seemingly outputting data to it.
Workflow Goal:
The overall goal is to automate daily trivia question generation using OpenAI, check against existing questions, format new questions, and store them in Firestore.
The Specific Problem:
The workflow proceeds successfully up to an “Edit Fields” (Set) node. The n8n canvas shows a “1 item” indicator on the connector leaving this “Edit Fields” node and entering the subsequent “Code” node. However:
-
When inspecting the Code node’s “INPUT” panel in the workflow editor (even after clicking “Execute previous nodes”), it shows “No input data yet.”
-
More critically, when running the entire workflow and checking the detailed Execution Logs for that run, there are no console.log() messages from the Code node , even when the very first line of the Code node’s script is a console.log() statement intended to log the received input. This indicates the Code node’s script is not being entered/executed.
-
The workflow visually “stops” at the Code node (no green checkmark, no data output indicators on the canvas).
Troubleshooting Steps Taken (Extensive):
-
Initial Problem with OpenAI Node: We initially used the dedicated “OpenAI” node (v1.8) which failed to produce output despite a valid API key and successful credential test.
-
Workaround with HTTP Request Node: We successfully configured an “HTTP Request” node to call the OpenAI API directly. This node successfully receives data from OpenAI (e.g., trivia questions in choices[0].message.content).
-
“Edit Fields” (Set) Node Added: To isolate the data passed to the Code node, an “Edit Fields” (Set) node was inserted after the HTTP Request node.
-
This “Edit Fields” node is configured with “Include Other Input Fields” OFF.
-
It’s set to create a single field, aiRawText.
-
Initially, its value was an expression to get data from the HTTP Request node (e.g., {{ $json.choices[0].message.content }}).
-
For debugging, this was simplified to a static string expression: {{ “TESTING 123” }}.
- Code Node Simplification: The Code node’s JavaScript was simplified to primarily log its input and attempt to access the aiRawText field:
Generated javascript
// Example of the simplified debug script in the Code node:
console.log("Code Node Input Item:", JSON.stringify($input.item, null, 2));
let rawText = null;
if ($input.item && $input.item.json && $input.item.json.hasOwnProperty('aiRawText')) {
rawText = $input.item.json.aiRawText;
console.log("Found aiRawText:", rawText);
} else {
console.log("aiRawText field NOT found in input.item.json");
}
// ... (outputs a dummy item based on whether rawText was found) ...
return items;
content_copydownload
Use code with caution.JavaScript
-
Execution Log Analysis: Despite the “Edit Fields” node showing a green checkmark and “1 item” on its output connector on the canvas during a full workflow run, no console.log messages from the Code node appear in the n8n Execution Logs for that run. The logs only show entries for nodes up to and including the “HTTP Request” node (and sometimes the “Edit Fields” node shows in the log list but without specific log messages from within its own operation if it doesn’t have console.logs).
-
Connection Re-creation: The connection between the “Edit Fields” node and the “Code” node was deleted and re-added, with no change in behavior.
-
Workflow Name: [Your Workflow Name, e.g., My workflow 2]
-
Relevant Execution ID (Example): [Provide an example Execution ID where this occurred, e.g., ID#41]
Current Workflow Structure (Simplified):
Schedule Trigger → Firestore (getAll) → HTTP Request (to OpenAI) → Edit Fields (Set) → Code → Firestore (create)
Hypothesis:
There appears to be an issue with how data is being passed from the “Edit Fields” (Set) node to the “Code” node, or how the Code node is being triggered/initialized with input, specifically on my n8n cloud instance. The canvas UI indicates data flow, but the Code node’s internal state (no input visible in editor) and lack of execution logs suggest it’s not receiving or processing any actual data item.
Help Needed:
Could you please help investigate why the Code node might not be receiving input or executing its script under these circumstances? Is this a known issue, a bug in the current cloud version, or something specific to my instance/workflow configuration that we’re overlooking?
I can provide the workflow JSON and screenshots if needed. We have confirmed API connectivity and basic data retrieval with the HTTP Request node. The problem seems localized to the “Edit Fields” → “Code” node interaction.
Thank you for your time and assistance.



