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.
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
Every evening, ClickRuntime gathers the emails you received in Gmail that day.
It takes the sender, subject and a short preview of each one.
AI writes a digest grouped by topic, noting anything that seems to need a reply.
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
Build your own
Need it to work differently?
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
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?
How long is each digest?
Does the full email text end up in the doc?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get a weekly email summary of your edited Google Docs
Every Friday you get one email summarising what changed in your Google Docs this week, with the action items pulled out.
See how it worksTurn repeated support questions into FAQ drafts
Each week, the questions customers keep asking are grouped and added to your FAQ doc with draft answers ready to edit.
See how it worksDraft RFP answers in a Google Doc when one arrives by email
When an RFP lands in Gmail, every question in it is answered in a draft Google Doc and you get an email with the link.
See how it worksKeep exploring
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.