On a schedule
Get a daily summary of your inbox in Discord
Each morning, a short Discord message tells you what arrived in your Gmail in the last day and what needs a reply.
- Runs
- On a schedule
- Apps
- Discord, Gmail
- AI
- Yes, uses the built-in AI allowance
- Access
- Gmail readonly; Discord send
Send this to your assistant
Create a ClickRuntime automation: every day at 8, summarise the last 24 hours of my Gmail inbox and post the digest to my private #digest channel on Discord.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A founder gets dozens of emails a day: customer questions, invoices, partner updates, newsletters and the odd urgent request. Mornings start with twenty minutes of scrolling to work out what matters, and important messages are still missed when they sit between newsletters.
This automation reads the last day of email for you and posts a short digest in a private Discord channel at 8 each morning. You see what needs a reply first, what can wait, and what you can ignore, before you open your inbox.
What you get out of it
Know what matters before opening Gmail
The digest groups emails into needs a reply, for your information and low priority. You can decide where to start in a minute.
Important emails are not buried
A customer complaint or a contract question is listed at the top even if it arrived between newsletters. Fewer things slip for days.
A calm start to the day
Reading one short message replaces scrolling through a full inbox first thing. You choose when to dive in.
Private by default
The digest goes to a channel only you can see. Your email itself stays in Gmail, and only short summaries are posted.
How it works
What happens, step by step
Every morning at 8:00, ClickRuntime collects the emails that arrived in your Gmail inbox in the last 24 hours.
It takes the sender, subject and opening lines of each one.
AI writes a short digest that groups the emails into needs a reply, for your information and low priority.
The digest is posted to your private #digest channel in Discord.
Before it runs live
- Connect Discord
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
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 Discord and Gmail steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, log
CHANNEL_ID = "your-discord-channel-id"
@on_trigger
def run(event):
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
ids = [m["id"] for m in gmail.users().messages().list(userId="me", q="in:inbox newer_than:1d -category:promotions",
maxResults=60).execute().get("messages", [])]
lines = []
for n, mid in enumerate(ids, 1):
m = gmail.users().messages().get(userId="me", id=mid, format="metadata", metadataHeaders=["From", "Subject"]).execute()
h = {x["name"]: x["value"] for x in m["payload"]["headers"]}
lines.append(f"{n}. {h.get('From', '')} | {h.get('Subject', '')} | {m.get('snippet', '')[:150]}")
if not lines:
digest = "No new email in the last 24 hours."
else:
try:
digest = ai.generate("\n".join(lines), system="Write a short inbox digest grouped as Needs reply, FYI, Low priority. "
"Under 1800 characters.", max_output_tokens=700).text
except ai.AIError as e:
log.warning("AI unavailable, posting subjects", {"code": e.code})
digest = "\n".join(l.split(" | ")[1] for l in lines)
http.post(f"https://discord.com/api/v10/channels/{CHANNEL_ID}/messages",
headers={"Authorization": f"Bot {credentials.secret('DISCORD_BOT_TOKEN')}"}, json={"content": digest[:2000]})
return {"emails": len(lines)}FAQ
Common questions
How long is the digest?
Does it read every email?
Can it post on weekdays only?
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 email and Discord alerts when a site goes down or a domain frees up
Your sites and wished-for domains are checked every 30 minutes, and you get an email and a Discord message the moment one changes.
See how it worksLabel your Gmail by type and post important emails to Discord
New emails are sorted into your Gmail labels such as Invoice, Order and Support, and urgent or support emails are posted to your Discord #inbox channel.
See how it worksPost failure and alert emails to a Discord channel
Alert emails from your services show up in your team's Discord channel within minutes, with the subject and a short preview.
See how it worksKeep exploring
Set up “Get a daily summary of your inbox in Discord” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.