Jump to content

The AI Workflow That Cut My Workday in Half

From JOHNWICK

A beginner-friendly Python guide made for non-programmers. Start learning Python the easy way!

One night, when I was frustrated at how much of my day disappeared into repetitive, brain-numbing tasks. Checking emails. Sorting files. Copy-pasting data from one place to another. It felt like death by a thousand cuts.

So I did what every programmer eventually does when they hit this wall. I asked myself: What if I automated all of this?

That question led me down a rabbit hole. By the time I surfaced, I had built a workflow so efficient that it literally cut my workday in half. What’s wild is that I didn’t need huge infrastructure or dozens of tools. Just a few well-chosen Python libraries stitched together with some logic.

Let me break down how I built it and, more importantly, how you can build something similar.

1. Automating My Email Responses

One of the biggest time-wasters was typing out the same replies to emails. Instead of manually filtering and drafting, I built a script that reads my inbox, categorizes messages, and generates responses.

For this, I used imaplib (to fetch emails) and smtplib (to send replies). The magic came from integrating a simple text-processing pipeline that could detect keywords and map them to response templates.

import imaplib, smtplib, email
# connect to Gmail
mail = imaplib.IMAP4_SSL("imap.gmail.com")
mail.login("[email protected]", "app_password")
mail.select("inbox")
# search for unread messages
status, data = mail.search(None, "UNSEEN")
email_ids = data[0].split()
for eid in email_ids:
    status, msg_data = mail.fetch(eid, "(RFC822)")
    msg = email.message_from_bytes(msg_data[0][1])
    subject = msg["subject"]
    if "meeting" in subject.lower():
        response = "Sure, let's schedule a meeting this week."
    else:
        response = "Thanks for reaching out, I'll get back to you soon."
    with smtplib.SMTP("smtp.gmail.com", 587) as server:
        server.starttls()
        server.login("[email protected]", "app_password")
        server.sendmail("[email protected]", msg["from"], response)

This alone saved me 30–40 minutes daily. It’s not fancy AI, but it works.

2. Daily Reports Without Touching Excel I used to waste an hour every morning pulling data from CSVs and building basic reports. Now? A script handles it for me.

The trick was pandas for crunching numbers and matplotlib for creating visual summaries that automatically land in my Slack every morning.

import pandas as pd
import matplotlib.pyplot as plt
# load data
df = pd.read_csv("sales.csv")
# calculate daily summary
summary = df.groupby("region")["revenue"].sum()
# plot
summary.plot(kind="bar")
plt.title("Revenue by Region")
plt.savefig("report.png")

Once this was running, I added a Slack bot that dropped the chart into my team channel. Reports went from manual drudgery to hands-off automation.

3. File Organization That Thinks for Me My desktop used to be chaos dozens of PDFs, screenshots, and random docs. Instead of dragging them into folders, I wrote a file-watcher script using os and shutil that sorts files by type and timestamp.

import os, shutil
downloads = "/Users/maria/Downloads"
organized = "/Users/maria/Documents/Sorted"
for file in os.listdir(downloads):
    src = os.path.join(downloads, file)
    if file.endswith(".pdf"):
        dst = os.path.join(organized, "PDFs", file)
    elif file.endswith(".png") or file.endswith(".jpg"):
        dst = os.path.join(organized, "Images", file)
    else:
        continue
    shutil.move(src, dst)

This was the aha moment. I no longer think about cleaning my files, they just “magically” land in the right place.

4. Auto-Scheduling My Tasks I used to copy deadlines from emails into Google Calendar. Now, the script from Step 1 does it for me. Whenever an email contains a date, it gets extracted with dateparser and sent to my calendar via Google Calendar API.

import dateparser
from googleapiclient.discovery import build
text = "Let's meet on September 2nd at 3 PM."
date = dateparser.parse(text)
service = build("calendar", "v3")
event = {
    "summary": "Meeting",
    "start": {"dateTime": date.isoformat(), "timeZone": "Asia/Karachi"},
    "end": {"dateTime": (date + pd.Timedelta(hours=1)).isoformat(), "timeZone": "Asia/Karachi"}
}
service.events().insert(calendarId="primary", body=event).execute()

Instead of manually updating my calendar, the events just show up.

5. A Command-Line Dashboard to Control It All Finally, I built myself a command-line dashboard with textual (a Python library for building terminal apps). From one screen, I can trigger email replies, run reports, and clean files.

from textual.app import App
from textual.widgets import Button
class WorkflowApp(App):
    def compose(self):
        yield Button("Send Email Replies")
        yield Button("Generate Report")
        yield Button("Organize Files")
WorkflowApp().run()

This gave me the satisfaction of pressing a single button and watching the automations run in sync.

Why This Workflow Worked

This wasn’t about building “cool projects.” It was about solving my daily problems. That’s why it stuck. Every script shaved off wasted time and gave me back mental bandwidth.

Today, I start work later, finish earlier, and still get more done than before. Automations don’t need to be perfect. Even if your script only saves 10 minutes a day, that’s over 60 hours a year. Multiply that by three or four automations, and suddenly you’ve bought yourself weeks of free time.

Closing Words:

I didn’t reinvent the wheel here. I just strung together practical tools and let Python do what it does best, remove friction.

If you’re buried under repetitive tasks, start with one pain point. Write a small script. Then chain them together. Before you know it, you’ll have your own AI workflow running quietly in the background, doing the boring stuff while you focus on the meaningful work.

Read the full article here: https://medium.com/@maryashoukataly/the-ai-workflow-that-cut-my-workday-in-half-5256138c902c