#!/bin/bash
# Send data to Make.com webhook
# Usage: make-webhook-send "message" [source]

WEBHOOK_URL="https://hook.eu1.make.com/ds5lifaakupqt1ylom3k07wdovetgso4"

if [ -z "$1" ]; then
    echo "Usage: make-webhook-send 'message' [source]"
    echo "Example: make-webhook-send 'Check this data' 'monitoring'"
    exit 1
fi

MESSAGE="$1"
SOURCE="${2:-openclaw}"

curl -X POST "$WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d "{\"message\": \"$MESSAGE\", \"source\": \"$SOURCE\", \"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}"