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.
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.
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.
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
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:
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.