Date of "today" always showed as a specific date in the past

Describe the problem/error/question

Whenever I ask Telegram to create an event for today (2025-01-24), the Google Calendar creates an event on 2024-01-09. (Though time is correct)

What is the error message (if any)? N/A

Please share your workflow

I have a workflow of Telegram message → set (get message) → AI Agent (Enthropic) → Google Calendar create event.

Share the output returned by the last node

message_id:152

from

id:7739220817

is_bot:true

first_name:google ai agent

username:fun_society_google_bot

chat

id:679320841

first_name:Fiona

last_name:Huang

username:fionahg

type:private

date:1737710560

text:I’ve created the event “Baby shower” for today starting at 7:00 PM and ending at 9:00 PM. The event has been added to your Google Calendar. Let me know if you’d like to make any adjustments to the time or duration!\n\nThis message was sent automatically with n8n

entities

0

offset:216

length:41

type:italic

1

offset:257

length:3

type:text_link

url:Powerful Workflow Automation Software & Tools - n8n

link_preview_options

is_disabled:true

Information on your n8n setup

  • n8n version: 1.75.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
  • Operating system: Mac

It’s helpful to provide the complete workflow so we have full context. :wink:

AI agents do not have awareness of time.

It’s best to include the current time in your system message.

For instance, you could add:
This is the current time and date: {{new Date().toLocaleString()}}. Please set the start and end times accordingly.

Appolosies, I’m relatively new to n8n. Could you please let me know how to share the entire flow?

Also, I try the method you provided, by copy paste ‘This is the current time and date: {{new Date().toLocaleString()}}. Please set the start and end times accordingly.’ into the System Message, but it didn’t work? Any chance you could elaborate a bit.

Actually it worked!
I just paste this in my system message (expression):

  • When you are asked to perform a task on the current date, please use the current time and date: {{$now}}. Please set the start and end times accordingly.
1 Like

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