{
  "openruna_format": "flow-graph-v1",
  "title": "e-mail Chatbot with both semantic and structured RAG, using Telegram and Pgvector",
  "slug": "e-mail-chatbot-with-both-semantic-and-structured-rag-using-telegram-and-pgvector",
  "source_filename": "1843_Telegram_Code_Automate_Triggered.json",
  "nodes": [
    {
      "id": "Telegram Trigger",
      "name": "Telegram Trigger",
      "integration": "telegram",
      "kind": "trigger"
    },
    {
      "id": "Loop Over Items",
      "name": "Loop Over Items",
      "integration": "splitInBatches",
      "kind": "logic"
    },
    {
      "id": "Came from Telegram?",
      "name": "Came from Telegram?",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "When chat message received",
      "name": "When chat message received",
      "integration": "@n8n/n8n-nodes-langchain.chat",
      "kind": "trigger"
    },
    {
      "id": "Postgres PGVector Store",
      "name": "Postgres PGVector Store",
      "integration": "@n8n/n8n-nodes-langchain.vectorStorePGVector",
      "kind": "action"
    },
    {
      "id": "Call the SQL composer Workflow",
      "name": "Call the SQL composer Workflow",
      "integration": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "kind": "action"
    },
    {
      "id": "Embeddings Ollama",
      "name": "Embeddings Ollama",
      "integration": "@n8n/n8n-nodes-langchain.embeddingsOllama",
      "kind": "action"
    },
    {
      "id": "Beautify chat response",
      "name": "Beautify chat response",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Split text into chunks",
      "name": "Split text into chunks",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Respond on Telegram in batches",
      "name": "Respond on Telegram in batches",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Escape Markdown",
      "name": "Escape Markdown",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "No Operation, do nothing",
      "name": "No Operation, do nothing",
      "integration": "noOp",
      "kind": "logic"
    },
    {
      "id": "Simple Memory",
      "name": "Simple Memory",
      "integration": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "kind": "action"
    },
    {
      "id": "AI Agent",
      "name": "AI Agent",
      "integration": "@n8n/n8n-nodes-langchain.agent",
      "kind": "action"
    },
    {
      "id": "OpenAI Chat Model",
      "name": "OpenAI Chat Model",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "Generate session id",
      "name": "Generate session id",
      "integration": "set",
      "kind": "logic"
    }
  ],
  "edges": [
    {
      "from": "AI Agent",
      "to": "Came from Telegram?"
    },
    {
      "from": "Escape Markdown",
      "to": "Respond on Telegram in batches"
    },
    {
      "from": "Loop Over Items",
      "to": "No Operation, do nothing"
    },
    {
      "from": "Loop Over Items",
      "to": "Escape Markdown"
    },
    {
      "from": "Telegram Trigger",
      "to": "Generate session id"
    },
    {
      "from": "Came from Telegram?",
      "to": "Split text into chunks"
    },
    {
      "from": "Came from Telegram?",
      "to": "Beautify chat response"
    },
    {
      "from": "Generate session id",
      "to": "AI Agent"
    },
    {
      "from": "Split text into chunks",
      "to": "Loop Over Items"
    },
    {
      "from": "When chat message received",
      "to": "Generate session id"
    },
    {
      "from": "Respond on Telegram in batches",
      "to": "Loop Over Items"
    }
  ]
}