Complete tutorial to automate repetitive tasks and create custom workflows
This tutorial will show you how to automate repetitive tasks with OpenClaw (formerly Moltbot, Clawdbot). You'll learn to create cron jobs, set up webhooks, and build custom automation workflows. Estimated time: 25-35 minutes.
By the end of this tutorial, you'll have:
Before starting:
Let's start with a simple daily briefing automation:
{
"cron": {
"jobs": [
{
"schedule": "0 9 * * *",
"command": "agent --message 'Give me a daily briefing: check my calendar, summarize important emails, and list my tasks for today.'"
}
]
}
}
This runs every day at 9 AM. The schedule format is: minute hour day month weekday
0 9 * * * - Every day at 9:00 AM*/30 * * * * - Every 30 minutes0 */2 * * * - Every 2 hours0 0 * * 1 - Every Monday at midnightWebhooks allow external services to trigger OpenClaw actions:
{
"webhooks": {
"github": {
"path": "/webhook/github",
"command": "agent --message 'Process GitHub webhook: {payload}'"
},
"sentry": {
"path": "/webhook/sentry",
"command": "agent --message 'New Sentry error: {payload}'"
}
}
}
Once configured, external services can POST to your webhook URLs to trigger OpenClaw actions.
Let's create a comprehensive workflow example: Automated Daily Report
{
"cron": {
"jobs": [
{
"schedule": "0 18 * * *",
"command": "agent --message 'Generate my daily report: 1) Summarize today\\'s calendar events, 2) List completed tasks, 3) Check for important emails, 4) Provide tomorrow\\'s agenda. Format as a markdown report and save it.'"
}
]
}
}
This creates a comprehensive daily report every evening at 6 PM.
Connect OpenClaw with external services for powerful automation:
Automatically review pull requests:
Monitor RSS feeds and get notified of updates:
Explore advanced automation capabilities:
Test your automation setup: