{
  "name": "Automatic reminders for follow-ups with AI and human in the loop Gmail",
  "nodes": [
    {
      "id": "cbc2ee05-3bb9-4064-ac26-fed7241e673f",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -460,
        0
      ]
    },
    {
      "id": "4a18dea4-9eda-4b8e-9d0c-fff9793802c5",
      "name": "Get Past Events",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -280,
        0
      ]
    },
    {
      "id": "df2ef6d0-5fcb-43c5-8ba9-2d094dffb4e1",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        200,
        40
      ]
    },
    {
      "id": "bedc77ad-f0c9-47ae-9609-48ceda47a224",
      "name": "Flag to Follow Up",
      "type": "n8n-nodes-base.set",
      "position": [
        580,
        200
      ]
    },
    {
      "id": "b332ca5d-45d5-4a79-a028-baa1728aea78",
      "name": "Only Follow Ups",
      "type": "n8n-nodes-base.filter",
      "position": [
        400,
        40
      ]
    },
    {
      "id": "1b8a6510-f1c5-4969-a68d-143874b5737d",
      "name": "Get Emails Since",
      "type": "n8n-nodes-base.gmail",
      "position": [
        400,
        200
      ]
    },
    {
      "id": "4ce7ac3f-bad8-4822-b166-fd164d733734",
      "name": "Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1140,
        220
      ]
    },
    {
      "id": "a22c5b78-d213-4e37-b2c6-f3d1dac96858",
      "name": "Availability",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        1020,
        220
      ]
    },
    {
      "id": "690c79d3-cf0e-4d15-9419-dafb7d86025b",
      "name": "Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        900,
        220
      ]
    },
    {
      "id": "4e9d23c0-f9a0-4e71-b1b8-1011313942ba",
      "name": "Meeting Availability Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        920,
        40
      ]
    },
    {
      "id": "851728bf-7f94-4434-9dc6-23569544cdb7",
      "name": "Generate Message",
      "type": "n8n-nodes-base.set",
      "position": [
        1260,
        40
      ]
    },
    {
      "id": "7e45eddc-8c34-402a-86a2-ed89ff463095",
      "name": "Meetings",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        2360,
        240
      ]
    },
    {
      "id": "74618cf0-1fe5-4abb-ba38-6818162ce826",
      "name": "Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2180,
        240
      ]
    },
    {
      "id": "790cc7ee-fe1b-434f-8736-38952bffbb85",
      "name": "Meeting Booking Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2180,
        60
      ]
    },
    {
      "id": "7ed171b2-08ee-49b0-9f9b-b4943549b2f6",
      "name": "Mark as Seen",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        -100,
        0
      ]
    },
    {
      "id": "c8198538-4e02-429d-9fef-4cc2cb0bb7d0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -200
      ],
      "parameters": {
        "width": 620,
        "height": 420,
        "content": "## 1. Get Recent Meetings\n[Learn more about the GCalendar node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar)\n\nFor this template, a scheduled trigger is set to fire"
      }
    },
    {
      "id": "ef4888e2-249f-4501-a731-4dc8886dfa1a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        100,
        -160
      ],
      "parameters": {
        "width": 680,
        "height": 600,
        "content": "## 2. Check If Any Messages Since\n[Read more about the Gmail node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail)\n\nNext, we want to check if there has been any messages/conta"
      }
    },
    {
      "id": "d9ccc4d5-2ccb-4f85-ada1-6a6fc5374ff2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -160
      ],
      "parameters": {
        "width": 620,
        "height": 580,
        "content": "## 3. Suggest Availability For Next Call\n[Read more about AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/)\n\nOnce filtered for applicable leads, "
      }
    },
    {
      "id": "851b15f6-ea6a-4d30-a45b-f9ed087a37fa",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        -200
      ],
      "parameters": {
        "width": 540,
        "height": 520,
        "content": "## 4. Get Human Approval\n[Learn more about n8n's Human-in-the-loop features](https://docs.n8n.io/advanced-ai/examples/human-fallback/)\n\nOf course, we don't want the AI to actually book the meeting unl"
      }
    },
    {
      "id": "725b187f-d59b-4a7d-bf11-6265a4c995ed",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        -160
      ],
      "parameters": {
        "width": 640,
        "height": 560,
        "content": "## 5. Book the meeting If Accepted\n[Learn more about the AI Agent node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/)\n\nFinally, the response from the us"
      }
    },
    {
      "id": "ae59a45a-01e9-42be-99da-f75ed90f881b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -700
      ],
      "parameters": {
        "width": 420,
        "height": 980,
        "content": "## Try it out!\n### This n8n template extends the idea of sales leads follow-up reminders by having an AI agent suggest and book the next call or message to reengage the prospect.\n\nWhat makes this temp"
      }
    },
    {
      "id": "46ef7220-49ea-4dfc-8e4c-ce7da5119daf",
      "name": "Send for Human Approval",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1660,
        80
      ]
    }
  ],
  "connections": {
    "Model": {
      "ai_languageModel": [
        [
          {
            "node": "Meeting Availability Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Meeting Booking Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Output": {
      "ai_outputParser": [
        [
          {
            "node": "Meeting Availability Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Meetings": {
      "ai_tool": [
        [
          {
            "node": "Meeting Booking Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Availability": {
      "ai_tool": [
        [
          {
            "node": "Meeting Availability Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Seen": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Past Events": {
      "main": [
        [
          {
            "node": "Mark as Seen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Only Follow Ups",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Emails Since",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only Follow Ups": {
      "main": [
        [
          {
            "node": "Meeting Availability Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Message": {
      "main": [
        [
          {
            "node": "Send for Human Approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Emails Since": {
      "main": [
        [
          {
            "node": "Flag to Follow Up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Past Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flag to Follow Up": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send for Human Approval": {
      "main": [
        [
          {
            "node": "Meeting Booking Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Meeting Availability Agent": {
      "main": [
        [
          {
            "node": "Generate Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}