{
  "name": "WhatsApp Gateway - Incoming Message to Google Sheets",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "whatsapp-gateway-google-sheets",
        "responseMode": "onReceived",
        "options": {}
      },
      "id": "webhook-message-received",
      "name": "WhatsApp Gateway Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [240, 300]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": "replace_with_google_sheet_id",
        "sheetName": "Incoming Messages",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "timestamp": "={{$json.body.timestamp}}",
            "event": "={{$json.body.event}}",
            "instance": "={{$json.body.instance_name}}",
            "from": "={{$json.body.from}}",
            "message": "={{$json.body.message_text}}"
          }
        }
      },
      "id": "google-sheets-row",
      "name": "Append Row Placeholder",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [520, 300],
      "notes": "Connect your own Google credentials and replace the sheet ID."
    }
  ],
  "connections": {
    "WhatsApp Gateway Webhook": {
      "main": [[{"node": "Append Row Placeholder", "type": "main", "index": 0}]]
    }
  },
  "active": false,
  "settings": {},
  "tags": ["WhatsApp Gateway", "starter-template"]
}
