How to Send Webhooks With OpenClaw Scheduled Tasks
No-codeOpenClaw 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
- An OpenClaw account (free tier available at openclaw.ai)
- A webhook endpoint URL ready to receive POST requests — you can use webhook.site or RequestBin for testing before pointing at your real destination
- A clear idea of what condition should trigger the webhook (e.g., "when a monitored page changes", "every morning at 8am with a summary", "when a search result appears for a keyword")
Step 1: Create a New Agent in OpenClaw
- Log in to OpenClaw and click New Agent from your dashboard.
- 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".
- In the agent configuration, choose Scheduled as the agent type rather than on-demand or triggered.
- 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:
- 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."
- 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.
- 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>" } - 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
- Open the Schedule tab in your agent configuration.
- 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-5for weekday mornings at 8am
- 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.
- 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
- In the agent's Actions panel, click Add Action and choose HTTP Request (or Webhook if OpenClaw surfaces it separately in your plan).
- Set the method to POST.
- Paste your webhook endpoint URL. If you're testing, use a webhook.site URL; swap it for your real endpoint before activating.
- Set the Content-Type header to
application/json. - 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. - 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.
- 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
- Use OpenClaw's Run Now button to trigger an immediate test execution of the agent without waiting for the schedule.
- Open your webhook.site or RequestBin URL and confirm the POST arrived with the expected payload structure.
- 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.
- 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.
- 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
- 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.
- Click Activate on the agent. The schedule will begin from the next scheduled interval.
- 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.
- 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
- Competitor price monitoring — agent checks a pricing page daily, fires a webhook to Slack if the price changed
- Job posting tracker — agent scans a company's careers page hourly, fires a webhook when a new role appears matching specified criteria
- News and press release alert — agent monitors a company's newsroom or search results, sends a daily webhook digest of new articles
- Inventory or availability watcher — agent polls a product page for "in stock" status, fires once when stock becomes available
- Scheduled data extraction — agent pulls structured data from a page on a schedule and POSTs it to a database endpoint, replacing a brittle scraper script
Troubleshooting
- Webhook fires every run even when nothing changed: Your conditional action logic isn't filtering correctly. Add a more explicit instruction: "Only call the webhook action if you detected a change from the previous run. If nothing changed, end the task without calling any action."
- Payload arrives as a string, not JSON: The agent is wrapping the JSON in a prose sentence. Add to your instructions: "Return only the raw JSON object with no additional text, no code fence, and no explanation."
- Agent fails to load the target page: The page may use JavaScript rendering that the agent's browser tool can't handle, or it may be blocking automated access. Try instructing the agent to use a search engine to find the information instead of fetching the URL directly.
- Webhook endpoint returns a 4xx error: Check your Authorization header and Content-Type. Most webhook endpoints return 400 if the body isn't valid JSON or 401 if the token is wrong or expired.