{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "31722179-ef48-4a85-9a0c-ffc824e59493",
      "name": "WooCommerce Trigger",
      "type": "n8n-nodes-base.wooCommerceTrigger",
      "position": [
        -120,
        -20
      ],
      "parameters": {
        "event": "order.created"
      },
      "credentials": {
        "wooCommerceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6564d1a2-87b0-4ffb-bc60-54256a85058f",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        100,
        -20
      ],
      "parameters": {
        "text": "=\ud83d\uded2 New Order Received!\n\n\ud83c\udd94 Order #: {{$json.id}}  \n\ud83d\udcb0 Total: {{$json.total}} USD  \n\ud83d\udcc5 Date: {{$json.date_created}}  \n\ud83d\udd16 Status: {{$json.status}}  \n\n\ud83d\udecd\ufe0f Products:\n{{ $json.line_items.map(item => `- ${item.name} \u00d7 ${item.quantity} = ${item.total} USD`).join('\\n') }}\n\n\ud83d\udc41\ufe0f\u200d\ud83d\udde8\ufe0f Click the button below to view this order.",
        "chatId": "123456789",
        "replyMarkup": "inlineKeyboard",
        "inlineKeyboard": {
          "rows": [
            {
              "row": {
                "buttons": [
                  {
                    "text": "\ud83d\udd17 View Order",
                    "additionalFields": {
                      "web_app": {
                        "url": "={{ $json.payment_url }}"
                      }
                    }
                  }
                ]
              }
            }
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b5e0a35b-f794-4f0a-b76e-f63ac8eddc7b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -360
      ],
      "parameters": {
        "width": 680,
        "height": 560,
        "content": "## \ud83d\udee0 Setup Instructions\n\n### \ud83d\udd27 Configuration Steps\n- **Replace** the `chatId` field in the Telegram node with your own Telegram **user ID** or **group ID**.\n- **Make sure** your Telegram bot is added to the group/channel if you're using one.\n- **Update** the WooCommerce API credentials with your **Consumer Key**, **Secret**, and **Base URL**.\n- **Ensure** your WooCommerce site allows external REST API access.\n- The order button uses `{{$json.payment_url}}`, so you **don\u2019t need to hardcode your domain**.\n\n### \ud83d\udcb5 Currency\n- The total amount and product prices are shown in **USD** for international compatibility.\n- You can change it to another currency if needed.\n\n---\n\n### \u2705 What This Workflow Does\n- Triggers when a **new order** is placed in WooCommerce.\n- Sends a **Telegram message** to the admin.\n- Includes:\n  - Order ID, date, status, and total\n  - List of products\n  - **Button** to view the order in WooCommerce\n\n---\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "WooCommerce Trigger": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}