{
  "name": "AI-powered Telegram & WhatsApp business agent workflow",
  "nodes": [
    {
      "id": "intro_sticky",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        180
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "telegram_trigger",
      "name": "Telegram Bot",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        160,
        280
      ]
    },
    {
      "id": "whatsapp_webhook",
      "name": "WhatsApp Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        160,
        420
      ]
    },
    {
      "id": "normalize_message",
      "name": "Normalize Message Data",
      "type": "n8n-nodes-base.set",
      "position": [
        460,
        350
      ]
    },
    {
      "id": "processing_sticky",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        20
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "get_customer_data",
      "name": "Get Customer History",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        760,
        350
      ]
    },
    {
      "id": "build_context",
      "name": "Build AI Context",
      "type": "n8n-nodes-base.code",
      "position": [
        1060,
        350
      ]
    },
    {
      "id": "intelligence_sticky",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "ai_assistant",
      "name": "AI Business Assistant",
      "type": "n8n-nodes-base.openAi",
      "position": [
        1360,
        350
      ]
    },
    {
      "id": "ai_sticky",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1340,
        -20
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "process_response",
      "name": "Process AI Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1660,
        350
      ]
    },
    {
      "id": "platform_router",
      "name": "Platform Router",
      "type": "n8n-nodes-base.if",
      "position": [
        1960,
        350
      ]
    },
    {
      "id": "send_telegram",
      "name": "Send Telegram Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2260,
        280
      ]
    },
    {
      "id": "send_whatsapp",
      "name": "Send WhatsApp Message",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2260,
        420
      ]
    },
    {
      "id": "delivery_sticky",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2240,
        60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "log_conversation",
      "name": "Log Conversation",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2560,
        350
      ]
    },
    {
      "id": "update_customer",
      "name": "Update Customer Record",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2860,
        350
      ]
    },
    {
      "id": "check_escalation",
      "name": "Check Escalation",
      "type": "n8n-nodes-base.if",
      "position": [
        2560,
        200
      ]
    },
    {
      "id": "notify_team",
      "name": "Notify Support Team",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2860,
        200
      ]
    },
    {
      "id": "analytics_sticky",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2540,
        480
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "webhook_response",
      "name": "Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3160,
        420
      ]
    }
  ],
  "connections": {
    "ai_assistant": {
      "main": [
        [
          {
            "node": "process_response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "build_context": {
      "main": [
        [
          {
            "node": "ai_assistant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "send_telegram": {
      "main": [
        [
          {
            "node": "log_conversation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "send_whatsapp": {
      "main": [
        [
          {
            "node": "log_conversation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "platform_router": {
      "main": [
        [
          {
            "node": "send_telegram",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "send_whatsapp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "update_customer": {
      "main": [
        [
          {
            "node": "webhook_response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check_escalation": {
      "main": [
        [
          {
            "node": "notify_team",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "log_conversation": {
      "main": [
        [
          {
            "node": "update_customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "process_response": {
      "main": [
        [
          {
            "node": "platform_router",
            "type": "main",
            "index": 0
          },
          {
            "node": "check_escalation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "telegram_trigger": {
      "main": [
        [
          {
            "node": "normalize_message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "whatsapp_webhook": {
      "main": [
        [
          {
            "node": "normalize_message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_customer_data": {
      "main": [
        [
          {
            "node": "build_context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "normalize_message": {
      "main": [
        [
          {
            "node": "get_customer_data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}