{
  "name": "Build an AI powered phone agent 📞🤖 with Retell, Google Calendar and RAG",
  "nodes": [
    {
      "id": "64f8551d-b401-4d9b-9930-a91cfd15490f",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        -32,
        1696
      ]
    },
    {
      "id": "36429826-4321-450c-9688-eea2a564de2e",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        400,
        1888
      ]
    },
    {
      "id": "cc980549-b97c-4704-9fc2-a79a5fe5a1f7",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        720,
        1872
      ]
    },
    {
      "id": "ccd7b075-1155-4703-bd66-f2d8e8b5d93c",
      "name": "n8n_rag_function",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -288,
        2288
      ]
    },
    {
      "id": "c2bf4b95-e179-41d0-82af-53fc7a4254bc",
      "name": "Retrive Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        96,
        2720
      ]
    },
    {
      "id": "acb8afec-539d-4836-958b-1136a3f37d2d",
      "name": "Embeddings OpenAI2",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        64,
        2896
      ]
    },
    {
      "id": "b5fc77b2-b9a0-4a84-9144-e1737c009031",
      "name": "RAG",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        256,
        2512
      ]
    },
    {
      "id": "1be81a1a-77a5-4e00-9358-9751b51314c3",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        64,
        2512
      ]
    },
    {
      "id": "1c37af86-75b8-4597-84b5-bb9177cdbb3e",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        704,
        2288
      ]
    },
    {
      "id": "6f948a67-dcb3-44b5-abd5-5f33872e6fa2",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        416,
        2736
      ]
    },
    {
      "id": "542a91fa-b720-40f3-a53d-82bf642bf70c",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        896,
        1696
      ]
    },
    {
      "id": "2d16cb14-c3bf-460f-b3cd-5168883195c2",
      "name": "Google Calendar",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1936,
        1680
      ]
    },
    {
      "id": "3ca1bef5-cd71-43f3-8a64-4e092e4831da",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1424,
        1888
      ]
    },
    {
      "id": "8e8df343-333b-4796-858b-f34f989f8a5d",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1728,
        1888
      ]
    },
    {
      "id": "2ce491d2-b3a3-4005-a01f-5a51aa8b10e0",
      "name": "n8n_call",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -272,
        1696
      ]
    },
    {
      "id": "bf5d2097-7c70-47d8-a3bf-1de4f29c63cd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        432
      ],
      "parameters": {
        "width": 1140,
        "height": 920,
        "content": "# STEP 3 - RETELL AI\n\n- Register on [Retell AI](https://dashboard.retellai.com/?ref=davide) (10$ FREE credits)\n- Create an Agent an set \"Voice & Language\" and add your system prompt\n- In Webhook setti"
      }
    },
    {
      "id": "552879f6-f504-40d7-9dd5-04e3c723557d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        1472
      ],
      "parameters": {
        "width": 1220,
        "height": null,
        "content": "# STEP 4\nIntercept the \"end call\" event and get the full call transcript\n- Add your CHAT_ID in Telegram node"
      }
    },
    {
      "id": "06a88c9e-87dd-4890-9608-a51888c4a848",
      "name": "n8n_check_available",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1200,
        1680
      ]
    },
    {
      "id": "74b6aae6-01b3-47fc-b81a-d61813d47435",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -320,
        640
      ]
    },
    {
      "id": "e2784afa-7300-4d05-b595-a3238a12438c",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        656,
        752
      ]
    },
    {
      "id": "80e79ed4-c432-494e-bee7-950a07610579",
      "name": "Create collection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -32,
        496
      ]
    },
    {
      "id": "8799d64a-2f00-4a4c-8451-cbdb8d4a9955",
      "name": "Refresh collection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -32,
        752
      ]
    },
    {
      "id": "94704c53-47f3-489f-a970-04b10097c958",
      "name": "Get folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        208,
        752
      ]
    },
    {
      "id": "8a38f9ed-1413-4aa5-a732-3f2be493ae35",
      "name": "Download Files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        416,
        752
      ]
    },
    {
      "id": "e30335ed-f5b8-47ed-bf27-ae065eb02097",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        640,
        960
      ]
    },
    {
      "id": "8b9224aa-0075-4c77-b491-0974e57ec816",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        816,
        960
      ]
    },
    {
      "id": "569f3119-196f-4d84-98aa-41549312c1b3",
      "name": "Token Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
      "position": [
        784,
        1120
      ]
    },
    {
      "id": "2cfb1ae1-bba2-401c-9a7c-0f884834f34e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        432
      ],
      "parameters": {
        "width": 880,
        "height": 220,
        "content": "# STEP 1\n\n## Create Qdrant Collection\nChange:\n- QDRANTURL\n- COLLECTION"
      }
    },
    {
      "id": "f217e4d2-fcd9-44dc-88ff-60ef39102237",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        688
      ],
      "parameters": {
        "width": 620,
        "height": 400,
        "content": "# STEP 2\n\n\n\n\n\n\n\n\n\n\n\n\n## Documents vectorization with Qdrant and Google Drive\nChange:\n- QDRANTURL\n- COLLECTION"
      }
    },
    {
      "id": "a44cddd5-ca1a-46bc-9455-4d100eae84ca",
      "name": "Set call fields",
      "type": "n8n-nodes-base.set",
      "position": [
        224,
        1696
      ]
    },
    {
      "id": "b40fc677-8941-4aea-8e85-07e093a5d2fa",
      "name": "Extract key points",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        480,
        1696
      ]
    },
    {
      "id": "8762499b-9952-48bc-91e7-1e7d0a5507a7",
      "name": "Concert start date",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1504,
        1680
      ]
    },
    {
      "id": "97d18e30-b8d4-4a58-a0eb-566a601bbee9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        1472
      ],
      "parameters": {
        "width": 1100,
        "height": null,
        "content": "# STEP 5\nIf required, create the event in the calendar\n- Enter the title and description of the event"
      }
    },
    {
      "id": "1d1ab6e3-b3fc-47de-9a4b-43672dce98ba",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        2096
      ],
      "parameters": {
        "width": 1220,
        "height": null,
        "content": "# STEP 6\nIf required retrive the informations by RAG system"
      }
    },
    {
      "id": "b8e98c2c-2502-4245-9b54-eec4715848e9",
      "name": "Retrive Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        144,
        2288
      ]
    },
    {
      "id": "f0fd23da-c11c-42b3-aa41-59b8e066bbb3",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -32
      ],
      "parameters": {
        "width": 2580,
        "height": 360,
        "content": "# Create your first AI Phone Agent\n\nBuild, test, deploy, and monitor AI phone agents. Retell is a comprehensive platform for building, testing, deploying, and monitoring reliable AI phone agents.\nConv"
      }
    },
    {
      "id": "6c31b008-8188-4c9e-9066-c808b88d3bc4",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2368,
        608
      ],
      "parameters": {
        "width": 736,
        "height": 736,
        "content": "## MY NEW YOUTUBE CHANNEL\n👉 [Subscribe to my new **YouTube channel**](https://youtube.com/@n3witalia). Here I’ll share videos and Shorts with practical tutorials and **FREE templates for n8n**.\n\n[![im"
      }
    }
  ],
  "connections": {
    "RAG": {
      "ai_tool": [
        [
          {
            "node": "Retrive Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Set call fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n_call": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get folder": {
      "main": [
        [
          {
            "node": "Download Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrive Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Files": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Token Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Set call fields": {
      "main": [
        [
          {
            "node": "Extract key points",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n_rag_function": {
      "main": [
        [
          {
            "node": "Retrive Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Extract key points",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Concert start date": {
      "main": [
        [
          {
            "node": "Google Calendar",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI2": {
      "ai_embedding": [
        [
          {
            "node": "Retrive Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Extract key points": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "RAG",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Retrive Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Concert start date",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Refresh collection": {
      "main": [
        [
          {
            "node": "Get folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "n8n_check_available": {
      "main": [
        [
          {
            "node": "Concert start date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Extract key points",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Concert start date",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Retrive Qdrant Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "RAG",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Create collection",
            "type": "main",
            "index": 0
          },
          {
            "node": "Refresh collection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}