Every 10 minutes
Sort your Outlook inbox with AI and log it to a sheet
New emails get an Outlook category and a one-line summary in a sheet, and simple questions get a reply draft waiting for you.
- Runs
- Every 10 minutes
- Apps
- Google Sheets, Outlook
- AI
- Yes, uses the built-in AI allowance
- Access
- Mail.ReadWrite; sheet edit
Send this to your assistant
Create a ClickRuntime automation: every 10 minutes, read new emails in my Outlook inbox. Use AI to give each a category (client, invoice, sales, newsletter, other) and a one-line summary, apply the category in Outlook, log it to my Inbox Log sheet, and create a reply draft for simple client questions.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
An office manager handles a shared Outlook inbox with orders, invoices, client questions and a steady stream of newsletters. Sorting it takes the first hour of every day, and there is no record of what came in or how quickly it was handled.
Categorising each email as it arrives, with a summary in a sheet and a draft for the easy ones, turns the morning sort into a quick review.
What you get out of it
An inbox that sorts itself
Each email arrives with its Outlook category, so you can filter straight to what matters.
A log of what came in
The sheet shows every email with its category and summary, which helps when someone asks what happened to their message.
Drafts for the easy ones
Simple questions get a reply draft waiting in Outlook for you to check and send.
Nothing sent without you
Drafts stay in your Drafts folder until you send them.
How it works
What happens, step by step
Every 10 minutes, ClickRuntime checks your Outlook inbox for emails that arrived since its last check.
AI reads each one and picks a category, writes a one-line summary and decides whether it is a simple client question.
The category is applied in Outlook and a row with the sender, subject, category and summary is added to your Inbox Log sheet.
For simple client questions, a reply draft is created in Outlook for you to review.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect Outlook
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
- Act only on the items that match your own rules, and skip the rest
- 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 Google Sheets and Outlook 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, report_fetched, http, credentials, ai, state
api = lambda name, version: build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
def graph(method, path, **kw):
r = http.request(method, "https://graph.microsoft.com/v1.0" + path, headers={"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}, **kw)
return r.raise_for_status() or (r.json() if r.content else None)
SHEET_ID = "your-spreadsheet-id"
SCHEMA = {"type": "object", "properties": {"category": {"enum": ["client", "invoice", "sales", "newsletter", "other"]},
"summary": {"type": "string"}, "simple": {"type": "boolean"}, "reply": {"type": "string"}}}
@on_trigger
def run(event):
since = state.get("since") or "2026-01-01T00:00:00Z"
msgs = graph("GET", "/me/mailFolders/inbox/messages", params={"$filter": f"receivedDateTime gt {since}", "$orderby": "receivedDateTime",
"$select": "id,subject,from,bodyPreview,receivedDateTime", "$top": 50})["value"]
report_fetched(len(msgs))
if not msgs:
return {"summary": "No new emails"}
rows = []
for m in msgs:
sender = m["from"]["emailAddress"]["address"]
res = ai.generate(f"From: {sender}\nSubject: {m['subject']}\n{m['bodyPreview']}", system="Categorise this email, summarise it in one line, "
"and if it is a simple client question write a short reply.", json_schema=SCHEMA, max_output_tokens=300).json
graph("PATCH", f"/me/messages/{m['id']}", json={"categories": [res["category"].title()]})
if res.get("simple") and res.get("reply"):
graph("POST", f"/me/messages/{m['id']}/createReply", json={"comment": res["reply"]})
rows.append([m["receivedDateTime"], sender, m["subject"], res["category"], res["summary"]])
api("sheets", "v4").spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Inbox Log!A:E", valueInputOption="RAW", body={"values": rows}).execute()
state.set("since", msgs[-1]["receivedDateTime"])
return {"sorted": len(rows)}FAQ
Common questions
Will it move emails out of my inbox?
Which emails get a draft?
Can I change the categories?
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
Check emailed invoices against your purchase order sheet
Invoices arriving in Outlook are read, matched to your purchase orders in a sheet, and anything that doesn't match is flagged to you.
See how it worksLog each sale to a sheet and send a thank-you from Outlook
Every new sale is added to your sales sheet and the buyer gets a personal thank-you email from your Outlook address.
See how it worksEmail new leads in your sheet from Outlook
Each new lead added to your sheet gets a personal email from your Outlook, and the row is marked as sent with the date.
See how it worksKeep exploring
Set up “Sort your Outlook inbox with AI and log it to a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.