# Google Calendar free/busy times output is confusing the AI sometimes

**URL:** <https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565>\
**Category:** Questions\
**Tags:** data-transformation, node, google-calendar\
**Created:** [May 23, 2024, 10:34am UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565 "2024-05-23T10:34:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakeThai](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jakethai/32/35575_2.png) [@jakeThai](https://community.n8n.io/u/jakeThai)\
**Post date:** [May 23, 2024, 10:34am UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/1 "2024-05-23T10:34:08Z")

</div>

Hi all! I’m currently using this workflow to suggest 2 available times in a google calendar.

Currently I am just using the straight output from calendar node in the AI response, it gives the AI busy times.

(Here are the provided times in JSON format: {{JSON.stringify($json)}})

I then use a prompt to calculate available times from this but it sometimes gets it wrong.

Whats a better way to provide times to the ai to prevent confusion?

Like can I split out results? Can I calculate free times before it gets to the AI? I would love a much more robust way for this to work..

Here is an example of current calendar output:

```auto
[
  {
    "kind": "calendar#freeBusy",
    "timeMin": "2024-05-16T05:17:20.000Z",
    "timeMax": "2024-05-17T05:17:20.000Z",
    "calendars": {
      "calendaraddress@gmail.com": {
        "busy": [
          {
            "start": "2024-05-16T17:00:00+10:00",
            "end": "2024-05-16T18:00:00+10:00"
          },
          {
            "start": "2024-05-17T09:30:00+10:00",
            "end": "2024-05-17T10:30:00+10:00"
          },
          {
            "start": "2024-05-17T12:00:00+10:00",
            "end": "2024-05-17T13:00:00+10:00"
          }
        ]
      }
    }
  }
]

```

 ![brave_GFPlXwEYhM](https://europe1.discourse-cdn.com/n8n/original/3X/5/e/5ee5868fa3c96fa451cc402cd8e2c9f844e458f5.png)

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [May 23, 2024, 10:34am UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/2 "2024-05-23T10:34:09Z")

</div>

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:**

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [May 23, 2024, 2:06pm UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/3 "2024-05-23T14:06:51Z")

</div>

Hi @jakeThai

I wonder if you might find our template helpful for what you’re trying to do?

> **[Suggest meeting slots using AI | n8n workflow template](https://n8n.io/workflows/1953-suggest-meeting-slots-using-ai/)**
>
> The purpose of this n8n workflow is to automate the process of identifying incoming Gmail emails that are requesting an appointment, evaluating their...

Do let us know! 🌟

---

<div class="post-metadata">

**Author:** ![jakeThai](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jakethai/32/35575_2.png) [@jakeThai](https://community.n8n.io/u/jakeThai)\
**Post date:** [May 23, 2024, 2:48pm UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/4 "2024-05-23T14:48:00Z")

</div>

Wow this is epic thanks! So it can handle a whole month worth of appointments without getting confused? This is the part I need to learn, is the filtering and then wrapping into a stringified response. So it’s the stringified part that makes it easy for the AI to work with?

So actually another question would be how can I learn to manipulate the data inbetween nodes so it gets passed along easily?

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [May 23, 2024, 3:14pm UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/5 "2024-05-23T15:14:50Z")

</div>

Glad I could help 😊

Usually our data transformation Nodes are nice if you want to play around with data.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/5/c/5c8e9fb1f18cbb64a5436102f4c851d8fd54a109.png)

The **Debug Helper** has an option to create some random data you can get started with.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/3/c/3ce20f4d87239ef00d8d4cefff70320774077d20.png)

Happy Building! 🏗

---

<div class="post-metadata">

**Author:** ![jakeThai](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jakethai/32/35575_2.png) [@jakeThai](https://community.n8n.io/u/jakeThai)\
**Post date:** [May 25, 2024, 10:49am UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/6 "2024-05-25T10:49:09Z")

</div>

Hi thanks for this,

I’m trying to use the calendar checker but the workflow tool is not calling the Execute workflow trigger. Do I need to have them on seperate workflows?  
In workflow tools it’s set to : {{ $workflow.id }}

 ![brave_7sSPbPcZRr](https://europe1.discourse-cdn.com/n8n/original/3X/f/8/f88255a32d5ca1b2acb3d32b552e485b51cae79d.png)

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [May 28, 2024, 9:43am UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/7 "2024-05-28T09:43:12Z")

</div>

Hi @jakeThai,  
Sorry for my late reply!

no, it should be calling the **Execute Workflow Trigger** from the given workflow ID.

What’s the error you’re getting in the **Workflow Tool** Node?

---

<div class="post-metadata">

**Author:** ![jakeThai](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jakethai/32/35575_2.png) [@jakeThai](https://community.n8n.io/u/jakeThai)\
**Post date:** [May 28, 2024, 11:53am UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/8 "2024-05-28T11:53:30Z")

</div>

Thank you, it’s working now when I added extra workflow inputs. I was also looking for it to go green so you can see it running, but realised that it’s a seperate execution so it just runs. 😃

 ![brave_ItRFSCsOFX](https://europe1.discourse-cdn.com/n8n/original/3X/9/1/91b074d903d9e4dc387a9e4f7a742c63d2c1b7a1.png)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [June 4, 2024, 11:54am UTC](https://community.n8n.io/t/google-calendar-free-busy-times-output-is-confusing-the-ai-sometimes/46565/9 "2024-06-04T11:54:07Z")

</div>

Closed on June 4, 2024, 11:54am UTC

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