{
  "name": "whatsapp ai penjadwalan",
  "nodes": [
    {
      "parameters": {
        "operation": "delete",
        "calendar": {
          "__rl": true,
          "value": "hardi.sastra24@gmail.com",
          "mode": "list",
          "cachedResultName": "hardi.sastra24@gmail.com"
        },
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
        "options": {}
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        820,
        520
      ],
      "id": "ffd77487-b168-42a9-8b10-72e39fb28417",
      "name": "delete event",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "value": "hardi.sastra24@gmail.com",
          "mode": "list",
          "cachedResultName": "hardi.sastra24@gmail.com"
        },
        "returnAll": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}",
        "timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}",
        "timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}",
        "options": {}
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        720,
        520
      ],
      "id": "6a9611bb-1bf4-41b5-bb89-c2ac4d2d0094",
      "name": "get event",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "calendar": {
          "__rl": true,
          "value": "hardi.sastra24@gmail.com",
          "mode": "list",
          "cachedResultName": "hardi.sastra24@gmail.com"
        },
        "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
        "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
        "additionalFields": {
          "summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', ``, 'string') }}"
        }
      },
      "type": "n8n-nodes-base.googleCalendarTool",
      "typeVersion": 1.3,
      "position": [
        620,
        520
      ],
      "id": "889baaf9-ab15-4704-a0e1-e176667d3dd8",
      "name": "create event",
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.0-flash",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        420,
        520
      ],
      "id": "79e4936c-7b5f-40f7-a095-b30e212878a8",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.body.body }}",
        "options": {
          "systemMessage": "gunakan format waktu indonesia {{ $now }} \nselalu pakai bahasa indonesia\nkamu adalah asisten saya dalam membuat penjadwalan. gunakan tool google calendar sebagai alat penjadwalan.\nsaya ingin kamu setiap kali membuat jadwal harus membuat ID event\nbuat format balasan yang simple dan mudah di baca"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        440,
        320
      ],
      "id": "56977385-27fe-4876-bff2-1e5d882e6773",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "92818ced-2e3f-49e6-a060-fa95a1dc86f9",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        320
      ],
      "id": "7651fb1d-9aec-47b2-ae8c-c6426f5dac37",
      "name": "Webhook"
    },
    {
      "parameters": {
        "url": "https://app.notif.my.id/api/v2/send-message",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "apikey",
              "value": "8KIOY5MsxZF6m71UJq1750242449537"
            },
            {
              "name": "receiver",
              "value": "={{ $('Webhook').item.json.body.from }}"
            },
            {
              "name": "mtype",
              "value": "text"
            },
            {
              "name": "text",
              "value": "={{ $json.output }}"
            },
            {
              "name": "readmessage",
              "value": "yes"
            },
            {
              "name": "id",
              "value": "={{ $('Webhook').item.json.body.id }}"
            },
            {
              "name": "duration",
              "value": "3000"
            }
          ]
        },
        "options": {
          "redirect": {
            "redirect": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        800,
        320
      ],
      "id": "0f93f00d-0951-42ad-860d-89f76915b89f",
      "name": "HTTP Request"
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "delete event": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get event": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "create event": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d9d70400-cc3b-442b-b98f-8c9d6f9f54a3",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "VUHBgnUBCDyzW8Jm",
  "tags": []
}