A date problem on my Google Calendar workflow

I’m experiencing an issue with the AI Agent when creating Google Calendar events from natural language inputs.

Scenario:

  • I use the AI Agent to parse event descriptions and extract details like title, description, start/end time, and location.

  • For absolute dates (e.g., “17 September 2025”, “20 October”), the events are created correctly in Google Calendar.

  • However, for relative dates (e.g., “next Wednesday”, “next Monday”, “tomorrow”), the AI Agent always defaults the year to 2024, even though the current year is 2025.

Steps to reproduce:

  1. Provide an input like: “next Wednesday at 15:00 meeting with Ahmet”.

  2. The AI Agent creates the event, but the start.dateTime is set to 2024 instead of the current year.

Additional Information:

  • The summary/title is correctly generated.

  • Timezones are set correctly in n8n.

  • I tried instructing the AI Agent in the prompt to always use the current system year, but it still defaults to 2024 for relative dates.

Expected behavior:

  • The AI Agent should convert relative dates to absolute ISO 8601 dates using the current system year if no year is explicitly provided.

Workflow:

Hey, you can generate current time in an Edit Fields node before the AI, and pass it’s value at the top of the prompt with {{$json.time}}. Here is the Edit Fields node:

Please mark this reply as Solution if it helped :slight_smile:

2 Likes

You’re life saver ! Thank you so much !
I’m beginner, can you recommend me some youtube channels to learn more :slight_smile:

I definitely recommend taking the n8n courses here:

Also the video courses:

2 Likes

Thank you again ! I appreciate it :slight_smile:

Or in the system prompt of the ai agent you can add Today is {{ $date }} or {{ time }} .

Like that ai is aware…

1 Like

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