AI Agent (OpenAI) GCal missing events

Hey there,

I’m experimenting with the AI Agent using OpenAI and Google Calendar as a tool. When testing through chat, I’m asking for events from my calendar (e.g., “What do I have coming up next week?”), but the results are wildly inconsistent—some events are missing, the order is incorrect, etc.

I suspect this might be an OpenAI issue, as I’ve noticed similar behavior with the assistant before.

Has anyone else experienced this? Am I doing something wrong here?

Cheers,

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

hi

This might be related to how the AI Agent is interacting with the Google Calendar API. The inconsistencies in results could be due to a few factors:

  1. API limitations: The Google Calendar API might have restrictions on how many events it returns or how far into the future it looks by default.
  2. AI interpretation: The AI model might be interpreting the calendar data inconsistently or struggling to process all the information correctly.
  3. Prompt engineering: The way you’re asking the question might affect how the AI retrieves and presents the information.

To troubleshoot this issue, you could try the following:

  1. Check the Google Calendar node settings to ensure it’s fetching all the necessary data. You might need to adjust the time range or other parameters.
  2. Review the AI Agent’s prompt to make sure it’s instructed to process and present all calendar events accurately.
  3. Consider using the Structured Output Parser to format the calendar data in a more consistent way before passing it to the AI Agent.

For a more robust solution, you might want to look at the “Suggest meeting slots using AI” workflow template, which demonstrates how to effectively combine AI with Google Calendar operations. You can find it here: Suggest meeting slots using AI | n8n workflow template

Hope this helps!

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