EMFADCourses
Instant access by email once payment is confirmed14-day refundSecure checkoutSupport by email, phone and WhatsApp

Module 1: Automation Foundations

Spotting Tasks Worth Automating

Most office work contains small, repetitive jobs: renaming scanned invoices, copying figures from one spreadsheet into another, emailing the same report every Monday. Each job takes only a few minutes, but they add up to hours each month, and every manual copy is a chance for an error. Python can do these jobs quickly and the same way every time. The skill that comes before writing any code, though, is choosing the right tasks to automate. Automate the wrong thing and you spend more time maintaining a script than you ever saved.

What makes a task a good candidate

A task is usually worth automating when most of these are true:

  • It repeats: daily, weekly or monthly, or many times in one sitting (for example renaming 300 files).
  • It follows clear rules: you could write the steps on paper for a new colleague without saying "it depends" at every step.
  • The inputs are digital and consistent: files in a known folder, a spreadsheet with the same columns, an API or a website with a stable layout.
  • Errors are costly or likely: copying numbers between files, where a single typo affects a report or a payment.
  • It is stable: the process will not change completely next month.

Poor candidates include tasks that need judgement every time (approving an unusual expense), tasks done once a year that change each year, and processes that are about to be replaced by a new system anyway.

Estimating the payoff

A simple calculation keeps you honest. Estimate:

  1. Minutes the task takes each time, and how often it happens per month.
  2. Hours to build and test the script.
  3. Hours per month to maintain it (inputs change, a website redesigns, someone renames a column).

You can do this in Python itself:

def payback_months(minutes_per_run, runs_per_month, build_hours, maintain_hours_per_month=0.5):
    saved_hours = minutes_per_run * runs_per_month / 60
    net_monthly = saved_hours - maintain_hours_per_month
    if net_monthly <= 0:
        return None  # never pays back
    return build_hours / net_monthly

tasks = {
    "Rename scanned invoices": (20, 22, 3),
    "Weekly sales summary email": (45, 4, 6),
    "Annual stock-take sheet": (120, 1 / 12, 10),
}

for name, (mins, runs, build) in tasks.items():
    months = payback_months(mins, runs, build)
    result = "never" if months is None else f"{months:.1f} months"
    print(f"{name:30} payback: {result}")

Running it prints a payback time for each task. Renaming invoices daily pays back within a month; the weekly summary within a few months; the annual job never pays back once maintenance is counted. Time is not the only benefit, though: fewer errors, faster turnaround and less tedium for staff can justify automating a task with a slower payback.

Breaking a task into steps

Before writing code, describe the task as input, steps and output. Consider a hypothetical accounts assistant at a hardware distributor in Industrial Area, Nairobi, who does this every Monday:

  1. Downloads three branch sales spreadsheets from email.
  2. Copies each into a master workbook.
  3. Removes test transactions and duplicates.
  4. Totals sales by branch and product category.
  5. Makes a chart, pastes it into a Word report, saves as PDF.
  6. Emails the PDF to three managers.

Written this way, each step maps to something this course teaches: files and folders (step 1), spreadsheets and pandas (steps 2 to 4), reports and charts (step 5) and email (step 6). You can also see that the work can be automated in stages. Even automating steps 2 to 4 alone saves most of the time and removes most of the copy-paste errors. You will build this full pipeline in the course project.

Starting small and safe

  • Automate one step first, run it alongside the manual process for a few cycles and compare results.
  • Never overwrite originals. Read from an input folder and write to an output folder.
  • Keep a human check where mistakes are expensive, such as reviewing a report before it is emailed, until you trust the script.
  • Get permission. Make sure you are allowed to access the data, systems and websites involved, and handle personal data in line with your organisation's policies and data protection law, such as Kenya's Data Protection Act.

Common mistakes to avoid

  • Automating a broken process. Fix and simplify the steps first, then automate.
  • Building a large "do everything" script before any part has proved useful.
  • Ignoring maintenance time when estimating the benefit.
  • Hard-coding names, dates and paths that will change, which you will learn to avoid in the coming lessons.

Exercise

List five repetitive tasks from your own work. For each, record minutes per run, runs per month and a rough build estimate, then run the payback script with your numbers. Choose the best candidate and write it as numbered steps with clear inputs and outputs, marking which step you will automate first.

Key points

  • Good candidates repeat, follow clear rules and use consistent digital inputs.
  • Estimate payback including maintenance before you start building.
  • Describe a task as inputs, steps and outputs, then automate one step at a time.
  • Never overwrite original files, and keep a human check where errors are costly.

Enjoyed this lesson?

The full course has 15 lessons with exercises, a quiz after every module, a final project and a certificate of completion. About 6 hours, USD 59 for the full course or USD 10 a module, lifetime access.

Course details