{
  "name": "Interactive CV chatbot with GPT-4 and Telegram follow-up system",
  "nodes": [
    {
      "id": "2d1b209d-cd87-405f-b71d-bcc05b4eb29c",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "022f2105-231c-4117-8da4-77d8a17398a7",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        416,
        0
      ]
    },
    {
      "id": "57eb029d-2211-4678-a29c-1851dca1f858",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        224,
        224
      ]
    },
    {
      "id": "cb51b0cf-7663-4745-b3a1-1ec49d3e8f4d",
      "name": "Call 'get_documents'",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        512,
        224
      ]
    },
    {
      "id": "d0a5c867-ab52-4c6b-9c6e-67e03f371685",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        352,
        304
      ]
    },
    {
      "id": "1c53c382-da47-499e-8605-6f0e59419cd2",
      "name": "Call 'record_unknown_question'",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        656,
        288
      ]
    },
    {
      "id": "4ced5a1a-d417-4058-96c9-c3153b14ee16",
      "name": "Call 'record_user_details'",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        832,
        160
      ]
    },
    {
      "id": "ef445ebd-0cdd-4a23-aece-5929d9fc2ba3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -112
      ],
      "parameters": {
        "width": null,
        "height": 272,
        "content": "## Public Chat\nGo to the n8n hosted [chatbot](https://gsuparsa.app.n8n.cloud/webhook/c8198125-f143-42ce-89e0-2f23effaf13d/chat) to interact with on the web."
      }
    },
    {
      "id": "f7ddc7ad-a5f8-4d01-8cbc-48c669befba7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -624
      ],
      "parameters": {
        "width": 1168,
        "height": 480,
        "content": "# Chatbot for you CV with Telegram connected follow-up\nThis is an example of Project 1: Career Digital Twin in Ed Donner's udemy course [AI Engineer Agentic Track: The Complete Agent & MCP Course](htt"
      }
    },
    {
      "id": "49f3a21d-f5b0-461f-a62c-f548d45b1bbe",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        448
      ],
      "parameters": {
        "width": 576,
        "height": 304,
        "content": "## Tools Subworkflows\nThe AI Agent makes use of 3 subworkflows it uses as tools:\n\n1. `get_documents` will download an extract 2 files from Microsoft One Drive. The first being a PDF export of your Lin"
      }
    },
    {
      "id": "9cf49415-7953-4eb3-a9b7-4fe2a730cabb",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        -288
      ],
      "parameters": {
        "width": 1680,
        "height": 848,
        "content": "## Sub-workflow: get_documents\n\n"
      }
    },
    {
      "id": "ec563983-0f2d-42d4-8fd7-63fe1e4f7773",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        656
      ],
      "parameters": {
        "width": 1680,
        "height": 672,
        "content": "## Sub-workflow: record_user_details\n\n"
      }
    },
    {
      "id": "ee88f426-c664-4fa5-91a9-a1b9ffebaf17",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        1440
      ],
      "parameters": {
        "width": 1696,
        "height": 688,
        "content": "## Sub-workflow: record_unknown_question\n\n"
      }
    },
    {
      "id": "d6b3e3ae-574a-4d18-a936-d50938741be0",
      "name": "ExtractFromPDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2048,
        -48
      ]
    },
    {
      "id": "c240bc2b-3a64-4f40-8073-274c04cacddd",
      "name": "ExtractFromTXT",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2048,
        144
      ]
    },
    {
      "id": "8ac2ecd4-f0c9-405e-861f-d16674010d2e",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        2272,
        48
      ]
    },
    {
      "id": "1075d7c1-1763-435e-b0f4-69b4f1033a04",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2496,
        48
      ]
    },
    {
      "id": "c012e1ec-73d3-42a3-a264-69553d52fdf2",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        1600,
        48
      ]
    },
    {
      "id": "96cf5596-5b07-4d66-8e54-c899fd2ef870",
      "name": "Download PDF CV",
      "type": "n8n-nodes-base.microsoftOneDrive",
      "position": [
        1824,
        -48
      ]
    },
    {
      "id": "689d726b-5f98-4e6a-ac94-c76383f4a220",
      "name": "Download Summary text file",
      "type": "n8n-nodes-base.microsoftOneDrive",
      "position": [
        1824,
        144
      ]
    },
    {
      "id": "4808646f-e09b-44ce-a775-80a0b7be4305",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -192
      ],
      "parameters": {
        "width": 320,
        "height": null,
        "content": "## get_documents\n\nThis workflow will download and extract the contents of a PDF (exported LinkedIn profile) and a text file from Microsoft OneDrive."
      }
    },
    {
      "id": "1dad24a0-38a5-453e-b226-bc8098afc470",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        -192
      ],
      "parameters": {
        "width": 320,
        "height": 288,
        "content": "### 👆 Change document ID & credential\n\n1. Link your OneDrive credential.\n2. Upload and get the ID of your CV in PDF format in OneDrive."
      }
    },
    {
      "id": "3dee7c0f-6999-4029-92d4-cf3de674390b",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        320
      ],
      "parameters": {
        "width": 304,
        "height": null,
        "content": "### 👆 Change document ID \n\n1. Upload and get the ID of your summary in text format in OneDrive."
      }
    },
    {
      "id": "b52cea0b-6aa2-4e0f-865d-20aed8ff4b1d",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2160,
        880
      ]
    },
    {
      "id": "5379bc42-ac6e-4072-91ad-353bab23e9bc",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        2384,
        880
      ]
    },
    {
      "id": "7bbdbaf8-2425-4dd0-9ec4-058a09dec1ec",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        752
      ],
      "parameters": {
        "width": 640,
        "height": 384,
        "content": "## record_user_details\n\nA subworkflow that will take at a minimum an email address but optionally a name and some other information to be sent to the owner of the workflow via a telegram message.\n\n###"
      }
    },
    {
      "id": "426189b8-4239-43db-be43-e96adec0e7e6",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        1056
      ],
      "parameters": {
        "width": 592,
        "height": 192,
        "content": "### 👆 Setup Telegram credential and bot\n\n1. In Telegram message the `BotFather` to create a new bot and to get the bot **Access Token** to supply to the Telegram credential.\n2. Send a message to your "
      }
    },
    {
      "id": "d8ea74c8-a1f7-4b2e-b815-08fa92fc2f94",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        704
      ],
      "parameters": {
        "width": 384,
        "height": 192,
        "content": "### 👆 Add missing When Executed by Another Workflow\n\nDon't forget to add the **When Executed by Another Workflow** trigger to the **Send a text message** action. It needs the 3 inputs as described in "
      }
    },
    {
      "id": "d389ccf5-cf9e-413f-b297-668da6840131",
      "name": "Send a text message1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2208,
        1680
      ]
    },
    {
      "id": "b05d7584-4ff0-482c-9fa6-baa0c4d226b0",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        2416,
        1680
      ]
    },
    {
      "id": "e3e3b39f-b9b8-455b-83cf-e5bde323202f",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1264,
        1568
      ],
      "parameters": {
        "width": 672,
        "height": 352,
        "content": "## record_unknown_question\n\nThis workflow should get triggered if a question is asked that cannot be reliably responded to by the chatbot.\n\n### Inputs\n\n* `question` (required) the question that was as"
      }
    },
    {
      "id": "df0b0f59-3d16-4343-be29-2a16475f33b1",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1984,
        1472
      ],
      "parameters": {
        "width": 384,
        "height": 192,
        "content": "### 👆 Add missing When Executed by Another Workflow\n\nDon't forget to add the **When Executed by Another Workflow** trigger to the **Send a text message** action. It needs the 3 inputs as described in "
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "ExtractFromPDF": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ExtractFromTXT": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Download PDF CV": {
      "main": [
        [
          {
            "node": "ExtractFromPDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send a text message": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call 'get_documents'": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send a text message1": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call 'record_user_details'": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Download Summary text file": {
      "main": [
        [
          {
            "node": "ExtractFromTXT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call 'record_unknown_question'": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Download PDF CV",
            "type": "main",
            "index": 0
          },
          {
            "node": "Download Summary text file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}