How to Send Webhooks With OpenClaw Scheduled Tasks

No-code

OpenClaw is an AI agent platform with built-in support for recurring scheduled tasks. Think of it as a cron runtime for AI workflows — you define what an agent should do, set a schedule, and wire the output to an outbound webhook. No servers to provision, no polling scripts to maintain. This guide walks through exactly how to set it up from scratch.

What You'll Need

Step 1: Create a New Agent in OpenClaw

  1. Log in to OpenClaw and click New Agent from your dashboard.
  2. Give the agent a descriptive name — something that identifies its job, like "Daily pricing monitor for Competitor X" or "Slack webhook notifier for keyword alerts".
  3. In the agent configuration, choose Scheduled as the agent type rather than on-demand or triggered.
  4. Select your model (GPT-4o, Claude, or whichever OpenClaw exposes in your plan) — for most webhook use cases, a capable but fast model is preferable over the most powerful option.

Step 2: Write the Agent's Instructions

This is the core of what the agent will actually do each time it runs. Be specific — vague instructions produce vague outputs, which makes structuring a webhook payload harder. Write the instructions as if you're delegating to an analyst:

  1. Describe the source: what URL, API, or data source the agent should check. For example: "Go to https://example.com/pricing and find the current price of the Pro plan."
  2. Describe the condition: what needs to be true for the webhook to fire. For example: "If the price has changed since the last run, proceed. Otherwise, do nothing." OpenClaw agents can retain memory between runs to support this comparison.
  3. Describe the output format: tell the agent exactly what JSON it should construct. For example:
    {
      "event": "price_change",
      "product": "Pro Plan",
      "old_price": "<previous value>",
      "new_price": "<current value>",
      "detected_at": "<ISO timestamp>"
    }
  4. Add any context the agent needs: login credentials (stored in OpenClaw's secrets vault, not in the prompt), competitor names, product identifiers, or threshold values.

Step 3: Configure the Schedule

  1. Open the Schedule tab in your agent configuration.
  2. Choose a frequency. OpenClaw supports:
    • Fixed intervals: every 15 minutes, hourly, every 6 hours, daily, weekly
    • Cron expressions for precise timing, e.g., 0 8 * * 1-5 for weekday mornings at 8am
  3. Set the timezone. This matters for daily digests or business-hours checks — the default UTC can produce confusing run times if your team is in a different timezone.
  4. Optionally set a start date if you want the first run to begin at a future point, and an end date if this is a time-boxed campaign monitor rather than an ongoing watcher.

Step 4: Add a Webhook Action

  1. In the agent's Actions panel, click Add Action and choose HTTP Request (or Webhook if OpenClaw surfaces it separately in your plan).
  2. Set the method to POST.
  3. Paste your webhook endpoint URL. If you're testing, use a webhook.site URL; swap it for your real endpoint before activating.
  4. Set the Content-Type header to application/json.
  5. In the body field, reference the JSON output from the previous step — in OpenClaw this is typically done by using the agent's output variable: {{agent.output}} or equivalent syntax per your plan version.
  6. If your endpoint requires authentication, add an Authorization header here. Use OpenClaw's secrets vault to store the token rather than pasting it in plaintext.
  7. Set the action to conditional if you only want the webhook to fire when the agent detected a meaningful change — this prevents sending empty or "nothing changed" payloads to your endpoint on every run.

Step 5: Test Before Activating

  1. Use OpenClaw's Run Now button to trigger an immediate test execution of the agent without waiting for the schedule.
  2. Open your webhook.site or RequestBin URL and confirm the POST arrived with the expected payload structure.
  3. Check the agent's Run Log for any errors — common issues at this stage are malformed JSON in the output (the agent added prose around the JSON block), incorrect variable references, or endpoint auth failures.
  4. If the payload structure is wrong, refine the instruction in Step 2 to be more explicit about the JSON output format. Asking the agent to respond with only valid JSON and nothing else prevents formatting issues.
  5. Run at least two test cycles if your agent uses memory-based comparison (e.g., detecting a change from the previous run) — the first run establishes the baseline, the second run exercises the comparison logic.

Step 6: Point at Your Real Endpoint and Activate

  1. Replace the test webhook URL with your real destination — a Slack incoming webhook, a database write endpoint, an internal API, or any service that accepts HTTP POST.
  2. Click Activate on the agent. The schedule will begin from the next scheduled interval.
  3. Monitor the first 2–3 live runs in the Run Log to confirm real-world behavior matches your test. Latency, rate limits, and auth token expiry behave differently in production than in a quick test run.
  4. Set up an alert (OpenClaw typically supports email or webhook notification on agent failure) so you're notified if the agent errors out rather than silently missing runs.

Common Use Cases

Troubleshooting

Privacy Policy