ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified communication Safety 4/5

mailgun

Send emails via Mailgun API. Use when the user needs to send emails programmatically, such as newsletters, notifications, alerts, or automated reports. Requires MAILGUN_API_KEY and MAILGUN_DOMAIN environment variables to be configured.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/alphafactor/mailgun
Or

What This Skill Does

The Mailgun skill for OpenClaw provides a robust interface for sending transactional and bulk emails directly through the Mailgun HTTP API. It abstracts the complexities of RESTful API calls into a simple, environment-backed command-line utility. By leveraging your existing Mailgun account infrastructure, this skill enables programmatic communication directly from your terminal or AI-driven workflows. It handles authentication, routing, and payload delivery, supporting both plain text and HTML-formatted emails, making it an essential tool for developers and administrators who need to integrate automated messaging into their daily operations.

Installation

To begin using the Mailgun skill, first install it via the clawhub repository using the command: clawhub install openclaw/skills/skills/alphafactor/mailgun. Once installed, you must configure your credentials by adding them to your shell profile (~/.zshrc or ~/.bash_profile). You will need your private API key and your authorized domain from the Mailgun dashboard. Define the following variables: MAILGUN_API_KEY, MAILGUN_DOMAIN, and MAILGUN_FROM. Optionally, you can set a MAILGUN_DEFAULT_TO variable to streamline repetitive sends. After saving your configuration file, run source ~/.zshrc to refresh your environment. The skill is now ready to send automated notifications through the provided script path.

Use Cases

This skill is designed for scenarios requiring automated, programmatic outreach. Primary use cases include: 1) System Monitoring: sending alerts when server metrics exceed thresholds. 2) Automated Reporting: dispatching generated PDF or CSV reports to stakeholders on a set schedule. 3) User Engagement: managing newsletters or transactional updates. 4) Infrastructure Management: sending deployment status notifications or recurring cron job outcome reports. By automating these tasks, you eliminate the overhead of manual email composition and ensure consistent, reliable communication across your development lifecycle.

Example Prompts

  1. "Send a system alert email with the subject 'Disk Usage Warning' to [email protected] stating that the root partition is at 95% capacity."
  2. "Use the Mailgun skill to send my weekly status report to my manager, subject: 'Weekly Progress: Project X', content: 'Here is the summary of this week's commits.'"
  3. "Send a test email to the default recipient with the subject 'Health Check' and include a simple HTML body saying '<b>System Operational</b>'."

Tips & Limitations

To ensure security, never hardcode your API credentials within scripts; always use the environment variable approach. When sending HTML, ensure your markup is well-formed to prevent rendering issues in email clients. Note that this skill relies on an active internet connection to communicate with Mailgun servers. If you encounter a 401 error, verify that your API key is not expired or restricted. For high-volume mailing, ensure your Mailgun domain is properly verified with SPF and DKIM records to prevent emails from landing in spam folders.

Metadata

Stars3992
Views5
Updated2026-04-10
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-alphafactor-mailgun": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#email#automation#notifications#mailgun#messaging
Safety Score: 4/5

Flags: network-access, external-api