{
  "openruna_format": "flow-graph-v1",
  "title": "0815_Telegram_Code_Update_Triggered",
  "slug": "0815-telegram-code-update-triggered",
  "source_filename": "0815_Telegram_Code_Update_Triggered.json",
  "nodes": [
    {
      "id": "Human Handoff using Send and Wait",
      "name": "Human Handoff using Send and Wait",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Set Interaction to Bot",
      "name": "Set Interaction to Bot",
      "integration": "redis",
      "kind": "action"
    },
    {
      "id": "Set Interaction to Human",
      "name": "Set Interaction to Human",
      "integration": "redis",
      "kind": "action"
    },
    {
      "id": "Get Interaction State",
      "name": "Get Interaction State",
      "integration": "redis",
      "kind": "action"
    },
    {
      "id": "Model",
      "name": "Model",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "Memory",
      "name": "Memory",
      "integration": "@n8n/n8n-nodes-langchain.memoryRedisChat",
      "kind": "action"
    },
    {
      "id": "Handoff Subworkflow",
      "name": "Handoff Subworkflow",
      "integration": "executeWorkflow",
      "kind": "trigger"
    },
    {
      "id": "Telegram Trigger",
      "name": "Telegram Trigger",
      "integration": "telegram",
      "kind": "trigger"
    },
    {
      "id": "Send Response",
      "name": "Send Response",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Switch Interaction",
      "name": "Switch Interaction",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "Information Extractor",
      "name": "Information Extractor",
      "integration": "@n8n/n8n-nodes-langchain.informationExtractor",
      "kind": "action"
    },
    {
      "id": "OpenAI Chat Model",
      "name": "OpenAI Chat Model",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "With Defaults",
      "name": "With Defaults",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Has All Criteria?",
      "name": "Has All Criteria?",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Onboarding Agent",
      "name": "Onboarding Agent",
      "integration": "@n8n/n8n-nodes-langchain.agent",
      "kind": "action"
    },
    {
      "id": "Get Onboarding Chat History",
      "name": "Get Onboarding Chat History",
      "integration": "redis",
      "kind": "action"
    },
    {
      "id": "After Sales Agent",
      "name": "After Sales Agent",
      "integration": "@n8n/n8n-nodes-langchain.agent",
      "kind": "action"
    },
    {
      "id": "Memory1",
      "name": "Memory1",
      "integration": "@n8n/n8n-nodes-langchain.memoryRedisChat",
      "kind": "action"
    },
    {
      "id": "Model1",
      "name": "Model1",
      "integration": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "kind": "action"
    },
    {
      "id": "Handoff Tool",
      "name": "Handoff Tool",
      "integration": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "kind": "action"
    },
    {
      "id": "Handoff Subworkflow1",
      "name": "Handoff Subworkflow1",
      "integration": "executeWorkflow",
      "kind": "action"
    },
    {
      "id": "Send Response2",
      "name": "Send Response2",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Memory2",
      "name": "Memory2",
      "integration": "@n8n/n8n-nodes-langchain.memoryRedisChat",
      "kind": "action"
    },
    {
      "id": "Update Agent Memory",
      "name": "Update Agent Memory",
      "integration": "@n8n/n8n-nodes-langchain.memoryManager",
      "kind": "action"
    },
    {
      "id": "Send Response3",
      "name": "Send Response3",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Get Canned Response",
      "name": "Get Canned Response",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Notify user",
      "name": "Notify user",
      "integration": "telegram",
      "kind": "action"
    },
    {
      "id": "Memory3",
      "name": "Memory3",
      "integration": "@n8n/n8n-nodes-langchain.memoryRedisChat",
      "kind": "action"
    },
    {
      "id": "Update Agent Memory1",
      "name": "Update Agent Memory1",
      "integration": "@n8n/n8n-nodes-langchain.memoryManager",
      "kind": "action"
    },
    {
      "id": "Continue Conversation",
      "name": "Continue Conversation",
      "integration": "telegram",
      "kind": "action"
    }
  ],
  "edges": [
    {
      "from": "Notify user",
      "to": "Set Interaction to Human"
    },
    {
      "from": "Send Response",
      "to": "Update Agent Memory1"
    },
    {
      "from": "With Defaults",
      "to": "Has All Criteria?"
    },
    {
      "from": "Onboarding Agent",
      "to": "Get Onboarding Chat History"
    },
    {
      "from": "Telegram Trigger",
      "to": "Get Interaction State"
    },
    {
      "from": "After Sales Agent",
      "to": "Send Response3"
    },
    {
      "from": "Has All Criteria?",
      "to": "Handoff Subworkflow1"
    },
    {
      "from": "Has All Criteria?",
      "to": "Continue Conversation"
    },
    {
      "from": "Switch Interaction",
      "to": "Get Canned Response"
    },
    {
      "from": "Switch Interaction",
      "to": "After Sales Agent"
    },
    {
      "from": "Switch Interaction",
      "to": "Onboarding Agent"
    },
    {
      "from": "Handoff Subworkflow",
      "to": "Notify user"
    },
    {
      "from": "Update Agent Memory",
      "to": "Send Response2"
    },
    {
      "from": "Handoff Subworkflow1",
      "to": "Send Response"
    },
    {
      "from": "Get Interaction State",
      "to": "Switch Interaction"
    },
    {
      "from": "Information Extractor",
      "to": "With Defaults"
    },
    {
      "from": "Set Interaction to Bot",
      "to": "Update Agent Memory"
    },
    {
      "from": "Set Interaction to Human",
      "to": "Human Handoff using Send and Wait"
    },
    {
      "from": "Get Onboarding Chat History",
      "to": "Information Extractor"
    },
    {
      "from": "Human Handoff using Send and Wait",
      "to": "Set Interaction to Bot"
    }
  ]
}