Python Automation: Make the Computer Do Your Boring Work
Automate files, spreadsheets, email drafts and web lookups, then hand the whole job to your computer's scheduler
One payment of $39. Instant online access to the full written course. No subscription. Refund policy.
You automate files, spreadsheets, email drafts and web lookups that eat your week. You finish with your own script that plans before it acts, keeps a log, is tested against sample data, and runs on a schedule.
Who it is for. Office workers, assistants, small business owners and students who already know basic Python and want to pass repeated computer chores to scripts they can trust.
You finish with. Your Own Automation Script, Running on a Schedule. Finish the sample Monday Morning Machine, then build the same kind of tool for a real task of your own from lesson 1. Your tool must plan before it acts, rehearse with a dry run, never overwrite or delete, keep a log, survive a broken step, pass checks that you wrote, and run from your computer's scheduler. Work on copies of your own files until the checks pass.
Certificate. Finish every lesson, resolve every quiz question with at least 50% right on the first try, and tick the capstone checklist — Apex Flow Academy issues a verifiable Certificate of Completion with a unique ID and a public verification page. It is a certificate of completion, not a degree, licence, accreditation or exam result.
01 · Start Here: Pick a Task, Set Up, and Build a Safe Playground4 lessons
Choose a task that is worth automating, set up Python with a private virtual environment, learn the loop-decide-act shape that every automation shares, and build a sandbox of sample files so nothing you practise on can harm real work.
- 1.1Pick a Task Worth AutomatingFREE
- 1.2Set Up Your Workshop: Python and a Virtual Environment
- 1.3Loop, Decide, Act: The Shape of Every Automation
- 1.4Build a Safe Playground: Sample Files and the Dry-Run Habit
02 · Files and Folders: List, Sort, Rename and De-duplicate Safely4 lessons
Use Python's pathlib to list files, move them into folders by type, rename them in bulk with an undo log, and find exact duplicates. Every script plans first, rehearses with a dry run, and never deletes.
- 2.1Look Inside a Folder with pathlib
- 2.2Move Files into Folders by Type, Rehearsal First
- 2.3Rename in Bulk with a Plan, a Conflict Check and an Undo Log
- 2.4Find Duplicate Files with a Fingerprint
03 · Spreadsheets and Data: Read, Clean, Total and Report4 lessons
Read CSV files, clean messy cells without losing data, total sales by group with exact money maths, and write a formatted Excel report. The module project turns three messy weekly files into one report workbook.
- 3.1Read and Write CSV Files
- 3.2Clean Messy Cells Without Losing Data
- 3.3Group and Total: A Weekly Summary
- 3.4Write a Real Excel Report with openpyxl
04 · Email Drafts: Fill Templates, Save Drafts and Send Safely4 lessons
Fill a message template from a spreadsheet row, save real email drafts with attachments as .eml files, send with a rehearsal switch and a local test server, and add a small HTML table. The module project drafts customer check-ins and a weekly summary.
- 4.1Fill a Message Template from a Row
- 4.2Save a Real Draft as an .eml File
- 4.3Send Safely: A Rehearsal Switch and a Local Test Server
- 4.4Plain Text Plus a Small HTML Table
05 · Web Lookups: Fetch, Read and Watch a Page Politely4 lessons
Fetch a page with the requests package, read a JSON API, pull one fact out of an HTML page, and make your lookups patient and polite with timeouts, retries and robots.txt. All practice runs against a small website on your own computer.
- 5.1Ask a Web Server for a Page
- 5.2Read Data from a JSON API
- 5.3Pull One Fact Out of an HTML Page
- 5.4Be Patient and Polite: Timeouts, Retries and robots.txt
06 · Put It Together and Run It on a Schedule4 lessons
Turn the pieces into one tool with a settings file and command-line options, add a logbook and graceful failure, hand it to your computer's scheduler, and prove it works with four simple checks. The module ends with the capstone: your own automation running on a schedule.
- 6.1One Entry Point: A Settings File and Command-Line Options
- 6.2A Logbook: Logging, Failing Gently and Exit Codes
- 6.3Run It on a Schedule
- 6.4Prove It Works Before You Trust It
Pick a Task Worth Automating
You will be able to
- Test a task with three questions: often, rules and checkable.
- Work out how many runs it takes for a script to pay for itself.
- Pick the one real task you will automate in this course.
Why this matters
Automation only saves time when you pick the right job. Some jobs take longer to automate than to do by hand for years. Others are so vague that a program would get them wrong. A few minutes of judgement now can save you a wasted weekend later.
Learn it
To automate a task means to write a program that does the steps for you. That program is called a script. In this course the language is Python.
You will build one project from start to finish. It is called the Monday Morning Machine. It tidies a folder, builds a sales report in Excel, drafts emails, checks a price on a web page, keeps a log, and runs by itself on a schedule. The sample business is a made-up print shop, so you can practise safely. Alongside it you will apply every skill to a task from your own work.
Before you write any code, test the task with three questions.
- Often? Do you repeat it every week, or does it take more than 15 minutes each time? Rare and quick jobs seldom repay the effort.
- Rules? Could you explain the steps to a new colleague in plain words, with no 'it depends on my mood'? A computer follows rules. It cannot guess.
- Checkable? Can you tell in under a minute whether the result is right? If a mistake could hide, the script needs checks built in. Module 6 shows you how.
Three yes answers make a good candidate. Two yes answers make a maybe. One or none means leave the task alone.
Next, do the payback maths. Multiply the minutes per run by the runs per year, then divide by 60. That gives the hours saved per year. Compare it with the hours you expect to spend building and testing. Add half again to your build guess, because testing always takes longer than you think.
See it in action
Example (illustrative numbers). A shop owner lists six jobs and scores them.
- Renaming 40 scanned invoices every Friday: often yes, rules yes, checkable yes. Good candidate.
- Copying sales numbers from three files into one sheet: yes, yes, yes. Good candidate.
- Writing a personal note to a loyal customer: often yes, rules no. Leave it alone.
- Answering odd customer questions: rules no. Leave it alone.
- Choosing a new logo: once a year, rules no. Leave it alone.
The owner picks the invoice renaming. It takes 20 minutes a week. The owner guesses four hours to build it. Save this as payback.py:
Type python payback.py in a terminal. Lesson 2 shows you how to set one up.
$ python payback.py
Time saved per year: 17.3 hours
Build cost: 4 hours
Pays back after 12 runsThe script pays for itself after 12 runs. That is a sound choice.
Common mistakes
- Automating a yearly task. It feels big, so it looks worth doing. The payback never arrives. Check the runs per year first.
- Skipping the checkable question. A script that is quietly wrong is worse than doing the job by hand, because you stop looking. Decide how you will check before you build.
- Guessing the build time too low. Beginners forget testing. Add half again to your guess.
- Automating a messy process. If the steps change every week, there are no rules to write down yet. Fix the process first.
You are done when
You hold a written task card for one real task. The card names the task, lists the steps in plain words, says which files it uses, says how you will check the result, and shows your payback numbers. The task scored three yes answers.
You finished the free lesson
That is one lesson from the course. The full course gives you every remaining lesson, a quick check and a hands-on task in each one, and the workbook of templates and checklists.
Full course$39
- A Windows, macOS or Linux computer. The examples were run on Windows and every step names the macOS and Linux equivalent.
- Python 3.10 or newer, free from python.org. The course code was tested on 3.10, 3.12 and 3.13.
- A terminal. One is built into every system, so this costs nothing.
- A plain text editor. Free choices include VS Code, Notepad++ and Thonny. Check current features before you install one.
- Three free packages installed with pip: openpyxl, requests and beautifulsoup4. The pinned versions are in lesson 2 of module 1.
- One optional free package, aiosmtpd, which gives you a local email test server in module 4.
- A spreadsheet program to open the reports. Excel works, and LibreOffice Calc and Google Sheets are free.
- A mail program that can open .eml files. This is optional.
- An internet connection for installing packages. No paid subscription or paid account is needed for any core lesson.
- Basic Python: variables, if statements, for loops, lists, dictionaries, f-strings and small functions. Lesson 3 of module 1 has a five-minute check.
- Willingness to type commands in a terminal. Lesson 2 of module 1 walks you through it.
- A computer where you are allowed to install software.
Your Own Automation Script, Running on a Schedule
Finish the sample Monday Morning Machine, then build the same kind of tool for a real task of your own from lesson 1. Your tool must plan before it acts, rehearse with a dry run, never overwrite or delete, keep a log, survive a broken step, pass checks that you wrote, and run from your computer's scheduler. Work on copies of your own files until the checks pass.
- Your task card from lesson 1, with the three-question score and your payback numbers.
- The tool: monday_machine.py or your own entry script, with your task added as a step that has a run() function, a dry_run switch and a small returned summary.
- A settings file with every path and address in it and no passwords.
- A launcher file, run_monday.bat or run_monday.sh, that works when started from any folder.
- The scheduled task or cron line, written out exactly as you registered it.
- check_run.py extended with at least one check for your own step, and its printed output.
- Log entries from at least two runs made by the scheduler.
- A README of about half a page: what the tool does, how to rehearse it, how to run it, where the log is, how to undo its changes, and what to look at each week.
- Automation
- Getting a program to do the steps of a task for you instead of doing them by hand.
- Script
- A small program saved in a file that you run to do one job.
- Terminal
- A window where you type commands and see the replies.
- Virtual environment (venv)
- A private folder holding a copy of Python and the packages for one project, so projects cannot disturb each other.
- Package
- Code that someone else wrote and shared, which you install and use in your own scripts.
- pip
- The tool that downloads and installs packages.
- Pinning a version
- Asking for one exact version of a package, such as requests==2.34.2, so results match what was tested.
- Sandbox
- A folder of pretend data you can break and rebuild without harming anything real.
- Dry run
- A rehearsal in which a script says what it would do but changes nothing.
- Path
- The address of a file or folder on your computer.
- Relative path
- A path measured from the folder you are in when you run the script.
- Regular expression (regex)
- A short pattern used to find or replace text, such as any run of spaces at the end of a name.
Browse the full Academy encyclopedia
19 checks were run and recorded while writing this course (code, formulas, commands and facts), and it lists 17 official sources it was checked against. Prices, features and policies of outside tools can change, so check each tool's own website.
Created by Apex Flow Academy with AI assistance. For education only; not legal, tax, financial or medical advice. Results depend on your effort and circumstances.
Python From Zero: Write Programs That Work
You write and run real Python programs from the first lesson, and you finish with three small working tools that you built yourself, tested with checks you wrote, and can change without starting over.
SQL: Ask Any Database Any Question
You will be able to write SQL that answers business questions from a database: choose and sort columns, filter rows, summarise and group, join tables, and check that your numbers are right. You finish with a report you built and checked yourself.
Data Analytics From Scratch: Answer Real Business Questions
You collect, clean, analyse and present data so a boss can act on it. By the end you will have worked through the whole analytics loop on one practice dataset and produced a case study with charts and a written recommendation that states how sure you are and what the data cannot show.