Automate repetitive computer tasks including file operations, data processing, web scraping, and API integrations. Use when you need to batch process files,...
Universal task automation skill for OpenClaw. Automate file operations, data processing, API calls, and create custom workflows with scheduling support.
python scripts/run_task.py --task file_organizer --config tasks/organize.json
python scripts/schedule_task.py --task data_backup --cron "0 2 * * *"
python scripts/run_workflow.py --workflow ecommerce_sync
Organize files by type, date, or custom rules.
Config (tasks/organize.json):
{
"source": "~/Downloads",
"destination": "~/Organized",
"rules": [
{"extension": ".pdf", "folder": "Documents"},
{"extension": ".jpg", "folder": "Images"},
{"extension": ".mp4", "folder": "Videos"}
]
}
Convert between CSV, JSON, Excel formats.
Usage:
python scripts/convert_data.py --input data.csv --output data.json --format json
Sync data between two APIs.
Config (tasks/api_sync.json):
{
"source": {
"type": "api",
"url": "https://api.source.com/data",
"auth": "bearer_token"
},
"destination": {
"type": "api",
"url": "https://api.dest.com/items",
"auth": "api_key"
},
"mapping": {
"source_field": "dest_field"
}
}
Monitor websites and send alerts.
Config (tasks/monitor.json):
{
"urls": [
{"url": "https://example.com/product", "check": "price < 100"}
],
"alert": {
"type": "email",
"to": "you@example.com"
}
}
Process orders from Taobao/Douyin stores.
Config (tasks/order_process.json):
{
"stores": ["taobao", "douyin"],
"actions": [
"fetch_new_orders",
"update_inventory",
"generate_shipping_labels",
"send_confirmation_email"
]
}
Execute a single automated task.
Arguments:
--task - Task name--config - Task configuration file--dry-run - Simulate without executing--verbose - Detailed loggingSchedule recurring tasks.
Arguments:
--task - Task name--cron - Cron expression (e.g., "0 2 * * *")--config - Task config fileExecute multi-step workflows.
Arguments:
--workflow - Workflow name--steps - Run specific steps only--continue-on-error - Don't stop on errors# scripts/tasks/my_task.py
from base_task import BaseTask
class MyTask(BaseTask):
def run(self, config):
# Your automation logic here
self.log("Starting task...")
# Process
result = self.process(config)
# Return status
return {"status": "success", "data": result}
{
"name": "my_task",
"description": "What this task does",
"config_schema": {
"required": ["input_path", "output_path"],
"properties": {
"input_path": {"type": "string"},
"output_path": {"type": "string"}
}
}
}
Add to tasks/registry.json:
{
"my_task": {
"script": "tasks/my_task.py",
"config": "tasks/my_task.json"
}
}
Workflows chain multiple tasks together.
Example: E-commerce Daily Sync
name: ecommerce_daily_sync
steps:
- task: fetch_orders
stores: [taobao, douyin]
- task: update_inventory
sync_stores: true
- task: generate_reports
format: excel
- task: send_summary
channel: email
Use cron expressions for scheduling:
| Expression | Meaning |
|---|---|
0 * * * * | Every hour |
0 2 * * * | Daily at 2 AM |
0 9 * * 1-5 | Weekdays at 9 AM |
0 0 1 * * | First of every month |
# Daily order sync
python scripts/run_task.py --task order_sync --config tasks/taobao_sync.json
# Inventory update
python scripts/run_task.py --task inventory_update --config tasks/inventory.json
# Price monitoring
python scripts/run_task.py --task price_monitor --config tasks/prices.json
.env files (never commit them)logs/ directoryZIP package — ready to use