function summarize() {
  const db = new DB(SPREADSHEET_ID);
  const last = db.last;

  if (last == undefined) return;

  const filter = `thread.name=${last.thread.name}`;
  let { messages } = Chat.Spaces.Messages.list(PropertiesService.getScriptProperties().getProperty("spaceName"), { filter });  // Demo replaces => SPACE_NAME

  messages = (messages ?? [])
    .slice(1)
    .filter(message => message.slashCommand === undefined)

  if (messages.length === 0) {
    return;
  }

  const history = messages
    .map(({ sender, text }) => `${cachedGetSenderDisplayName(sender)}: ${text}`)
    .join('/n');

  const response = generateContent(
    `Summarize the following weekly tasks and discussion per team member in a single concise sentence for each individual with an extra newline between members, but without using markdown or any special character except for newlines: ${history}`,
    API_KEY);
  const summary = response.candidates[0].content?.parts[0].text;

  if (summary == undefined) {
    return;
  }

  Chat.Spaces.Messages.update({
    text: last.formattedText + SUMMARY_HEADER + summary.replace("**", "*")
  },
    last.name,
    { update_mask: "text" }
  );

}
Uses AI to create a summary of messages for a stand up period.
Called by trigger on interval required to summarize, e.g. Hourly 

@return n/a