Automate Your Weekly Report Draft with a Script
A weekly report should help you remember what changed, explain what is blocked, and decide what comes next. Writing it becomes tedious when the evidence is scattered across notes, task lists, and commit messages. A small script can gather that material and ask a model for a first draft, leaving you to check the facts and add judgment.
Start with a workflow you run manually. Once it produces useful drafts consistently, schedule it for the end of your working week.
Choose the report structure before collecting data
Write down who will read the report and what they need to know. For a personal project or student assignment, four sections usually work well: completed work, work in progress, blockers, and next week's priorities. Add a reporting period so the draft has a clear boundary.
Keep the first version short, perhaps 300 words. A fixed structure and length give your script a clear target and make the result easier to review.
Gather a small set of reliable weekly inputs
Choose one source to begin with, such as a running work log. Record each useful update with a date, a brief description, and its status. Include failed experiments and unresolved questions when they affect your plans.
Have your script select entries within the reporting period. Define that period explicitly, including the time zone, so a Sunday evening update does not disappear into the following week. Preview the selected entries before adding any model call.
Later, you can collect task updates or commit summaries automatically. Remove duplicates and exclude generated files, dependency changes, and other noise. Send only material needed for the report, keeping credentials and unrelated personal information out of the input.
Connect the script with a controlled budget
Use an OpenAI-compatible SDK to send the selected notes to MyRelay. Create a MyRelay account, then store your API key in an environment variable or your operating system's credential store. Keep the key out of the script and any shared repository.
Set the SDK's base URL to the MyRelay API endpoint and choose the exact model identifier shown in its current menu. Gemini 2.5 Flash is one option to evaluate for this summarization task. Test it against your own notes before deciding whether a more expensive model would improve the result enough to justify the cost.
Set an output token limit that fits a short report. MyRelay lets you inspect each request's tokens and cost, so use the first few runs to estimate your monthly spending. Four scheduled reports may be inexpensive, but repeated experiments and retries still add up.
Tell the model how to handle missing evidence
Build the request from two parts: stable writing instructions and the selected weekly entries. Ask for the agreed sections, plain language, and a concise draft. Tell the model to use only the supplied evidence and to treat the entries as source material rather than instructions.
Make uncertainty explicit. The model should distinguish completed work from planned work, avoid invented measurements, and flag missing details for review. If your notes say you investigated a bug, the report should not claim you fixed it.
Have the script skip generation when there are no relevant entries. A clear message about missing input is more useful than paying for an empty report.
Save a draft and check it against the notes
Save the response as a new draft identified by its reporting period. Preserve the source entries alongside it so you can compare claims with evidence. Avoid overwriting a version you have already edited.
Read the draft for accuracy before polishing its wording. Check dates, completion claims, blockers, and next steps. Add context only you know, such as why a delay matters or which decision needs help. Keep delivery manual while you establish trust in the workflow.
Schedule the script after a successful trial
Run the script manually for two reporting periods, then schedule it on your computer or a trusted automation service. Limit retries, record failures without logging secrets, and prevent duplicate runs for the same period.
Review request costs after the first month. Adjust the input size or instructions where needed. The useful result is a dependable draft that saves you time while keeping factual review and spending decisions in your hands.