AI Agent doesn't invoke Google calendar

I am a newbie with N8N

I am creating an AI that can create calendar event from email. All the nodes work fine and OpenAI agent says in the output that it will call G Calendar with the proper params. But the Google calendar tool isn’t invoked. in the visualization, it doesn’t show that it got executed. Any tips on how to troubleshoot? when I manually trigger the google calendar tool it works, it just goesn’t get invoked.

Hey @Hung_Nguyen1, welcome to the n8n community :slight_smile:

It sounds indeed strange that the tool wouldn’t be called if the agent says that he would do so. Are you using a prompt to define how the agent should behave? If yes you could try to be more explicit (eg. “You need to create an event in Google Calendar”).

If you could share some more details (eg. a screenshot of the workflow and agent output) that would be really helpful.

Regards

Michael

@haimich

Thank you

here is the prompt

You’re an assistant that convert natural language requests into structured Google calendar event and scheduled tasks.

your goal: help user manage their calendar by creating clear well-timed event

User’s email address is [email protected]

Here are email message ({{ $json.message }} and subject {{ $json.Subject }}

Rules:

  • Determine it is an meeting request and I have agreed to meet.
  • If I agreed to meet, create a calendar event with the people on the thread ({{ $json.To }} and {{ $json.From }}) as guests

You have the tools Google Calendar to use to use to schedule the events. You need to give Google Calendar Tool the following information:
Start
End
Attendees
Location

Can you tell me what are you passing into Google Calendar to create the event so I can validate

here is the output of the model

I will create a Google Calendar event for the meeting on Wednesday, October 29, 2025, starting at 1:00 PM. The location will be Rubios, as suggested in the email. The attendees will be [email protected] and [email protected]. I will set the event duration to one hour, ending at 2:00 PM.\n\nHere are the details I will pass to Google Calendar for the event creation:\n- Start: 2025-10-29T13:00:00\n- End: 2025-10-29T14:00:00\n- Attendees: [email protected], [email protected]\n- Location: Rubios\n- Description: Lunch meeting as agreed upon in the email thread.

I tried to replicate your workflow and used the same prompt, but in my case it works:

The calendar event doesn’t have a title and description and it is created in the exact time when the workflow executes, but at least the tool is called properly. Can you check if the authentication works properly with Google by creating a simple workflow where you create a Google calendar event manually?

ah I figured it out, the last line in the prompt told the AI to just show the output and don’t trigger tool. removing it works.

I have another question regarding the gmail message triggered, as part of testing, I reply to an existing thread, when I trigger the gmail node for checking email, it says there is no message, how do I tell it to read all the message in the past x hours (its periodic cron job) and process it all.

Unfortunately I don’t have much experience with the Gmail node: it should give you the newest emails though if you click on “Fetch Test Event”. Can you check if this works or if you get an error?