# Start the day with one summary of your inbox

Source: https://clickruntime.com/use-cases/email-summary-every-morning

> Ask once. Every morning ClickRuntime reads the emails that arrived since yesterday, has AI group them by what needs doing, and sends you one short summary with links back to the messages.

## Can ChatGPT or Claude summarise my emails every morning?

They can summarise emails during a chat if they're connected to your mail, but they won't do it each morning without you asking. With ClickRuntime connected, your assistant sets up an automation that reads what arrived in Gmail since the last summary, groups it with the built-in AI, and emails you one summary each morning.

### Why the assistant can't do this on its own

- A morning summary needs a schedule, not a chat.
- “Since the last summary” needs memory of when that was. The automation keeps it in state.
- Gmail access every day needs a stored Google connection that refreshes itself.

## Set it up from your AI assistant

Prompt to copy:

> Create a ClickRuntime automation: every weekday at 7:30 America/Los_Angeles, read the emails that arrived in my Gmail inbox since the last summary. Email me a summary in three groups: needs a reply, FYI, and newsletters or notifications. One line per email with the sender. Skip anything I already read.

1. **Connect ClickRuntime to your assistant.** Add ClickRuntime as a connector (MCP server) in ChatGPT, Claude, Cursor or another MCP client, using https://clickruntime.com/api/mcp. You sign in with Google or email; there is no API key to copy. This is done once per assistant.
2. **Paste the prompt.** Start a new chat and paste: “Create a ClickRuntime automation: every weekday at 7:30 America/Los_Angeles, read the emails that arrived in my Gmail inbox since the last summary. Email me a summary in three groups: needs a reply, FYI, and newsletters or notifications. One line per email with the sender. Skip anything I already read.” Change the details (times, channels, addresses) to yours.
3. **Read the draft.** The assistant restates what will happen, asks for anything missing, such as your timezone or which channel to post to, and saves a draft automation. A draft never runs on its own, so nothing happens until you agree.
4. **Connect accounts and save keys.** The assistant asks you to connect your Google account in the ClickRuntime dashboard with read access to Gmail. Nothing is sent from your account; the summary arrives from ClickRuntime to your own address.
5. **Test it.** The assistant runs it once now for the last 24 hours and you receive the summary.
6. **Turn it on.** The assistant tells you what will run, when, and which services it will contact, then asks your permission to turn it on. From then on it runs on ClickRuntime's servers, and you can close the chat.
7. **Check it in the ClickRuntime dashboard.** Each run shows how many emails were read and how many were put in each group. State holds when the last summary ran.

Connector setup for each assistant: https://clickruntime.com/assistants

## What the assistant writes

`inbox_morning_summary.py`

```python
import time
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, state, notify, ai, log

SCHEMA = {"type": "object", "properties": {"groups": {"type": "array", "items": {
    "type": "object", "properties": {"n": {"type": "integer"}, "group": {"type": "string", "enum": ["reply", "fyi", "newsletter"]},
    "line": {"type": "string"}}, "required": ["n", "group", "line"]}}}, "required": ["groups"]}

@on_trigger
def run(event):
    since = state.get("since") or int(time.time()) - 86400
    gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    ids = gmail.users().messages().list(userId="me", q=f"in:inbox is:unread after:{since}", maxResults=100).execute().get("messages", [])
    mails = []
    for m in ids:
        msg = gmail.users().messages().get(userId="me", id=m["id"], format="metadata",
                                           metadataHeaders=["From", "Subject"]).execute()
        h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
        mails.append({"id": m["id"], "from": h.get("From", ""), "subject": h.get("Subject", ""), "snippet": msg.get("snippet", "")[:200]})
    now = int(time.time())
    if not mails:
        state.set("since", now)
        notify.email_me("Inbox summary: nothing new", "No unread emails since the last summary.")
        return {"emails": 0}

    listing = "\n".join(f"{i}. {m['from']} | {m['subject']} | {m['snippet']}" for i, m in enumerate(mails))
    try:
        rows = ai.generate(listing, system="Put each email in a group (reply, fyi, newsletter) and write one short line about it.",
                           json_schema=SCHEMA, max_output_tokens=1500).json["groups"]
    except ai.AIError as e:
        log.warning("AI unavailable, listing subjects", {"code": getattr(e, "code", None)})
        rows = [{"n": i, "group": "fyi", "line": m["subject"]} for i, m in enumerate(mails)]

    parts = []
    for group, title in [("reply", "Needs a reply"), ("fyi", "FYI"), ("newsletter", "Newsletters and notifications")]:
        items = [r for r in rows if r["group"] == group and 0 <= r["n"] < len(mails)]
        if items:
            parts.append(title + "\n" + "\n".join(
                f"- {mails[r['n']]['from']}: {r['line']}  https://mail.google.com/mail/u/0/#inbox/{mails[r['n']]['id']}" for r in items))
    notify.email_me(f"Inbox summary: {len(mails)} new", "\n\n".join(parts))
    state.set("since", now)
    return {"emails": len(mails)}
```

