On a schedule
Get one morning email with tasks and important mail
Each weekday morning one email lists today's and overdue Todoist tasks and sums up your unread important emails.
- Runs
- On a schedule
- Apps
- Gmail, Todoist
- AI
- Optional
- Access
- Todoist read; gmail.readonly + gmail.send
Send this to your assistant
Create a ClickRuntime automation: every weekday at 7am, email me my Todoist tasks due today or overdue, plus a short summary of my unread important emails from the last day.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Most mornings start by flicking between the inbox and the task list, trying to work out what matters today. By the time the plan is clear, the first meeting has started.
One email that combines today's tasks with a summary of the important mail gives you the whole picture in a minute. You can plan the day before opening anything else.
What you get out of it
One place to start the day
Tasks and important emails arrive together, so planning takes one read.
Overdue work stays visible
Overdue tasks are listed first, so they are not quietly pushed back again.
Important mail without the inbox
A short summary of the important unread emails tells you what needs a reply, without opening Gmail.
Works on your phone
The digest is a plain email, easy to read on the way in.
How it works
What happens, step by step
Each weekday morning ClickRuntime collects your Todoist tasks that are due today or overdue.
It finds unread emails Gmail marked as important from the last day.
AI writes a short summary of those emails, or lists their subjects if AI is not available.
Everything is sent to you in one email from your Gmail.
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 Todoist
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 Todoist steps into one automation
Under the hood
The code that runs this automation
import base64
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai
ME = "me@example.com"
@on_trigger
def run(event):
tasks = http.get("https://api.todoist.com/api/v1/tasks/filter", params={"query": "today | overdue"},
headers={"Authorization": "Bearer " + credentials.connection("todoist", "main")}).json()["results"]
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users()
ids = gmail.messages().list(userId="me", q="is:unread is:important newer_than:1d", maxResults=15).execute().get("messages", [])
mails = [gmail.messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["From", "Subject"]).execute() for m in ids]
lines = [f"{h['From']} – {h['Subject']}: {m['snippet']}" for m in mails
for h in [{x["name"]: x["value"] for x in m["payload"]["headers"]}]]
try:
summary = ai.generate("\n".join(lines), system="Summarise these emails in short bullets, noting which need a reply.", max_output_tokens=400).text if lines else "No important unread email."
except (ai.AINotIncluded, ai.AILimitReached):
summary = "\n".join(l.split(":")[0] for l in lines)
task_lines = "\n".join(f"• {t['content']} ({(t.get('due') or {}).get('date', '')})" for t in tasks) or "Nothing due."
msg = EmailMessage()
msg["To"], msg["Subject"] = ME, f"Today: {len(tasks)} tasks, {len(lines)} important emails"
msg.set_content(f"TASKS\n{task_lines}\n\nIMPORTANT EMAIL\n{summary}")
gmail.messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
return {"tasks": len(tasks), "emails": len(lines)}FAQ
Common questions
Which emails count as important?
Does it need AI?
Can it include tomorrow's tasks?
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
Turn emails that need action into Todoist tasks
Emails that ask you to do something become Todoist tasks with a clear title, due date and next step.
See how it worksGet alerts about security issues that affect you
When a serious vulnerability is published for software you use, your security channel hears about it the same hour.
See how it worksHear about new releases of the tools you use
When a library or tool you depend on ships a new version, your dev channel gets the release notes link.
See how it worksKeep exploring
Set up “Get one morning email with tasks and important mail” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.