Automations
Automations let you schedule recurring tasks, react to webhooks, and trigger AI workflows — all managed through the 1Claw API. Use them for secret rotation schedules, periodic health checks, webhook-driven pipelines, or any repeatable operation your agents need.
Requirements
Automations are available on all tiers with varying limits. See Tier Limits below.
Overview
An automation consists of:
- Trigger — what causes the automation to run (cron schedule, inbound webhook, lifecycle event, or manual invocation)
- Action — what happens when triggered (rotate a secret, make an HTTP request, or execute an AI workflow)
- Workflow spec — a JSON definition of the steps to execute
Creating an Automation
curl -X POST "https://api.1claw.xyz/v1/automations" \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Rotate API Keys Weekly",
"description": "Rotates all third-party API keys every Monday at 3am UTC",
"trigger_type": "cron",
"trigger_config": {
"cron": "0 3 * * 1"
},
"action_type": "rotate_secret",
"action_config": {
"vault_id": "VAULT_UUID",
"paths": ["api-keys/stripe", "api-keys/openai"],
"length": 48,
"charset": "alphanumeric"
},
"is_active": true
}'
Trigger Types
| Type | Description | trigger_config fields |
|---|---|---|
cron | Runs on a cron schedule (UTC) | cron — standard 5-field cron expression |
webhook | Runs when the auto-generated webhook URL receives a POST | secret (optional) — HMAC-SHA256 verification secret |
event | Runs on vault/agent lifecycle events | events[] — e.g. ["secret.created", "agent.deactivated"] |
manual | Only runs when explicitly triggered via API or dashboard | (none) |
Cron examples
| Expression | Meaning |
|---|---|
0 */6 * * * | Every 6 hours |
0 3 * * 1 | Monday at 3:00 UTC |
*/15 * * * * | Every 15 minutes |
0 0 1 * * | First of each month at midnight |
Webhook trigger
When you create a webhook-triggered automation, the response includes a webhook_url:
https://api.1claw.xyz/v1/automations/AUTOMATION_ID/webhook
Send a POST request to this URL to trigger the automation. If you set a secret in the trigger config, include an X-Webhook-Signature header with the HMAC-SHA256 of the request body.