# Hourly Gmail Categorizer with Urgent Telegram Alerts

> Runs every hour to fetch unread Gmail emails, categorizes them into four buckets (Account Notifications, Marketing, Human, Urgent), and sends a Telegram alert for any urgent emails that need a timely response. Non-urgent runs are logged silently.

Content type: workflow
Source URL: https://www.agentpmt.com/agent-workflow-skills/hourly-gmail-categorizer-with-urgent-telegram-alerts
Markdown URL: https://www.agentpmt.com/api/agent/workflows/hourly-gmail-categorizer-with-urgent-telegram-alerts?format=agent-md
Updated: 2026-06-11T18:30:37.537Z
Author: firef1ie

---

Estimated time saved: 30 minutes.

## Tools

- Gmail - All Email Actions
- Telegram Instant Messenger

## Workflow Outline

1. Fetch Recent Gmail Emails: Search Gmail for all unread emails received in the last hour. Return the full list of emails including sender, subject, snippet, and any relevant metadata so they can be categoriz...
2. Categorize Emails: Goal: Categorize each email into one of four categories: Account Notifications, Marketing, Human, or Urgent | Inputs: List of emails from Gmail, each with sender, subject line, body snippet, and metadata | Outputs: A st...
3. Are There Urgent Emails?: Choose one of multiple workflow paths based on the current result.
4. Format Urgent Email Alert: Goal: Format a clear and concise Telegram alert message listing all urgent emails | Inputs: The list of emails categorized as Urgent, each with sender, subject, and reason for urgency | Outputs: A well-formatted Telegra...
5. Log No Urgent Emails: No urgent emails were found in the latest Gmail check. Log this result and summarize the email categories found (Account Notifications, Marketing, Human counts) for record-keeping. Output a brief summary string.
6. Send Urgent Alert via Telegram: Send the formatted urgent email alert message to the user via Telegram. Use the send_message action and include the full formatted alert text from the previous prompt step.

## Frequently Asked Questions

### How do I connect this workflow to my local agent like OpenClaw or Claude Code?

You can install the local MCP server by opening a terminal and running:

```
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

This will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.

Alternatively you can connect to the hosted version with this config block, no installation required:

```
{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}
```

[View MCP Connection Instructions](/docs/mcp-reference/connection) for more details.

### How do I trigger this workflow?

You can use it here in the browser by clicking the 'Try It' button.

If you 'star' the workflow it will save to your dashboard for quick access.

To use the workflow in an external agent, make sure you have followed the steps to connect it to the MCP server and then copy / paste this prompt, or just tell it to use the AgentPMT MCP server and use this workflow.

> Call the AgentPMT-Workflow-Skills tool with action 'get\_workflow\_skill' and skill\_id 6a2afdddfa26ba141e3e9e6a ("Hourly Gmail Categorizer with Urgent Telegram Alerts").