I have a two step automation that triggers from an email received (Gmail) and writes to a Google sheet.
In the Google sheet step, I am cutting the datestring out of the ISO datetime as follows:
{{ $json.date.split('T')[0] }}
I get a preview of the correct output value like 1/18/2024 as expected. I also see the expected value in the target spreadsheet when I run “Test Step” by itself.
However, when I run the pipeline from the canvas via “Test Workflow”, the value comes through blank.
This is my first time using n8n and I don’t know how to debug this effectively.
What is the error message (if any)?
Please share your workflow
Share the output returned by the last node
I’ve also noticed a discrepancy between the single step run and the workflow run as follows:
If I drop the split expression, ie a simple {{ $json.date }}, i get the following results:
Single step: 2024-01-18T20:00:00.000Z
Whole workflow: “2024-01-18T20:00:00.000Z”
Thanks @Jon I tried that but still seeing the same result. It works as expected when I run the append sheet step in isolation, but when I run the whole workflow, that cell is blank.
Any idea why the output might be diverging running as a single step vs the workflow?
I know we have had issues in the past where something is different when ran in the front end and when in the background this could be another example of that.
What about doing it the other way and going with {{ $json.date.toString().split('T')[0] }}? I do have a dev ticket open somewhere for a similar issue so it could be that when that is fixed this will also be fixed, I will do some testing later today and see if I can reproduce this.