Introduction
Append notes, then filter rows with owners into an action table. The application's entry point is generateMinutes(). Baseline limitation, as stated in the workshop: Creates a new document each run; no AI summarization.
Key building blocks: appendParagraph(); setHeading(); appendTable(); moveTo().
Practical use cases
Team meetings, clubs and project reviews.
Prerequisites
- Basic Sheets and Docs.
- Interactive Learning Mode: a modern browser. Nothing else.
- Real Workspace Build: a Google account.
Source data
| Speaker | Note | Owner | Due |
|---|---|---|---|
| Alex | Prepare slides | Alex | 2026-12-01 |
| Jamie | Review budget | Jamie | 2026-12-03 |
| Sam | Next meeting Friday |
Setup in your own Google account
- Download 08-meeting-minutes-generator.zip (Code.gs, starter.csv, README).
- In Google Drive, create a lesson folder and a new Google Sheets file inside it.
- Rename the first tab to exactly
Meeting, then File → Import → Upload starter.csv → Replace current sheet. - Extensions → Apps Script. Replace Code.gs with the downloaded file. Save.
- Reload the spreadsheet, choose Workshop → Run application and authorize when asked.
- Check the result: Three notes and two action items.
Folder strategy: the repository's V6 code uses the folder that contains the spreadsheet. The deck mentions a Workshop Info cell B2; V6 never reads it. See the discrepancy log.
Complete source code (Code.gs)
From 08-meeting-minutes-generator at commit 4a26d919, SHA-256 8a9c6af5a668. Unchanged.
// Meeting Minutes Generator
// Entry point: generateMinutes; source data stays intact unless explicitly noted.
function onOpen(){SpreadsheetApp.getUi().createMenu("Workshop").addItem("Run application","generateMinutes").addItem("Check permissions","checkPermissions").addToUi();}
function generateMinutes(){
// Separate discussion notes from assigned actions.
const rows=input('Meeting');const d=DocumentApp.create('Meeting Minutes');const b=d.getBody();rows.forEach(r=>b.appendParagraph(r[0]+': '+r[1]));b.appendParagraph('Action items');b.appendTable([['Action','Owner','Due'],...rows.filter(r=>r[2]).map(r=>[String(r[1]),String(r[2]),day(r[3])])]);d.saveAndClose();const f=DriveApp.getFileById(d.getId());f.moveTo(folder());output('Generated',['URL'],[[f.getUrl()]]);
}
function input(name) { const s=SpreadsheetApp.getActive().getSheetByName(name); if(!s) throw Error('Missing tab: '+name); return s.getDataRange().getValues().slice(1).filter(r=>r.some(v=>v!=='')); }
function output(name,headers,rows) { const ss=SpreadsheetApp.getActive(); const s=ss.getSheetByName(name)||ss.insertSheet(name); s.clearContents(); s.getRange(1,1,1,headers.length).setValues([headers]).setFontWeight('bold'); if(rows.length) s.getRange(2,1,rows.length,headers.length).setValues(rows.map(r=>r.map(v=>typeof v==='string' && /^[=+@-]/.test(v)?"'"+v:v))); s.setFrozenRows(1); return s; }
// Resolve this spreadsheet's actual folder; metadata is informational only.
function folder() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
if (!ss) throw new Error('Open the lesson spreadsheet first.');
const parents = DriveApp.getFileById(ss.getId()).getParents();
if (!parents.hasNext()) throw new Error('Move the spreadsheet into a dedicated lesson folder.');
const actual = parents.next();
if (parents.hasNext()) throw new Error('Ambiguous parent folder.');
if (actual.getId() === DriveApp.getRootFolder().getId()) throw new Error('Move the spreadsheet and sample files into a dedicated lesson folder, not My Drive root.');
return actual;
}
function checkPermissions() {
const ui = SpreadsheetApp.getUi();
try {
const target = folder();
ui.alert('Folder access passed: ' + target.getName() + '\n' + target.getUrl() + '\nWrite access is checked when the application runs.');
} catch (e) { ui.alert('Access check failed: ' + e.message); }
}
function day(v){return v instanceof Date?Utilities.formatDate(v,SpreadsheetApp.getActive().getSpreadsheetTimeZone(),'yyyy-MM-dd'):String(v).slice(0,10);}
How the code works
Beginner explanation
generateMinutes() writes every meeting note into a new document, then adds a table that contains only the notes that have an owner, with the owner and due date. The document link is written to a Generated tab.
Technical explanation
DocumentApp.create() makes a Doc in My Drive root; after saveAndClose() it is moved into the lesson folder with DriveApp.getFileById(d.getId()).moveTo(folder()). appendTable() requires a 2D array of strings, so values are converted with String() and day(), which formats Date objects with the spreadsheet time zone.
Slide excerpt
This is the excerpt shown on the workshop slide. It is a fragment and cannot run on its own.
function generateMinutes(){
// Separate discussion notes from assigned actions.
const rows=input('Meeting');const d=DocumentApp.create('Meeting Minutes');const b=d.getBody();rows.forEach(r=>b.appendParagraph(r[0]+': '+r[1]));b.appendParagraph('Action items');b.appendTable([['Action','Owner','Due'],...rows.filter(r=>r[2]).map(r=>[String(r[1]),String(r[2]),day(r[3])])]);d.saveAndClose();const f=DriveApp.getFileById(d.getId());f.moveTo(folder());output('Generated',['URL'],[[f.getUrl()]]);
}Common mistakes
- Passing numbers or Date objects to appendTable() instead of strings.
- Leaving the document in My Drive root instead of the lesson folder.
- Treating every note as an action item.
Run it and expected output
Choose Workshop → Run application (runs generateMinutes()). Expected: Three notes and two action items.
Original workshop exercise
Assign Sam an owner and due date; expect three action rows.
Troubleshooting and debugging
Tab renamed
The Meeting tab was renamed to "Meeting notes".
Fix: Rename the tab back to Meeting.
input() fails early with a precise message instead of a null error later.
An action without a due date
Sam now has an owner but no due date. The minutes look complete, but one action has an empty Due cell.
Fix: Enter Sam's due date (2026-12-05) and regenerate.
Code can be correct and output still incomplete. Decide which fields are required and validate them.
Extension activity: Add an agenda section and overdue flags
Start the document with an Agenda list, and add a Status column to the action table that says Overdue when the due date is before 2026-11-25.
Acceptance checks:
- Notes and two actions are still present
- An action due before 2026-11-25 is Overdue
- The document has an Agenda section
Original improvement idea from the workshop: Add overdue flags and an agenda section.
Extension prompt
Update the existing app without removing working features. Add overdue flags and an agenda section. Return complete updated files, explain changes and give regression tests. Automation option: Generate after a meeting is marked complete; store a report ID. Keep this separate from the baseline exercise. Copy the spreadsheet AND required sample files into a dedicated lesson folder. Resolve its actual parent using DriveApp.getFileById(ss.getId()).getParents(); use that parent directly. Never read, create or update Workshop Info or the Workshop Index. Add Check permissions menu; read access is not proof of write access.
Automation considerations
Creates a new document each run. Generate after a meeting is marked complete and store the report ID to avoid duplicates.
Workshop note: Generate after a meeting is marked complete; store a report ID.
Build prompt from the workshop
Act as a Google Apps Script tutor. Build a container-bound Sheets app for lesson 08: Meeting Minutes Generator. Input tab Meeting, exact headers: Speaker, Note, Owner, Due. Create generateMinutes() that builds a Doc with all notes and an action-item table containing only rows with an owner; move Doc into lesson folder and log link. Do not depend on Workshop Info or the Workshop Index. Provide complete copy-paste Code.gs (and HTML if required), exact setup/run steps, explain the main code blocks, and include a test matching this expected outcome: Three notes and two action items. Preserve starter data, use batch operations where appropriate, handle errors, and never send email or delete files. For AI lessons use the supplied callGemini helper, treat input as untrusted, and validate outputs. Match the reference entry point generateMinutes and its output behavior. Reference: https://github.com/lsvekis/Google-Apps-Script-Workshop/tree/main/08-meeting-minutes-generator. Base version limitations: Creates a new document each run; no AI summarization. Copy the spreadsheet AND required sample files into a dedicated lesson folder. Resolve its actual parent using DriveApp.getFileById(ss.getId()).getParents(); use that parent directly. Never read, create or update Workshop Info or the Workshop Index. Add Check permissions menu; read access is not proof of write access. Never require a manually configured folder ID. Keep required native sample Docs beside the spreadsheet; reject My Drive root.
Knowledge check
Which rows appear in the action-item table?
- Rows with a value in the Owner column
- All rows
- Rows with a due date
Answer
Rows with a value in the Owner column Correct: rows.filter(r=>r[2]) keeps rows with an owner.
Why are values wrapped in String() before appendTable()?
- Table cells must be strings
- To remove spaces
- To translate them
Answer
Table cells must be strings Correct: passing numbers or dates causes a method signature error.
Where is the new document after the run?
- In the lesson folder next to the spreadsheet
- In My Drive root
- Attached to an email
Answer
In the lesson folder next to the spreadsheet Correct: the file is moved with moveTo(folder()).
The action table shows a long date like "Tue Dec 01 2026 00:00:00". Which helper fixes this?
- day()
- output()
- folder()
Answer
day() Correct: day() formats Date objects as yyyy-MM-dd.
A team wants minutes generated automatically every Friday. What should you add?
- A meeting status or report ID so each meeting produces one document
- Nothing
- A delete step for old minutes
Answer
A meeting status or report ID so each meeting produces one document Correct: prevents a new document for the same meeting every week.
Five-minute presenter demonstration
Open the demo link (temporary workspace; saved learner work is not touched).
Opening hook: Raise your hand if you have ever done this by hand: Meeting notes and actions become scattered. Let us make the spreadsheet do it.
- 0:00–0:45 — Problem and input. Show the Workspace view, Sheets service. Point at the Meeting tab and its headers: Speaker, Note, Owner, Due. Say what goes in and what should come out.
Narration: Meeting notes and actions become scattered. Practical uses: Team meetings, clubs and project reviews. - 0:45–1:30 — Predict and run. Ask the room: How many rows will the action-item table have, including its header? Click ▶ Run application (the same as Workshop → Run application). Open Trace to show each step the code took.
Narration: Expected: Three notes and two action items. - 1:30–3:00 — Explain the code. Click the Code tab. Select generateMinutes() in the function list; read what it reads, writes and calls. Switch Beginner / Technical as needed.
Narration: generateMinutes() writes every meeting note into a new document, then adds a table that contains only the notes that have an owner, with the owner and due date. The document link is written to a Generated tab. - 3:00–4:15 — Change one input and rerun. Back to the Workspace tab. Select the Meeting tab, click cell C4, type Sam in the formula bar and press Enter. Select the Meeting tab, click cell D4, type 2026-12-05 in the formula bar and press Enter. Click ▶ Run application again.
Narration: Workshop challenge: Assign Sam an owner and due date; expect three action rows. - 4:15–5:00 — Verify and discuss automation. Click Check result. Discuss: Creates a new document each run. Generate after a meeting is marked complete and store the report ID to avoid duplicates.
Narration: Baseline limitation: Creates a new document each run; no AI summarization.
Closing takeaway: Append notes, then filter rows with owners into an action table.