{
  "name": "Organise an Event using Slack, Google Calendar and AI",
  "nodes": [
    {
      "id": "806e7f80-b936-49c3-9759-6f91fab5781e",
      "name": "For Each User ID...",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1640,
        1438
      ]
    },
    {
      "id": "8a932c63-18d2-438d-a09c-256c3432a01f",
      "name": "Get User",
      "type": "n8n-nodes-base.slack",
      "position": [
        1900,
        1278
      ]
    },
    {
      "id": "fefe8889-a564-4d70-a909-a3e836ca6286",
      "name": "Search for Invite Requests",
      "type": "n8n-nodes-base.slack",
      "position": [
        340,
        840
      ]
    },
    {
      "id": "bbe29b66-2b02-409a-a7c9-c6afd08f62f8",
      "name": "Get Existing Invite EventID",
      "type": "n8n-nodes-base.code",
      "position": [
        815,
        883
      ]
    },
    {
      "id": "82053e1b-0ed2-4967-9654-9d1488c0ab3c",
      "name": "Should Create Event?",
      "type": "n8n-nodes-base.if",
      "position": [
        995,
        883
      ]
    },
    {
      "id": "d051c89a-d337-4db4-b9dd-208a6b9488f6",
      "name": "Create Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1940,
        600
      ]
    },
    {
      "id": "9b4ab665-edd2-4a4c-b84f-4c1c466c7957",
      "name": "Get Invite Reactions",
      "type": "n8n-nodes-base.slack",
      "position": [
        1640,
        1258
      ]
    },
    {
      "id": "783e0e31-43c1-40aa-89de-f886ff7511d9",
      "name": "Get Invite Replies",
      "type": "n8n-nodes-base.slack",
      "position": [
        635,
        883
      ]
    },
    {
      "id": "963c872e-858d-47bc-b648-d98079dd722a",
      "name": "Extract Invite Reactions",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1320,
        1438
      ]
    },
    {
      "id": "f4132852-cfc3-4662-8976-cfc262a9ad78",
      "name": "Get Old EventId",
      "type": "n8n-nodes-base.set",
      "position": [
        1320,
        1258
      ]
    },
    {
      "id": "a83ea855-a2fa-4f9f-9b1e-298a97b78591",
      "name": "Add Attendee to Event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        2380,
        1278
      ]
    },
    {
      "id": "80b74ca6-5d98-4db9-8555-56e5967266e8",
      "name": "Get Event Details",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1480,
        1258
      ]
    },
    {
      "id": "a059fe82-4d12-48ce-a378-d1e9b7625000",
      "name": "Is Attending",
      "type": "n8n-nodes-base.filter",
      "position": [
        1480,
        1438
      ]
    },
    {
      "id": "14716446-8014-46d9-a9db-851d35ebfb33",
      "name": "Get User Email",
      "type": "n8n-nodes-base.set",
      "position": [
        2220,
        1278
      ]
    },
    {
      "id": "8540e7f5-fce1-40cb-89a7-5be4c9f7cd63",
      "name": "Should Add Attendee?",
      "type": "n8n-nodes-base.if",
      "position": [
        2060,
        1278
      ]
    },
    {
      "id": "6958ed3a-5d59-40b8-969a-e90988ca68cb",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1620,
        680
      ]
    },
    {
      "id": "f4518e1e-595f-4492-8439-9de9e8701665",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        1440,
        740
      ]
    },
    {
      "id": "821c4388-317d-4f40-ac1a-ea7f2d0da711",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1340,
        680
      ]
    },
    {
      "id": "2b0aa447-164f-4f7c-95b1-ae44c699fc89",
      "name": "Wikipedia",
      "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
      "position": [
        1520,
        740
      ]
    },
    {
      "id": "66b28991-1417-4b4a-a604-68bea258c141",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        140,
        840
      ]
    },
    {
      "id": "6cfe47dc-d630-42da-a755-325b5f466488",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        65.15658774955875,
        620
      ],
      "parameters": {
        "width": 468.0872755624215,
        "height": 401.633728593893,
        "content": "## 1. Pull Messages from Slack Channel\n[Read more about using the Slack](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack/)\n\nUsing the Slack Node, we're able to filter all top l"
      }
    },
    {
      "id": "89b74ffd-6581-43c6-821d-50f34004be6f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        643.4948198232535
      ],
      "parameters": {
        "width": 612.4609442091373,
        "height": 463.294565931203,
        "content": "## 2. Decide Whether a new Event Should Be Created\n[Read more about using the Code](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code)\n\nFor more complex workflows, sometimes you "
      }
    },
    {
      "id": "355b928a-3f1f-415b-8bcf-3a715ac770c3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        264.3100105144731
      ],
      "parameters": {
        "width": 582.5773441997128,
        "height": 614.2457232899785,
        "content": "## 3. Using AI Agent to Automate Event Creation\n[Read more about AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n\nAI Agents are generally descri"
      }
    },
    {
      "id": "d9ab9ce6-c2ae-43f1-af69-b39403b8ef36",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1260,
        1040
      ],
      "parameters": {
        "width": 555.022465659362,
        "height": 579.2571386002115,
        "content": "## 5. Get Emoji Reactions to Track Attendees\n[Read more about using Slack](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack)\n\nWhen the event exists, we can instead start adding "
      }
    },
    {
      "id": "8d60d40a-5eae-4a57-ab68-5572199ddfbb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1860,
        1107
      ],
      "parameters": {
        "width": 665.8690262556933,
        "height": 354.87325537783204,
        "content": "## 6. Add Attendees to Existing Calendar Event\n[Read more about using Google Calendar](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar)\n\nn8n nodes make it easy to work"
      }
    },
    {
      "id": "2e58ced7-5849-4726-9050-57e60a3f8e93",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        600
      ],
      "parameters": {
        "width": 359.6648027457353,
        "height": 416.9747281125149,
        "content": "## Try It Out!\n### This workflow does the following\n* Monitors a slack channel for event messages tagged with the Calendar (📅) emoji.\n* Checks if a calender event exists otherwise uses ChatGPT to crea"
      }
    },
    {
      "id": "e64b575a-e422-4c98-86b7-dc69e15150c3",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        400
      ],
      "parameters": {
        "width": 492.07150832656214,
        "height": 414.62723127587867,
        "content": "## 4. Create Event and Send Reply Message\n[Read more about using Google Calendar](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar)\n\nOnce we have these details, we crea"
      }
    },
    {
      "id": "3d3a6d11-a68f-4623-943d-55493d334290",
      "name": "Reply Invite with EventId",
      "type": "n8n-nodes-base.slack",
      "position": [
        2120,
        600
      ]
    },
    {
      "id": "0b0e02e7-1375-4de9-9781-915d7e96ef20",
      "name": "Calendar Event Booking Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1380,
        540
      ]
    },
    {
      "id": "e4ce06a0-cc42-4732-aadd-519fe7307a4d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        160
      ],
      "parameters": {
        "width": 394.45954589267495,
        "height": 80,
        "content": "### Part 1: Creating the Event\nThis branch runs when we have a new Event."
      }
    },
    {
      "id": "463a2dbc-2d10-403a-a417-aec442e917dd",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1260,
        940
      ],
      "parameters": {
        "width": 394.45954589267495,
        "height": 80,
        "content": "### Part 2: Adding Attendees to Event\nThis branch runs if the event already exists."
      }
    },
    {
      "id": "aa4d41ca-1332-40da-a2b9-331257b6a1f2",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        820
      ],
      "parameters": {
        "width": 179.82769272818715,
        "height": 362.21121634583966,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set the channel to monitor here. Also, make sure to use the user access token in your credential"
      }
    },
    {
      "id": "790293df-46bc-47ba-a60b-be611f46b670",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1900,
        580
      ],
      "parameters": {
        "width": 179.82769272818715,
        "height": 317.6738512911155,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set the Google Calendar to use here."
      }
    }
  ],
  "connections": {
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "Calendar Event Booking Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get User": {
      "main": [
        [
          {
            "node": "Should Add Attendee?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wikipedia": {
      "ai_tool": [
        [
          {
            "node": "Calendar Event Booking Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Event": {
      "main": [
        [
          {
            "node": "Reply Invite with EventId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Attending": {
      "main": [
        [
          {
            "node": "For Each User ID...",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get User Email": {
      "main": [
        [
          {
            "node": "Add Attendee to Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Old EventId": {
      "main": [
        [
          {
            "node": "Get Event Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Search for Invite Requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Event Details": {
      "main": [
        [
          {
            "node": "Get Invite Reactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Calendar Event Booking Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Invite Replies": {
      "main": [
        [
          {
            "node": "Get Existing Invite EventID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For Each User ID...": {
      "main": [
        [
          {
            "node": "Get User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Invite Reactions": {
      "main": [
        [
          {
            "node": "Extract Invite Reactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Should Add Attendee?": {
      "main": [
        [
          {
            "node": "Get User Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Should Create Event?": {
      "main": [
        [
          {
            "node": "Calendar Event Booking Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Old EventId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Invite Reactions": {
      "main": [
        [
          {
            "node": "Is Attending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Calendar Event Booking Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Search for Invite Requests": {
      "main": [
        [
          {
            "node": "Get Invite Replies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Existing Invite EventID": {
      "main": [
        [
          {
            "node": "Should Create Event?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calendar Event Booking Agent": {
      "main": [
        [
          {
            "node": "Create Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}