- Only the sender, subject and Gmail's short snippet are read, not whole bodies or attachments.
- One AI call groups every email at once and returns a label and line for each.
- The last summary time is kept in state so each email appears in one summary only.

## A schedule, not a trigger link

A weekday morning schedule in your timezone. Add a second run after lunch if you want two summaries a day.

## Limits

- Reads Gmail through Google's API with the account you connect. Other mail providers work through their own APIs; IMAP isn't available.
- The summary is emailed to your own address.
- About 100 emails per summary in this example; ask for more if your inbox is busier.

## Troubleshooting

### It includes emails I've already read.

Ask your assistant to keep the is:unread filter, or change it to only messages not yet summarised.

### connection_needs_reauth in the run.

Reconnect your Google account in the ClickRuntime dashboard; nothing else needs to change.

## Related

- [Gmail automations](https://clickruntime.com/apps/gmail)
- [Outlook automations](https://clickruntime.com/apps/outlook)
- [Slack automations](https://clickruntime.com/apps/slack)
- [triage-support-requests](https://clickruntime.com/templates/triage-support-requests)
- [Sort Gmail automatically](https://clickruntime.com/use-cases/gmail-triage)
- [Morning briefing](https://clickruntime.com/use-cases/morning-briefing)
- [AI triage and summaries](https://clickruntime.com/use-cases/ai-classify-and-summarise)
- [Assistant scheduled tasks alternative](https://clickruntime.com/alternatives/chatgpt-claude-scheduled-tasks)
- [Google Apps Script alternative](https://clickruntime.com/alternatives/google-apps-script)
- [Docs: connections-and-secrets](https://clickruntime.com/docs/connections-and-secrets)
- [Docs: state](https://clickruntime.com/docs/state)

## Extend it: what you can add next

The first version is rarely the last. Because the automation is a Python script with memory, AI and any API available, you grow it by asking your assistant for the change. Each change is a new version, and a failed deploy never replaces the working one.

- **Draft short replies for the emails that need one** (Built-in AI)
  Prompt: "Change my inbox summary so each email that needs a reply comes with a two-line draft reply I can copy."
- **Add Gmail labels to match the groups** (Any app or API)
  Prompt: "Add to my inbox summary: label each email in Gmail as Needs reply, FYI or Newsletter."
- **Turn emails that need action into Todoist tasks** (Any app or API)
  Prompt: "Add to my inbox summary: create a Todoist task for each email that needs a reply, linking to the email."
- **Always put emails from key people at the top** (Multi-step logic)
  Prompt: "Change my inbox summary so emails from my manager and these three clients always come first, whatever their group."
- **A second summary after lunch** (Schedules)
  Prompt: "Add to my inbox summary: a second summary at 13:30 on weekdays with what arrived since the morning."
- **Remind me about emails still unanswered after two days** (Memory between runs)
  Prompt: "Add to my inbox summary: list emails that needed a reply two days ago and still have no reply from me."

## Questions

### Can ChatGPT summarise my emails every morning?

With ClickRuntime connected, yes. ChatGPT sets up an automation that reads your Gmail each morning and emails you a summary.

### Can Claude read my Gmail and send me a digest?

Yes, through ClickRuntime, with a Google account you connect in the ClickRuntime dashboard.

### Does it read the full content of my emails?

This example reads only sender, subject and Gmail's snippet. You can ask for more, which uses more AI tokens.

### Does it work with Outlook?

Yes, through Microsoft Graph with your Microsoft app's OAuth details added in the ClickRuntime dashboard.

### Can it reply for me?

It can draft replies for you to send. Sending on your behalf is possible through Gmail's API if you ask for it explicitly.

### What can I add later?

Draft replies, Gmail labels, Todoist tasks or follow-up reminders. See Extend it.
