Describe the problem/error/question
Hi everyone,
I am currently trying to create an appointment assistant. Although there are many solutions to this all of them use Google Calendar, but the Calendar that I am using is in NextCloud and n8n does not have a node that exactly support this kind of action. What I found though is community CalDav node that has everything I am looking for (It can create, delete and get events from a calendar, in this situation from NextCloud: n8n-nodes-caldav-calendar - npm). The community node, according to its documentation, supports different time zones. So I am not aware if the problem has to do with my prompting or that there may be a bug in the node itself so I am going with the assumption that I am unable to prompt the agent correctly.
The problem that I am facing with this node has to do with the Get function of the CalDav Tool. What the agent should do when someone wants to make an appointment is first to check in the calendar which time slots are available for the provided date by the user. What the node does though is it reads the calendar in UTC timezone although the environment that I host it in and the calendar itself are both in Europe/Berlin Timezone.
e.g. Time slot between 09:00 - 09:30 (CEST) is already taken, the Agent uses CalDav Get and reads that 07:00 - 07:30 (UTC) is already taken which leads it to believe that 09:00 is an available time (which is not true).
All kinds of prompts that I tried never manage to work. Telling it to convert everything in to local time zone with {{$now}}, even manually telling it to add +2 hours to every time slot didn’t work and I am honestly out of solutions.
If any of you have encountered something similar and have a solution or ideas please let me know, I would really appreciate any kind of help. Thanks 
Screenshots:
First off: here is what the tool looks like
I put some test appointments with which I am testing if the Calendar check works.
On the photo is the output from the CalDav Tool, which lists the appointments on a certain date. As you can see it is listed as 07:00 until 07:30 when in reality it is 09:00 - 09:30 in the calendar

And this is the reply that I get from the agent, suggesting time slots that are already busy
Information on your n8n setup
- n8n version: 1.107.4
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Windows 11
@falgu1d3 i have some ideas.
It seems like it’s reading the calendar in UTC time, but your calendar and environment are in Europe time.
Have you checked the node’s configuration to see if there’s an option to specify the timezone? Maybe there’s something in the settings that you can change.
Another thing I suggest is using a function node to convert the timezone. You could use a library o moment timezone to handle the conversions.
What do you think?
Hey,
I did check the configuration of the node and unfortunately the isn’t an option to specify a timezone.
When it comes to the function node though, am I understanding it correctly:
after the agent gathers the busy time slots from the calendar it sends them to a function node, the time conversion happens and then the converted data gets sent to the agent again or is there a different logic behind it.
Hey @falgu1d3 sorry for the late reply, I had a lot to do.
Have you been able to resolve the issues yet?
Unfortunately I haven’t.
I tried to do it with the code node, now I am trying a solution with a date & time tool, but what it does is randomly add 2 hours on top of the already converted times.
Can you tell me more about how you’re using the Date & Time tool? What settings are you using, and what’s the input data look like?
The date and time tool receives the output from the CalDav tool which says at what time there is a busy appointment (in UTC) and converts it in to local Europe/ Berlin time which I have specified in the Agent’s tool usage.
Input
Output:
Which seems to be correct, but at the same time for some reason all time slots it suggests are incorrect and do not match the instructions that I am giving him.
For example people with a certain role must get different time slots (some get in the morning, some in the afternoon) and the agent now ignores that and gives time slots that should not be given to a specific role.
When in reality only time slots between 9 and 11:30 should be suggested for this role
Everything looks correct.
But I’d like to see the rules and conditions you’ve set up.
Also, are you using any specific node or function in n8n to handle the role based logic?
The role handling is set up in the prompt of the agent and it worked correctly before adding the time and date tool.
Date & Time Tool
Agent’s Prompt
”
Date and Time - This tool will be used to convert all time stamps and time slots in to Local time (Europe/ Berlin)”
Role handling (at the beginning they are asked for their role and it is saved)
”The available office hours are:
Monday until Friday
Morning block: 09:00-12:00
Afternoon block: 13:00-16:00
(Never offer times between 12:01 and 12:59)
Do not offer any time slots that fall outside of these hours.
If a user has the Student role offer them time slots in the morning block
If a user has the Professor or Staff Member role offer them time slots in the afternoon block”
This is the prompt that I have put for checking the busy calendar time slots, but it still sometimes doesn’t even use the date & time tool to convert anything although it is specified
”#CalDav Check
You must check that a full 30- minute block is available:
→ The start and end time must not conflict with any existing calendar event.
->After collecting all appointments for the specific with “CalDav Check Slots” you must always use the “Date time” tool to convert dtStartISO in to local time
→ the output from the “date time” tool are times that are considered unavailable and must never be suggested to the user
→ The time slots that you must suggest are the ones that do not match the above criteria”
Everything looks correct, just a lil tweak might solve this issue
1 Like