home / skills / openclaw / skills / resend

resend skill

/skills/mjrussell/resend

This skill helps you manage inbound emails and attachments via the Resend API, enabling you to list, retrieve, and inspect content.

npx playbooks add skill openclaw/skills --skill resend

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.1 KB
---
name: resend
description: Manage received (inbound) emails and attachments via Resend API. Use when user asks about their emails, received messages, or email attachments.
homepage: https://resend.com
metadata:
  clawdbot:
    emoji: "📧"
    requires:
      bins: ["resend"]
      env: ["RESEND_API_KEY"]
---

# Resend CLI

CLI for the Resend email API. Query received (inbound) emails and attachments.

## Installation

```bash
npm install -g @mjrussell/resend-cli
```

## Setup

1. Sign up at [resend.com](https://resend.com)
2. Set up inbound email routing for your domain
3. Create API key at API Keys → Create API key (needs read permissions)
4. Set environment variable: `export RESEND_API_KEY="re_your_key"`

## Commands

### List Emails

```bash
resend email list              # List recent emails (default 10)
resend email list -l 20        # List 20 emails
resend email list --json       # Output as JSON
```

### Get Email Details

```bash
resend email get <id>          # Show email details
resend email get <id> --json   # Output as JSON
```

### Attachments

```bash
resend email attachments <email_id>                    # List attachments
resend email attachment <email_id> <attachment_id>     # Get attachment metadata
resend email attachments <email_id> --json             # Output as JSON
```

### Domains

```bash
resend domain list             # List configured domains
resend domain get <id>         # Get domain details with DNS records
resend domain list --json      # Output as JSON
```

## Usage Examples

**User: "Do I have any new emails?"**
```bash
resend email list -l 5
```

**User: "Show me the latest email"**
```bash
resend email list --json | jq -r '.data.data[0].id'  # Get ID
resend email get <id>
```

**User: "What attachments are on that email?"**
```bash
resend email attachments <email_id>
```

**User: "What domains do I have set up?"**
```bash
resend domain list
```

**User: "Show me the full content of email X"**
```bash
resend email get <email_id>
```

## Notes

- This CLI only supports **received (inbound)** emails, not sending
- Use `--json` flag and pipe to `jq` for scripting
- Email IDs are UUIDs shown in list output

Overview

This skill manages received (inbound) emails and attachments using the Resend API. It provides CLI commands to list emails, view full message details, inspect attachments, and list configured domains. Use it to query your inbound email traffic, download or inspect attachments, and integrate inbox data into scripts or automation.

How this skill works

The skill uses Resend's inbound email endpoints via a CLI wrapper to query recent messages, fetch individual email records, and list or retrieve attachment metadata. It supports JSON output for scripting and requires a Resend API key with read permissions set in an environment variable. Email and attachment identifiers are UUIDs returned by the list commands.

When to use it

  • Check whether you have new inbound emails or recent activity
  • Inspect the full content or headers of a specific received email
  • List or download attachments from a particular inbound message
  • Audit which domains are configured for inbound routing
  • Integrate inbound email queries into automation or monitoring scripts

Best practices

  • Keep RESEND_API_KEY in a secure environment variable and restrict key permissions to read-only
  • Use the --json flag and pipe to jq for scripting and extracting IDs or fields
  • Limit list queries with a -l flag to control bandwidth and pagination
  • Verify inbound routing and DNS records in the domain details when troubleshooting delivery
  • Treat attachments as untrusted content—scan before opening or processing

Example use cases

  • Quickly check the last 10 inbound emails: list recent messages to spot notifications or form submissions
  • Retrieve the full content of a message for debugging an inbound webhook or automated reply
  • List attachments for an email and fetch attachment metadata for automated processing or archival
  • Script a nightly backup by listing emails with --json and downloading attachments with parsed IDs
  • Confirm which domains are active for inbound routing and inspect DNS records when setting up or migrating domains

FAQ

Does this skill send email?

No. It only supports received (inbound) email queries and attachment inspection, not sending messages.

How do I authenticate?

Create a Resend API key with read permissions and set it as RESEND_API_KEY in your environment before using commands.