Introduction to Agentic AI4 of 18 steps (22%)

Your First OpenClaw Automation: Clear Your Inbox

Introduction: From Chat to Execution

This tutorial walks you through building your first practical OpenClaw automation: having OpenClaw summarize your unread emails, organize them by sender, identify which ones need replies, and optionally archive or delete them. By the end, you'll understand how OpenClaw transforms natural language requests into real actions on your system. This is the "hello world" of automation—simple enough to understand, practical enough to save you time, and powerful enough to inspire bigger ideas.

Let's build your first practical automation: have OpenClaw manage your inbox so you get a clear picture of what needs attention without manually reviewing every email.

What You'll Need Before Starting

Gather these items before you begin:

  • OpenClaw installed and running. If you just installed it, make sure the daemon is still running. Check: openclaw daemon status should return "running."
  • OpenClaw connected to a chat app. WhatsApp, Telegram, Discord, or Slack—pick whichever is easiest for you. You'll send commands through your chosen app.
  • Email account access. Gmail, Outlook, or another supported provider. You'll need to authenticate OpenClaw to access your inbox.
  • A few unread emails to test with. It's safer to practice on a live inbox with real emails than to create fake test messages.

Step 1: Install the Email Skill

OpenClaw's capabilities are extended through skills. A skill is an integration—a way to connect OpenClaw to an external service like email, calendar, or file storage.

Open your terminal and install the email skill:

openclaw skills install email

What to expect: The terminal will display "Installing email skill..." and then guide you through authentication. This depends on your email provider:

For Gmail: A browser window will open. Sign in with your Google account. Google will ask permission for OpenClaw to access your email. Click "Allow." The browser will confirm success and close. This uses OAuth—a secure authentication method that doesn't require storing your password.

For Outlook/Office 365: Similar OAuth flow through Microsoft's login.

For other providers: You may be asked for an app-specific password. This is a special password (different from your regular password) that gives OpenClaw access without exposing your real password.

Why this matters: This authentication step is secure. Your password is never stored by OpenClaw. Instead, OpenClaw gets a token (a temporary credential) that lets it access only email, nothing else.

What might go wrong: If you get "timed out waiting for auth," the browser window may have opened in the background. Check your other windows. Or try again; sometimes the popup gets blocked.

You're done when: You see "Email skill installed successfully" in the terminal.

Step 2: Test the Skill with a Simple Request

Now go to your chat app (WhatsApp, Telegram, Discord, etc.) and send OpenClaw a test message:

How many unread emails do I have?

What to expect: OpenClaw will use the email skill to connect to your inbox, count unread messages, and respond with a number. This might take 5-10 seconds (it's reaching out to Gmail/Outlook and back).

What to look for: The response should be a specific number: "You have 23 unread emails" or similar. If OpenClaw doesn't respond, check:

  • Is the daemon still running? Check: openclaw daemon status
  • Did the email skill actually install? Check: openclaw skills list | grep email
  • Are you messaging the right chat platform where OpenClaw is configured?

This simple test confirms the entire chain works: your chat app → OpenClaw → email skill → your email provider → response back.

Step 3: Summarize Your Unread Emails

Now ask OpenClaw to do real work. Send this message:

Summarize my unread emails from the last 24 hours. Group them by sender. Tell me which ones need a reply.

What to expect: OpenClaw will:

  1. Fetch your unread emails from the last 24 hours
  2. Send them to Claude (or your configured LLM) for analysis
  3. Return a structured summary grouped by sender
  4. Flag which emails likely need action (e.g., questions directed at you)

You might see something like:

You have 18 unread emails from the last 24 hours.

From alice@company.com (3 emails):
- Status update on Project X
- Question about API availability [NEEDS REPLY]
- Scheduling request for next week

From bob@company.com (2 emails):
- FYI: Deployment successful
- Question about database optimization [NEEDS REPLY]

From notifications@github.com (13 emails):
- PR comments and notifications

What to look for: OpenClaw should understand context. It recognizes that "FYI" messages don't need replies but questions do. This is where the AI reasoning shines.

What might go wrong: If OpenClaw returns "can't access emails," verify the email skill authentication completed. Try openclaw skills test email to debug.

Step 4: Add Actions—Archive and Delete

Summarization is helpful, but the real power is automation. Now ask OpenClaw to take action:

Archive all emails from newsletters@example.com that I haven't opened in the last week.

What to expect: OpenClaw will:

  1. Identify which emails match this criteria (from that sender, unread or old)
  2. Generate a plan: "I found 47 newsletter emails. I will archive them."
  3. Wait for your approval before executing

You're done when: You review the plan and decide whether to proceed. This is critical—destructive actions require your confirmation.

If the plan looks good, respond:

Go ahead

OpenClaw will then archive those emails and report back: "Archived 47 emails."

What might go wrong: If you see "Not enough context," OpenClaw may need more specific criteria. Be more precise:

Archive all emails from newsletters@example.com from before March 1st

Step 5: Schedule It (Optional)

You can schedule this to run automatically. Send:

Every morning at 8am, summarize my unread emails and send the summary to this chat.

What to expect: OpenClaw sets up a background task. Tomorrow at 8am, you'll receive your daily email summary without asking.

Why this matters: What started as a manual ritual (checking email, reading through 20 messages) becomes automatic. You wake up to a curated summary.

What might go wrong: Scheduling depends on your chat platform. Some (Telegram, Discord) handle it better than others. If it doesn't work, you can always ask for summaries manually.

Step 6: Iterate and Refine

Now you've seen the basics. Try variations:

Delete all emails from [marketing-list] that are older than 3 months
Label all emails from [client-name] with the tag 'urgent' so I find them later
Send a template reply to all emails from [team-lead] saying "Got it. Will review and respond by EOD."

Each of these builds on the same foundation: describe the intent, OpenClaw plans, you approve, it executes.

Safety Tips: Protecting Your Email

Start small. You're giving OpenClaw access to your email—arguably your most sensitive digital asset. Here's how to stay safe:

  1. Start with read-only. Summarize, don't delete. Get comfortable with the results. Then add write access.
  2. Use filters first. Start with low-stakes emails: newsletters, notifications, marketing. Not the inbox from your CEO.
  3. Review every plan. OpenClaw tells you what it's about to do before it does it. Read it carefully. Ask "does this make sense?"
  4. Test with old emails. "Delete emails from 2020" is lower risk than "delete recent emails."
  5. Keep backups. Gmail has a trash folder. You can recover deleted emails for 30 days. Use that as your safety net while learning.

Troubleshooting

"Permission denied" when deleting: The email skill may not have been granted delete permissions. Try:

openclaw skills remove email
openclaw skills install email

When re-authenticating, look for any prompts asking for additional permissions.

"Timeout" when processing large inboxes: Fetching 1000+ emails is slow. Start with filtered requests:

Summarize unread emails from the last 7 days only

OpenClaw isn't recognizing emails from a specific sender: Try using the full email address, not just the name.

Next Steps

You now understand the core automation pattern: request → plan → approve → execute. Try scaling it:

  1. Automate calendar. Install the calendar skill. Have OpenClaw book time for you, remind you of important meetings, send event invites.
  2. Manage files. Install the file system skill. Have it organize downloads, batch-rename files, clean up duplicates.
  3. Execute commands. Install shell access (carefully!). Have it restart services, run backups, trigger deployments.
  4. Combine skills. "Summarize today's emails, calendar, and task list in my morning briefing."

Each automation you build makes the next one easier. Welcome to the automation age.

Discussion

  • Loading…

← Back to learning path