Hello, I am trying to write the current date and time (from a date and time node) into one of my google sheet rows. I try and drag it over as seen in the image, but it just turns red (this is a consistent issue I have). I can do a fixed string or I can bring it over from the time schedule. But the currentDate does not seem to work. I guess its two fold, why cant i do this, and why do things turn red?
The result always comes out undefined, and I dont really understand why.
I dont really understand. I have pass both the Date and Time 1 and If into this node and it is still coming up red for created time from the If node. Why can I not just drag this over?
Can you please share the whole workflow? I feel I’m missing something on my end here, sorry!
Tips on how to share your workflow
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>
Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!
To be honest, I actually think my issue could be something as simple as my node execution order, where the input date was ‘lower’ so the that exectued last.
I will tes this in more detai, but I think this could be what is causing the confussion.
But just to your earlier comment, when you referenced:
{{ $('Date & Time1').item.json.currentDate }}
Does this mean you can call a node (data) without passing it into the node?
If you drag and drop the pills from the left rather than typing expressions, you’re less likely to run into problems. Can you try that and let us know if that fixes things?
To be honest, I am a bit of a loss here, I dont undersand why I would need to write: {{ $node[“LastUpdate”].json[“LastUpdateDate”] }}. rather than {{ $json.LastUpdateDate }}
And I also dont know why I am not getting the correct data from the single item.
I think I undetstand that items wired directly do not need to have the node name called, but those in the chain, but wired before, need the node name - that makes sense.
The ‘if’ node in your screenshot will run 7 times independently, once for each item. If you want to compare the 6 items in the lower branch to the 1 item in the upper branch, you need a ‘merge’ node before the ‘if’ node. Set the ‘merge’ node to Combine → All possible combinations, assuming there will only ever be a single item in the upper branch. That should output 6 items, each with one date from the lower branch and the date from the upper branch included.
Would be great if you could share your workflow (or a simplified version) as gua suggested if you need any more help.