# Gmail Inbox Triage to Telegram - Urgency and Intent

> Sweeps your Gmail inbox for emails received in the last 24 hours, looks up each sender's prior Gmail history to classify them as existing customer, new inquiry, marketing, or automated, scores urgency, and sends a single Telegram digest containing only the high and medium urgency emails that actually need your reply. Skips marketing, no-reply notifications, and one-way confirmations.

Content type: workflow
Source URL: https://www.agentpmt.com/agent-workflow-skills/gmail-inbox-triage-to-telegram-urgency-and-intent
Markdown URL: https://www.agentpmt.com/api/agent/workflows/gmail-inbox-triage-to-telegram-urgency-and-intent?format=agent-md
Updated: 2026-05-27T01:07:46.076Z
Author: firef1ie

---

Estimated time saved: 25 minutes.

## Tools

- Gmail - All Email Actions
- Telegram Instant Messenger

## Workflow Outline

1. Search Gmail Last 24h: Fetch all inbox emails received in the last 24 hours, excluding emails the user sent. Return up to 50 messages with message_id, thread_id, sender, subject, snippet, and date. This...
2. Triage Each Email: Repeat this section for each email. For each candidate email: read its full body, look up the sender's prior Gmail history, then classify intent and urgency. Emit one classifi...
3. Read Full Email: Fetch the full content of the current email using its message_id from the loop variable. Extract sender name, sender email, subject, plain-text body, and received date for downstr...
4. Build Telegram Digest: Goal: Compose a single Telegram-ready HTML message that lists only emails with needs_response=true, grouped by urgency, distinguishing existing customers from new inquiries. | Inputs: Array of classification records pro...
5. Look Up Sender History: Search Gmail for prior conversation history with this sender. Set q to 'from:<sender_email> older_than:1d' using the sender email from the previous step. Capture: total prior mess...
6. Send Telegram Digest: Send the digest produced by the previous step to the budget-bound Telegram chat. Pass the digest HTML as the 'text' parameter and keep parse_mode=HTML. This is the final delivery...
7. Classify Urgency and Intent: Goal: Classify this email by intent and urgency using its content plus the sender's prior Gmail history. | Inputs: Current email (sender_name, sender_email, subject, body, date) and the prior-history summary (count of p...

## 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 6a16438899942aa48e2f1d0c ("Gmail Inbox Triage to Telegram - Urgency and Intent").