By the end of this lesson a coding agent will have written one reusable script that turns this week's CSV into a one-page HTML report and a PDF, and checks its own totals every time it runs.
You need: a coding agent set up on your laptop (see the Claude Code, Codex or OpenCode guide), Chrome, your Sheet and KPI dictionary from lessons 1 and 2 · Time: 9 minutes
The Data Studio dashboard is great for people who click. A PDF is better when the report must be attached to an email, kept as a record ("what did we report in week 46?"), read by someone outside your Google account world (a director on Outlook, a franchise partner), or printed for a review meeting.
Analyse a CSV with an AI agent already showed you the basics: a folder, a plan first, a Python script, checking the numbers. Here you build the weekly version: the same script, run every Monday on fresh data.
Get the data out of the Sheet the safe way, by downloading it:
- Make a folder
weekly-miswith a subfolderdata. - In the Sheet, open the Sales tab, then File → Download → Comma Separated Values (.csv). Save it as
weekly-mis/data/sales.csv. - Do the same for the Targets tab, as
data/targets.csv.
CarefulDo not use File → Share → Publish to web to give the agent a link to your data. A published sheet can be seen by anyone on the internet who has, or guesses, the link. Downloading a CSV keeps the data on your laptop.
Why?The agent only needs a file on your laptop. Every other route (public links, shared passwords, pasting rows into a chat) puts your company's sales where it should not be.
- Make a folder
Log in free to read the rest of this lesson
Every lesson is free. A free account unlocks all of them and saves your progress.
Still to come in this lesson:
- Ask for one reusable script
- Build the checks into the script
- Turn the HTML into a PDF
- The Monday routine
- Recap