Skip to content

Daily

Write a daily email digest into a Google Doc

Every evening, a short summary of the day's email is added to the top of a running Google Doc.

Runs
Daily
Apps
Gmail, Google Docs
AI
Yes, uses the built-in AI allowance
Access
Gmail gmail.readonly; Docs write

Send this to your assistant

Create a ClickRuntime automation: every evening at 6, summarise today's emails and add the digest to the top of my 'Inbox digest' Google Doc.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A founder gets well over a hundred emails a day: customers, investors, suppliers, newsletters. Important threads get buried, and a week later it is hard to remember what was agreed with whom or which request is still open.

A daily digest in one Google Doc gives you a readable record of each day. You can skim the evening's summary in a couple of minutes, and search the whole doc later when you need to know when something came up.

What you get out of it

  • A two-minute end-of-day review

    Instead of scrolling the inbox again, you read one short summary grouped by topic. Anything that needs a reply tomorrow stands out.

  • A searchable diary of your inbox

    Each day is dated in one document. Searching for "Contoso" shows every day they came up, which is quicker than reconstructing a story from email threads.

  • Easy to share with an assistant or partner

    A Google Doc can be shared with an assistant or co-founder without giving them access to your mailbox. They see the summary, not every private message.

  • Newest day always on top

    Each digest is inserted at the top, so opening the doc shows today first. Older days stay below for reference.

How it works

What happens, step by step

  1. Every evening, ClickRuntime gathers the emails you received in Gmail that day.

  2. It takes the sender, subject and a short preview of each one.

  3. AI writes a digest grouped by topic, noting anything that seems to need a reply.

  4. The digest is added to the top of your Inbox digest Google Doc under today's date.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect Google Docs

What you get

RunsDaily
Write a daily email digest into a Google Doctoday, 9:00Succeeded
Google Docs · Inbox digestMonday 19 October: Contoso asked for a revised quote (reply needed). Northwind confirmed the Thursday delivery. Two investor updates, no action.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Gmail and Google Docs steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
daily_email_digest_written_to_a_google_doc.pyexample
from datetime import date
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, ai

DOC_ID = "your-doc-id"

@on_trigger
def run(event):
    creds = Credentials(credentials.connection("google", "work"))
    gmail = build("gmail", "v1", credentials=creds, cache_discovery=False)
    ids = gmail.users().messages().list(userId="me", q="in:inbox newer_than:1d -category:promotions", maxResults=100).execute().get("messages", [])
    lines = []
    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"]}
        lines.append(f"{h.get('From', '')} | {h.get('Subject', '')} | {msg.get('snippet', '')[:200]}")
    if not lines:
        return {"emails": 0}
    digest = ai.generate("Write a short digest of today's emails grouped by topic; flag ones needing a reply:\n" + "\n".join(lines),
                         max_output_tokens=800).text
    text = f"{date.today():%A %d %B %Y}\n{digest}\n\n"
    build("docs", "v1", credentials=creds, cache_discovery=False).documents().batchUpdate(
        documentId=DOC_ID, body={"requests": [{"insertText": {"location": {"index": 1}, "text": text}}]}).execute()
    return {"emails": len(lines)}

FAQ

Common questions

Which emails are included?
Emails received in your inbox that day. You can exclude promotions and newsletters, or limit it to a label such as Clients, so the digest focuses on what matters.
How long is each digest?
Usually a short list of the main threads with one line each, plus anything that looks like it needs a reply. Busy days are summarised more briefly rather than growing very long.
Does the full email text end up in the doc?
No. Only the summary is written to the doc, with the sender and subject of each thread. The original emails stay in Gmail.
What permissions does it need?
Gmail gmail.readonly; Docs write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Write a daily email digest into a Google Doc” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.