Weekly
Check whether your emails land in the inbox at Gmail and Outlook
Every week a test email is sent each way between your Gmail and Outlook, and you learn whether it reached the inbox or spam and whether SPF, DKIM and DMARC passed.
- Runs
- Weekly
- Apps
- Gmail, Outlook
- AI
- Optional
- Access
- gmail.modify; Mail.ReadWrite
Send this to your assistant
Create a ClickRuntime automation: every Monday, send a test email from my Gmail to my Outlook and from my Outlook to my Gmail. Ten minutes later, check whether each landed in the inbox or junk and whether SPF, DKIM and DMARC passed, and email me the results.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small company sends invoices and newsletters from its own domain. One month a DNS change broke its email signing, and invoices quietly went to customers' spam folders for weeks before anyone noticed.
A weekly test between Gmail and Outlook, the two biggest mailbox providers, catches problems like that within days and shows exactly which check failed.
What you get out of it
Problems caught within a week
A broken DNS record or a spam-folder problem shows up in the next Monday's report.
Both big providers checked
Gmail and Outlook handle most business email, so a pass at both is a good sign.
Know which check failed
SPF, DKIM and DMARC results are reported separately, which points straight at the fix.
No extra tools
It uses the two mailboxes you already have.
How it works
What happens, step by step
Every Monday, ClickRuntime sends a test email from your Gmail to your Outlook and one from your Outlook to your Gmail, each with a unique code.
It waits a few minutes for them to arrive.
It finds each test email and checks whether it landed in the inbox or the spam folder, and reads the SPF, DKIM and DMARC results.
You get an email with the results for both directions.
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 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
- 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 Outlook steps into one automation
Under the hood
The code that runs this automation
import base64
import time
import uuid
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, http, credentials, notify
api = lambda name, version: build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
def send_gmail(to, subject, text):
raw = base64.urlsafe_b64encode(f"To: {to}\r\nSubject: {subject}\r\nContent-Type: text/plain; charset=utf-8\r\n\r\n{text}".encode()).decode()
api("gmail", "v1").users().messages().send(userId="me", body={"raw": raw}).execute()
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)
def send_mail(to, subject, text):
graph("POST", "/me/sendMail", json={"message": {"subject": subject, "body": {"contentType": "Text", "content": text},
"toRecipients": [{"emailAddress": {"address": a}} for a in to.split(",")]}})
GMAIL_ADDR, OUTLOOK_ADDR = "you@northwind.example", "you@acme.example"
@on_trigger
def run(event):
code = uuid.uuid4().hex[:8]
send_gmail(OUTLOOK_ADDR, f"Deliverability test {code}", "Weekly test, safe to ignore.")
send_mail(GMAIL_ADDR, f"Deliverability test {code}", "Weekly test, safe to ignore.")
time.sleep(240)
report = []
for folder in ("inbox", "junkemail"):
hits = graph("GET", f"/me/mailFolders/{folder}/messages", params={"$search": f'"{code}"', "$select": "internetMessageHeaders"})["value"]
if hits:
auth = next((h["value"] for h in hits[0].get("internetMessageHeaders", []) if h["name"].lower() == "authentication-results"), "")
report.append(f"Gmail → Outlook: {'inbox' if folder == 'inbox' else 'JUNK'}; {auth[:300]}")
gm = api("gmail", "v1").users().messages()
found = gm.list(userId="me", q=f"{code} in:anywhere", includeSpamTrash=True).execute().get("messages", [])
if found:
m = gm.get(userId="me", id=found[0]["id"], format="metadata", metadataHeaders=["Authentication-Results"]).execute()
auth = next((h["value"] for h in m["payload"]["headers"]), "")
report.append(f"Outlook → Gmail: {'SPAM' if 'SPAM' in m['labelIds'] else 'inbox'}; {auth[:300]}")
notify.email_me(f"Deliverability check {code}", "\n\n".join(report) or "Neither test email arrived within 4 minutes.")
return {"results": len(report)}FAQ
Common questions
Will the test emails clutter my inbox?
What should I do if a check fails?
Does this replace a full deliverability service?
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
Send thank-you emails from the right mailbox for each brand
New buyers get a thank-you from your Gmail or your Outlook, depending on which brand they bought from.
See how it worksTriage your Gmail and Outlook inboxes with one digest
Both inboxes are sorted into the same categories, and you get one digest of the emails that need you.
See how it worksSummarise PDF attachments arriving in Gmail or Outlook
When a PDF arrives in either your Gmail or your Outlook, you get an email with a short summary of what it says.
See how it worksKeep exploring
Set up “Check whether your emails land in the inbox at Gmail and Outlook” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.