Skip to main content
Beta Feature: Automations is currently in beta and available for OpenHands Cloud and OpenHands Enterprise users only.
Copy and adapt these examples to create your own automations. Just paste the prompt into a conversation with OpenHands.
These examples reference services like Slack and GitHub. Git providers you logged in with are automatically available, but other services like Slack require MCP configuration.

Reporting

Daily GitHub Summary

Create an automation called "Daily GitHub Summary" that runs every weekday at 9 AM Eastern.

It should:
1. Summarize PRs opened, merged, and reviewed in the last 24 hours
2. List any PRs that have been open for more than 3 days
3. Format as a clean markdown summary
4. Post to the #engineering Slack channel

Weekly Metrics Report

Create an automation called "Weekly Metrics" that runs every Monday at 9 AM.

It should generate a weekly report covering:
- GitHub activity (commits, PRs merged, issues closed)
- Open issues grouped by priority
- PRs awaiting review for more than 3 days

Save the report to weekly-reports/ with the current date in the filename.

Monitoring

API Health Check

Create an automation called "API Health Monitor" that runs every 30 minutes.

It should check https://api.example.com/health and:
- If the response is not 200 OK, send an alert to #alerts with the status code and response body
- If healthy, just log success without alerting anyone

SSL Certificate Monitor

Create an automation called "SSL Monitor" that runs daily at 8 AM.

It should check SSL certificate expiry for these domains:
- api.example.com
- app.example.com  
- www.example.com

If any certificate expires within 30 days, alert #devops with the domain and days remaining.

Maintenance

Weekly Cleanup

Create an automation called "Weekly Cleanup" that runs every Sunday at 2 AM UTC.

It should:
1. Find and delete temporary files older than 7 days
2. Create a summary of what was removed (file paths and sizes)
3. Post the cleanup summary to #ops

Backup Verification

Create an automation called "Backup Check" that runs daily at 6 AM.

It should verify that database backups exist and were created within the last 24 hours.
List the most recent backup for each database with its timestamp and size.
If any backup is missing or stale, send an urgent alert to #alerts.

Data Sync

Analytics Data Sync

Create an automation called "Analytics Sync" that runs every 6 hours.

It should:
1. Pull the latest data from our analytics API
2. Update metrics.json with the new data
3. Calculate week-over-week changes for key metrics
4. If any metric changed by more than 20%, flag it in a summary message

Code Quality

Dependency Checker

Create an automation called "Dependency Checker" that runs every Monday at 8 AM.

It should:
1. Scan all package.json and requirements.txt files
2. Check for outdated dependencies
3. Create a report listing packages with available updates (grouped by major/minor/patch)
4. Post the report to #engineering

Security Scan

Create an automation called "Security Scan" that runs daily at 3 AM.

It should run a security audit:
1. Check for known vulnerabilities in dependencies
2. Scan for hardcoded secrets or API keys
3. Look for common security misconfigurations

Create a detailed report and alert #security if any high or critical issues are found.

Tips for Writing Good Prompts

Be Specific About Actions

Tell the automation exactly what to do:
  • “Check X and if Y, then Z”
  • “Generate a report and save it to…”
  • “Fetch data, compare with expected values, and report differences”

Include Error Handling

Specify what should happen when things go wrong:
  • “If the response is not 200…”
  • “If any backup is missing…”
  • “If the check fails, alert the team”

Define Where Results Go

Be explicit about outputs:
  • “Post to the #channel Slack channel”
  • “Save to reports/ with the current date”
  • “Create a GitHub issue with the findings”

Next Steps