{
  "name": "Wabery: reply on WhatsApp",
  "nodes": [
    {
      "parameters": {
        "content": "## Reply on WhatsApp with Wabery\n\n1. Open **Webhook**, publish the workflow, and paste its **Production URL** into Wabery.\n2. Open **Send reply to Wabery** and choose or create a **Bearer Auth** credential. Paste your raw `wab_live_` key as the token.\n3. Replace **Write reply** with your own logic or AI Agent node. Keep the reply in a field named `output`.\n\nGuide: https://wabery.com/docs/n8n-whatsapp/",
        "height": 300,
        "width": 420
      },
      "id": "5c0f6f0e-6b3f-4d8e-9a51-6f1d6a0b7c01",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-60, -300]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "wabery-whatsapp",
        "responseMode": "onReceived",
        "options": {
          "onlyRunIf": "={{ $json.body.payload.test !== true }}"
        }
      },
      "id": "0a6f0d5e-3c1b-4b7a-8a5e-2d9f6c1e4b11",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [0, 0],
      "webhookId": "7e1c2b9a-4f3d-4e8a-b6c5-1a2d3e4f5a61"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "b3f1e2d4-5a6b-4c7d-8e9f-0a1b2c3d4e21",
              "name": "output",
              "value": "=Thanks for your message! You wrote: {{ $json.body.payload.text ?? '(no text)' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "1b7e2f6a-4d2c-4c8b-9b6f-3e0a7d2f5c21",
      "name": "Write reply",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [240, 0]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.wabery.com/v1/messages",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "channel_id",
              "value": "={{ $('Webhook').item.json.body.payload.channel_id }}"
            },
            {
              "name": "conversation_id",
              "value": "={{ $('Webhook').item.json.body.payload.conversation_id }}"
            },
            {
              "name": "text",
              "value": "={{ $json.output }}"
            }
          ]
        },
        "options": {}
      },
      "id": "2c8f3a7b-5e3d-4d9c-8c7a-4f1b8e3a6d31",
      "name": "Send reply to Wabery",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [480, 0]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [[{ "node": "Write reply", "type": "main", "index": 0 }]]
    },
    "Write reply": {
      "main": [[{ "node": "Send reply to Wabery", "type": "main", "index": 0 }]]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}
