{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "dc7a3ddb-9cc1-4b16-a7d7-c08fdfc9c2a7",
      "name": "On Expense Form Submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        64,
        3984
      ],
      "parameters": {
        "options": {},
        "formTitle": "Employee Expense Reimbursement Form",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Employee Name",
              "placeholder": "Enter your full name",
              "requiredField": true
            },
            {
              "fieldLabel": "Employee Email",
              "placeholder": "Enter your work email",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Department",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Sales"
                  },
                  {
                    "option": "Marketing"
                  },
                  {
                    "option": "HR"
                  },
                  {
                    "option": "Project Management"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "date",
              "fieldLabel": "Expense Date",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "Expense Amount",
              "placeholder": "Enter amount",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Currency",
              "fieldOptions": {
                "values": [
                  {
                    "option": "INR"
                  },
                  {
                    "option": "USD"
                  },
                  {
                    "option": "EU"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Expense Description",
              "placeholder": "Describe the expense",
              "requiredField": true
            },
            {
              "fieldLabel": "Manager Email",
              "placeholder": "Enter manager email for approval",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Please submit your expense details for approval"
      },
      "typeVersion": 2.3
    },
    {
      "id": "2322273b-88d6-496e-bdbe-bf3e7e004d46",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        512,
        3984
      ],
      "parameters": {
        "text": "=You are an AI assistant helping a finance team review employee expense submissions.\n\nYour task is to critically analyze the expense details and verify whether the total claimed amount is fully and clearly justified by the expense description.\n\nExpense Details:\n- Employee Name: {{ $json['Employee Name'] }}\n- Department: {{ $json.Department }}\n- Expense Date: {{ $json['Expense Date'] }}\n- Total Amount: {{ $json['Expense Amount'] }}\n- Expense Description: {{ $json['Expense Description'] }}\n\nInstructions:\n1. Carefully break down the expense description and identify all individual expense amounts mentioned.\n2. Verify whether the sum of the described expenses exactly matches the Total Amount.\n3. If any portion of the total amount is unexplained, unclear, or missing justification, treat the expense as NOT appropriate.\n4. Only mark the expense as appropriate if the full amount is clearly business-related and fully justified.\n\nGenerate the output in the exact format below.\n\nSummary:\nProvide a short, clear summary explaining the business purpose of the expense and how the money was spent. Explicitly mention if only part of the amount is explained.\n\nAI Opinion:\nState whether the expense appears appropriate for business reimbursement. Clearly explain if there is any mismatch or missing justification and why that impacts approval.\n\nIs Expense Appropriate:\nReturn only one value:\nYES \u2013 only if the entire amount is justified\nNO \u2013 if even a single portion of the amount is unexplained or unclear",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "3370d332-6bc9-4039-abb1-5b0268706c44",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        4192
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "9921be31-700c-49c4-8754-71c0007c07df",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        864,
        3984
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c7398b44-1f43-4189-8386-b7969d2becf4",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.output.Decesion }}",
              "rightValue": "YES"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "f3e5c480-7503-43bc-a06d-462ac9963148",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        288,
        3984
      ],
      "parameters": {
        "columns": {
          "value": {
            "Currency": "={{ $json.Currency }}",
            "Department": "={{ $json.Department }}",
            "Expense Date": "={{ $json['Expense Date'] }}",
            "Employee Name": "={{ $json['Employee Name'] }}",
            "Manager Email": "={{ $json['Manager Email'] }}",
            "Employee Email": "={{ $json['Employee Email'] }}",
            "Expense Amount": "={{ $json['Expense Amount'] }}",
            "Expense Description": "={{ $json['Expense Description'] }}"
          },
          "schema": [
            {
              "id": "Employee Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Employee Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Employee Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Employee Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Department",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Department",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Expense Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Expense Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Expense Amount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Expense Amount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Currency",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Currency",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Expense Description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Expense Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Manager Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Manager Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a6783394-6d7d-4912-868d-5ee1364c3232",
      "name": "Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        672,
        4192
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"Summary\": \"\",\n\t\"Opinion\": \"\",\n    \"Decesion\": \"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "b3123afd-aa4a-43fa-9618-aba46fa705fc",
      "name": "Send Email to Manager for Approval",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1088,
        3888
      ],
      "parameters": {
        "sendTo": "={{ $('On Expense Form Submission').item.json['Manager Email'] }}",
        "message": "=<p>Hello,</p>\n\n<p>\nAn expense submission from <strong>{{ $('Append row in sheet').item.json['Employee Name'] }} ({{ $('Append row in sheet').item.json.Department }})</strong>\nhas been reviewed by the system.\n</p>\n\n<p><strong>Expense Summary:</strong></p>\n\n<ul>\n  <li>\n    <strong>Total Amount:</strong>\n    {{ $('Append row in sheet').item.json.Currency }}\n    {{ $('Append row in sheet').item.json['Expense Amount'] }}\n    &nbsp; | &nbsp;\n    <strong>Expense Date:</strong>\n    {{ $('Append row in sheet').item.json['Expense Date'] }}\n  </li>\n  <li>\n    <strong>Description:</strong>\n    {{ $('Append row in sheet').item.json['Expense Description'] }}\n  </li>\n</ul>\n\n<p>\nBased on the information provided, the expense <strong>appears to be valid</strong>\nand relevant to business activities.\n</p>\n\n<p>\nThis is an automated assessment and <strong>does not constitute approval</strong>.\nYour review and confirmation are required to proceed further.\n</p>\n\n<p>\nPlease approve or reject the request.\n</p>",
        "options": {},
        "subject": "Expense Review Update",
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double",
            "disapproveLabel": "Reject"
          }
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ebb3d044-19e0-4262-88bb-61e7a1dceb61",
      "name": "Send Email to Manager for Approval1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1088,
        4080
      ],
      "parameters": {
        "sendTo": "={{ $('On Expense Form Submission').item.json['Manager Email'] }}",
        "message": "=<p>Hello,</p>\n\n<p>\nAn expense submission from <strong>{{ $('Append row in sheet').item.json['Employee Name'] }} ({{ $('Append row in sheet').item.json.Department }})</strong>\nhas been reviewed by the system.\n</p>\n\n<p><strong>Expense Summary:</strong></p>\n\n<ul>\n  <li>\n    <strong>Total Amount:</strong>\n    {{ $('Append row in sheet').item.json.Currency }}\n    {{ $('Append row in sheet').item.json['Expense Amount'] }}\n    &nbsp; | &nbsp;\n    <strong>Expense Date:</strong>\n    {{ $('Append row in sheet').item.json['Expense Date'] }}\n  </li>\n  <li>\n    <strong>Description:</strong>\n    {{ $('Append row in sheet').item.json['Expense Description'] }}\n  </li>\n</ul>\n\n<p>\nBased on the information provided, the expense <strong>may require further\nclarification</strong> to confirm alignment with company policies.\n</p>\n\n<p>\nThis is an automated assessment and <strong>does not constitute approval</strong>.\nYour review is required before any decision is made.\n</p>\n\n<p>\nPlease review the details and advise on Approval/Rejection.\n</p>\n\n<p>\nBest regards,<br />\nExpense Review System\n</p>",
        "options": {},
        "subject": "Expense Review Update",
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double",
            "disapproveLabel": "Reject"
          }
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e54ea932-d5c8-4558-a303-244a15579937",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        1312,
        3984
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e3cc32d8-54a3-44c1-9f16-7b09d6e8d2dc",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.approved }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "f4d135e5-f4df-45cc-b759-123524f792c0",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1616,
        3824
      ],
      "parameters": {
        "sendTo": "={{ $('On Expense Form Submission').item.json['Employee Email'] }}",
        "message": "=<p>Hello {{ $('Append row in sheet').item.json['Employee Name'] }},</p>\n\n<p>\nWe are pleased to inform you that your expense submission has been\n<strong>approved by your manager</strong>.\n</p>\n\n<p><strong>Expense Details:</strong></p>\n\n<ul>\n  <li>\n    <strong>Total Amount:</strong>\n    {{ $('Append row in sheet').item.json.Currency }}\n    {{ $('Append row in sheet').item.json['Expense Amount'] }}\n    &nbsp; | &nbsp;\n    <strong>Expense Date:</strong>\n    {{ $('Append row in sheet').item.json['Expense Date'] }}\n  </li>\n  <li>\n    <strong>Description:</strong>\n    {{ $('Append row in sheet').item.json['Expense Description'] }}\n  </li>\n</ul>\n\n<p>\nThe approved amount will be processed as per the standard reimbursement\nprocedure.\n</p>\n\n<p>\nIf you have any questions or need further clarification, please contact\nthe finance or HR team.\n</p>\n\n<p>\nBest regards,<br />\nYour Company Name\n</p>",
        "options": {},
        "subject": "Expense Approved"
      },
      "typeVersion": 2.2
    },
    {
      "id": "25f26b9c-8d4f-4e8b-a293-352da33b5d63",
      "name": "Check Availability",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        1600,
        4352
      ],
      "parameters": {
        "options": {
          "timezone": {
            "__rl": true,
            "mode": "list",
            "value": "Asia/Kolkata"
          },
          "outputFormat": "availability"
        },
        "timeMax": "={{ new Date(new Date().setDate(new Date().getDate() + 1)).setHours(18, 0, 0, 0) && new Date(new Date().setDate(new Date().getDate() + 1)).toISOString().replace('T', ' ').slice(0, 19).replace(/ \\d{2}:\\d{2}:\\d{2}$/, ' 18:00:00') }}",
        "timeMin": "={{ new Date(new Date().setDate(new Date().getDate() + 1)).setHours(9, 0, 0, 0) && new Date(new Date().setDate(new Date().getDate() + 1)).toISOString().replace('T', ' ').slice(0, 19).replace(/ \\d{2}:\\d{2}:\\d{2}$/, ' 09:00:00') }}",
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_CALENDAR_EMAIL"
        },
        "resource": "calendar"
      },
      "typeVersion": 1.3
    },
    {
      "id": "a99305ce-7588-41c9-a88d-22fe57305e13",
      "name": "Get Events",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        1728,
        4352
      ],
      "parameters": {
        "options": {},
        "timeMax": "={{ new Date(new Date().setDate(new Date().getDate() + 1)).setHours(18, 0, 0, 0) && new Date(new Date().setDate(new Date().getDate() + 1)).toISOString().replace('T', ' ').slice(0, 19).replace(/ \\d{2}:\\d{2}:\\d{2}$/, ' 18:00:00') }}",
        "timeMin": "={{ new Date(new Date().setDate(new Date().getDate() + 1)).setHours(9, 0, 0, 0) && new Date(new Date().setDate(new Date().getDate() + 1)).toISOString().replace('T', ' ').slice(0, 19).replace(/ \\d{2}:\\d{2}:\\d{2}$/, ' 09:00:00') }}",
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_CALENDAR_EMAIL"
        },
        "operation": "getAll",
        "returnAll": true
      },
      "typeVersion": 1.3
    },
    {
      "id": "a98230bf-ac01-4f7c-924a-9ed39682c72e",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1472,
        4352
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "c362b6c9-e56e-428f-9141-268dac816d34",
      "name": "Booking Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1600,
        4128
      ],
      "parameters": {
        "text": "=You are an availability checking agent.\n\nTODAY'S DATE: {{ new Date().toISOString().slice(0, 10) }}\n\nGOAL:\n\nYour job is to:\n1. Check availability for tomorrow (the next business day after today)\n2. Find the FIRST free 10-minute slot between 9:00 AM and 6:00 PM\n3. Return only ONE timeslot (the earliest available)\n\nYou must NEVER ask the user questions.\nYou must NEVER wait for user input.\nEverything must be automatic.\n\nCRITICAL DATE RULE:\n\n- Today is {{ new Date().toISOString().slice(0, 10) }}\n- Tomorrow's date is the day after today\n- IF tomorrow falls on a Saturday or Sunday, you MUST SKIP it and use the following Monday as the booking date\n- The tools are already configured with timeMin and timeMax for the correct business day\n- You MUST use the actual business date in your output\n- If \"Get Events\" returns empty results, it means ALL slots are free\n- DO NOT make up or hallucinate dates\n- Calculate the correct business date from today's date\n\nCHECK AVAILABILITY TOOL RULES:\n\n1. First, call the \"Get Events\" tool to fetch all events booked for the selected business day.\n   - If the result is empty or shows no events: ALL SLOTS ARE FREE - return 09:00:00 as the start time\n   - If there are events: proceed to check availability between them\n   - Extract the date from the timeMin parameter or from any returned events\n\n2. Only if there are existing events, call the \"Check Availability\" tool.\n   - Look for slots with at least 10 minutes of free time between 09:00 and 18:00\n\nSLOT SELECTION LOGIC:\n\n- If NO events exist: The first slot is 09:00-09:10 (return 09:00:00)\n- If events exist: Start checking from 09:00:00 on the selected business date\n- Look for the FIRST available 10-minute slot\n- If 09:00-09:10 is booked, check 09:10-09:20\n- Continue in 10-minute increments until you find a free slot\n- Stop as soon as you find the first available slot\n\nOUTPUT RULES:\n\nAfter checking availability:\n- Calculate the correct business date from today ({{ new Date().toISOString().slice(0, 10) }})\n- If tomorrow is Saturday or Sunday, use Monday's date\n- Extract the date from the tool results or timeMin parameter\n- If calendar is completely free (no events): Return 09:00:00 as start_time with the selected business date\n- If there are events: Return the FIRST available 10-minute slot\n- Format EXACTLY like this JSON:\n  {\n    \"start_time\": \"YYYY-MM-DD 09:00:00\"\n  }\n- Replace YYYY-MM-DD with the selected business date\n- The end time is automatically start_time + 10 minutes\n- If no slots available between 09:00-18:00, return: {\"start_time\": \"No available slots found\"}\n- MUST use format: YYYY-MM-DD HH:MM:SS\n- Do NOT list multiple slots - just ONE slot\n- Do NOT add any extra text or explanation\n\nIMPORTANT: Empty events list = All slots free = Return 09:00:00 with the selected business date\n\nEverything must be fully automatic.",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "a0c12777-f697-4021-ab91-f2d9fdad3114",
      "name": "Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1856,
        4352
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"start_time\": \"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "fe971339-92b6-4c40-a4b2-52ec92fa81cc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        3632
      ],
      "parameters": {
        "width": 528,
        "height": 880,
        "content": "## Expense Approval System\n\nThis workflow automates employee expense reimbursements from submission to approval or clarification scheduling. It uses AI to review expense details, generate clear summaries, and route decisions automatically, while maintaining clean records for finance and management teams.\n\n### How it works\n- Employees submit expenses using a structured form\n- AI reviews the expense and generates a justification summary\n- The summary is emailed to the manager for approve/reject action\n- Approved expenses notify the employee automatically\n- Rejected or unclear expenses trigger a short discussion scheduling\n\n### Setup steps\n- Configure the expense submission form\n- Connect OpenAI for expense review\n- Connect Google Sheets for logging\n- Connect Gmail for approvals and notifications\n- Connect Google Calendar for discussions\n- Activate and test the workflow\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0ee7191d-a5b6-4df5-9159-df396b89c805",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        3632
      ],
      "parameters": {
        "color": 7,
        "width": 1008,
        "height": 880,
        "content": "## Step 1: Capture, summarize, and request approval\nThe employee submits the expense form, an AI agent reviews the details, and a professional summary is emailed to the manager using a send-and-wait approval step.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "18451cea-1ac6-4302-b811-ff0f1ef9c4ac",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        3632
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 880,
        "content": "## Step 2: Manager reviews and responds\nThe manager reviews the expense summary directly from email and approves or rejects the reimbursement request.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "db79f3c9-daa6-4393-9af4-aeba3856f300",
      "name": "Send a message2",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2016,
        4128
      ],
      "parameters": {
        "sendTo": "={{ $('Append row in sheet').item.json['Employee Email'] }}",
        "message": "=<p>Hello {{ $('Append row in sheet').item.json['Employee Name'] }},</p>\n\n<p>\nYour expense submission has been reviewed and is currently\n<strong>not approved</strong>.\n</p>\n\n<p>\nFurther discussion is required to clarify certain details before a final\ndecision can be made. A meeting has been scheduled to discuss this matter.\n</p>\n\n<p><strong>Meeting Details:</strong></p>\n\n<ul>\n  <li><strong>Details:</strong> {{ $json.output.start_time }}</li>\n</ul>\n\n<p><strong>Expense Details:</strong></p>\n\n<ul>\n  <li>\n    <strong>Total Amount:</strong>\n    {{ $('Append row in sheet').item.json.Currency }}\n    {{ $('Append row in sheet').item.json['Expense Amount'] }}\n    &nbsp; | &nbsp;\n    <strong>Expense Date:</strong>\n    {{ $('Append row in sheet').item.json['Expense Date'] }}\n  </li>\n  <li>\n    <strong>Description:</strong>\n    {{ $('Append row in sheet').item.json['Expense Description'] }}\n  </li>\n</ul>\n\n<p>\nPlease ensure you are available at the scheduled time so the matter can\nbe resolved promptly.\n</p>\n\n<p>\nIf you are unable to attend, please inform us in advance.\n</p>\n\n<p>\nBest regards,<br />\nYour Company Name\n</p>",
        "options": {
          "appendAttribution": false
        },
        "subject": "Discussion Required Regarding Leave Request"
      },
      "typeVersion": 2.2
    },
    {
      "id": "bf1f38bf-1256-4b42-b2bc-83cac9f3c3d0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        3632
      ],
      "parameters": {
        "color": 7,
        "width": 752,
        "height": 880,
        "content": "## Step 3: Notify employee or schedule discussion\nIf approved, the employee is notified by email. If rejected, the system checks calendar availability and schedules a discussion automatically.\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Send Email to Manager for Approval",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Email to Manager for Approval1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Booking Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "ai_languageModel": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Events": {
      "ai_tool": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Booking Agent": {
      "main": [
        [
          {
            "node": "Send a message2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check Availability": {
      "ai_tool": [
        [
          {
            "node": "Booking Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On Expense Form Submission": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email to Manager for Approval": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email to Manager for Approval1": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}