Google Calendar node fails with Luxon-formatted date from Google Sheets (works with hardcoded string)

Describe the problem/error/question

Hi everyone,

I’m trying to create a new event with the Google Calendar node in n8n, and I’m using Luxon to format the start and end times.

The strange part: when I use a hardcoded ISO date string, it works perfectly. But when I use the exact same string, coming from a Google Sheets Trigger, it fails — even though the output appears identical.

Example that works (hardcoded):

{{ DateTime.fromISO(“2025-09-13T09:00:00+02:00”).setZone(“Europe/Paris”) }}

// Result: [DateTime: 2025-09-13T09:00:00.000+02:00]

Example that does not work (from Google Sheets trigger):

{{ DateTime.fromISO($(‘Google Sheets Trigger’).item.json[‘Plage 1 début’]).setZone(“Europe/Paris”) }}
// Result: [DateTime: 2025-09-13T09:00:00.000+02:00]

What is the error message (if any)?

Even though both result in the same Luxon object, the second version causes the Google Calendar node to return:

“Bad request - please check your parameters” (Error code 400)

Please share your workflow

Google sheets data :

Plage 1 début
2025-09-13T09:00:00+02:00
Plage 1 fin
2025-09-13T12:30:00+02:00

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.107.4
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker (via Render.com blueprint)
  • Operating system: Ubuntu
1 Like

Hey @anna42 hope all is good. Welcome to the community.

Could you please pin the data in the Google Sheets Trigger node and share your workflow with us?

Hi @Sami_dac1 , the expression is valid as the Luxon object creates properly. The porblem is that if the object is created using a hard-written script, the request to Google Calendar works. If the datetime object is created using a variable with the very same value (I double checked and I can preview the value of the Luxon DateTime object), the request doesn’t work.

@jabbson here it is:

Is there a way to debug the actual HTTP requests sent by the n8n Node (with self hosting)? I’d be eager to check what exactly is sent to Google, perhaps the Google Sheet value is not properly injected into the Google Calendar request.

Sorry without having access to the documents used in your workflow it will be hard to troubleshoot. If you haven’t solved this yet and need help, please make the doc public with a link and let us know.

Hello @jabbson, I’ve made the document public for the demo : Inscrits formations - Google Sheets

Thanks for an example. I’ve noticed your dates in the sheet are in different format. If you can, try to unify the format to the ISO format without quote marks, like so

image

Then in your workflow you can use:

{{ DateTime.fromISO($('Google Sheets Trigger').item.json['Plage 1 début']) }}
{{ DateTime.fromISO($('Google Sheets Trigger').item.json['Plage 1 fin']) }}

Hi @jabbson , the issue is not the format, I’ve tried your approach exactly but I face the same issue: event creation works if I write the date as a string directly, for instance:

{{ DateTime.fromISO("2025-09-13T08:00:00.000-04:00") }}

And I get a bad request from Google Calendar with the exact same date but as a variable:

{{ DateTime.fromISO($('Google Sheets Trigger').item.json['Plage 2 début']) }}

The date is being parsed properly, it’s the calendar event creation call that fails. This is extremely weird and I am surprised that it works on your side.

The date doesn’t work when it is surrounded by quotation marks in the sheet. Here is a video, where I used your document (a copy of it) and your first and last node:

As you can see, when I try to create an event for “Plage 1”, it creates it with no problem (notice no quotation marks for the date), when I switch to the “Plage 2”, it throws an error.

Hi @jabbson , thanks a lot for your help, but I confirm again that this is not the issue. I do have an error even when I use the dates with a valid format. The Luxon DateTime object is created properly, indicating that the format is recognized for the dates I try. You’ll find different formats in the file exactly because I did investigate in this direction, and this is not the issue.
I’ve recreated a simpler workflow with just Sheets connector and Calendar connector and I can reproduce the exact same problem.
I’ve noticed that despite hitting a 400 - Bad request error from Calendar, the event is created. But that’s still problematic as the workflow is considered as a failure.
Do you run your experiment on a cloud version of n8n? I suspect an issue in the Calendar connector maybe, when self-hosting.

I ran this in a latest version of self-hosted n8n. I don’t believe there is an issue with the connector, I ran many Calendar tests and integrations, and providing data in the format I used in tests always works.

Hi, see this ticket for HTTP request logging : Log http request
I am still trying to figure it out but that would help a lot.
@jabbson I’ve double checked @anna42 and the DateTime object is valid, it’s the fact that we use a variable that triggers a 400 response. And yet the event is created. Very weird, we’ll try an n8n update later on.

I also use variable and my DateTime object is also valid and it works.
Moreover, since the @anna42’s sheet was updated, to NOT use quotes around dates it is also working with that sheet as well.

¯\_ (ツ) _/¯

For further investigation I need to setup HTTP logging in n8n, which doesn’t seem to be possible currently. I’ve documented my experiments here : Log http request.

Could try to use a proxy to inspect outgoing requests.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.