Meeting Template: auto create headings from agenda list

Create a template that has an agenda field that, once populated, will create corresponding headings

I am currently setting up a meeting template. I would like the ability to be able to have an agenda section that I complete ahead of the meeting, that will then populate headings for each agenda item.

Then, when I’m in a meeting I can take notes directly into the meeting note.

Things I have tried

  • I’ve looked at setting up Templatr prompts, but I can’t see how this could (a) duplicate the information from the agenda to headings, or (b) account for different meetings with different numbers of agenda items.

  • I’ve looked at Note Refcator, but can’t figure out how to make it work for this.

  • Searched for a community plugin to help with this. e.g. TOC plugins only flow from the headings (so far as I can see), not the other way.

  • Lots of Googling, forum searches, and Reddit.

Not exactly what you are looking for, but here is an alternative suggestion on how you could proceed with this.

  1. In your template:
    • have two level-1 sections, “1) Agenda” and “2) Notes”.
    • Have an automated outline under “1) Agenda” that is generated using for example the “Automatic Table of Contents” plugin. You can set that to generate a TOC from selected heading levels, for example from level 2 to level 4.
  2. Create a meeting note from the template
  3. Under the section “2) Notes”, enter your agenda items.
    • Format each item with heading levels 2, 3 or 4.
    • Formatting of headings can be facilitated by assigning hotkeys to “Set as heading” commands (e.g. Ctrl+2 formats as Heading 2)

Thus, when the meeting starts

  • You will have your agenda as the automatic TOC under “1) Agenda”.
  • You take your notes under the headings in section “2) Notes”, which you can fold as the meeting proceeds.
1 Like

Thanks for the suggestion and taking the time to write out the steps, but this is reverse of what I’m hoping to achieve.

For context, this is for meeting with my supervisor (grad school). I’d like to be able to take a few minutes before the meeting and list out the questions I have, topics I’d like to discuss, etc. This list would then generate the headings, so that when I’m in the meeting I can make notes directly under them.

I know I can just type everything out and format it throughout the document, but I’m trying to find a more efficient way of doing things.

I’ll post in Showcase if I figure out a workflow that does what I need.

1 Like

It shouldn’t be that hard to implement the following process:

  1. You enter a list with your minutes/topics/questions
  2. Select the entire list and trigger a template
  3. Let the template transform each element of the list into a separate heading
  4. For you to fill in context to each heading

Does that capture your intended work flow? If so, the Templater plugin is able to execute such a template at a hotkey of your choice.

1 Like

Thanks, but this will be in a Templatr template.

I just tried to get the Regex Pipeline to convert the list to headings for me, but it kept throwing errors. ChatGPT couldn’t help, it’s a known error and the fix on GitHub didn’t work either.

I am currently trying to set up a prompt in the Templatr template that asks for the agenda items on creation and then copies that to headings.

This is the code that ChatGPT gave me for that:

<%
let agendaItem1 = prompt("Enter agenda item 1:");
let agendaItem2 = prompt("Enter agenda item 2:");
let agendaItem3 = prompt("Enter agenda item 3:");
// Add more prompts as needed for additional agenda items

// Process the entered agenda items
let agendaItems = [];
if (agendaItem1) agendaItems.push(agendaItem1);
if (agendaItem2) agendaItems.push(agendaItem2);
if (agendaItem3) agendaItems.push(agendaItem3);
// Add more conditionals as needed for additional agenda items

// Output the agenda items as a list
for (let i = 0; i < agendaItems.length; i++) {
    let listItem = agendaItems[i].trim();
%>
- <%= listItem %>
<%
}
%>

I’m currently having issues getting it to sit in a call out (which is my preference), so I’ll test to as is first and if it works, go from there.

One way I think I can get it to work is:

  1. Have the agenda list originate in a list property
  2. Get the prompt to write to the property.
  3. Then I can point to the property in the call out, as well as where I want my headings to go.
  4. After creating the template, I can then highlight the second list and run the ‘Set to Heading #’ command.

This will mean I’ll have to manually create line breaks to type etc. but it may be the best workaround I have available.

An ideal template would have a callout after each heading where I place my question or an overview… but small steps! :smiley:

Ok… so what I wrote didn’t match what you wanted, and you’re going against yourself in describing what you want. First order of business is for you to decide what you really want, and describe how we’re misreading your request.

1 Like

Okaaaaay… I don’t know how I’ve done that. I’m simply working through the problem:

  1. I posted asking for help on figuring out how create a template that has an agenda field that, once populated, will create corresponding headings.

  2. You responded with a process that would require me to create a list somewhere and then use this to trigger the template; using Templatr.

  3. I clarified that I was working on a Templatr template already, going through some of the things I’d tried since creating the post.

I can’t see how I’m going against myself in what I wanted. I’m working through the problem using unknown tools, in an effort to figure it out. In my original post, I feel I clearly state that the template would have an agenda section and corresponding headings… but even so, there’s probably a politer way to ask for clarity if I’m not communicating well.

  • I want to create a template
  • Said template will have an agenda section
  • Said agenda section will trigger corresponding headings within the template.

Thank you for your time, I won’t take any more of it. I’m sure I’ll figure it out, and I’ll post to showcase once I have my final template.

Of course that will throw an error, because it’s not valid Templater code, and you are missing the asterisk required for executing JavaScript code using Templater. That’s why you can’t rely on ChatGPT without knowing the basics yourself, so you can keep it in check.

Based on what I’ve gathered from your explanations, I think what you are after is something like this, but I could be wrong. Give it a try:

<%_*

// Specify the desired callout type and header here:
const calloutType = "info";
const calloutHeader = "Key points";
// Set the heading level for the agenda headings:
const headingLevel = 3;

let addingAgenda = true;
let agendaItems = {};
while (addingAgenda) {
  const agendaItem = await tp.system.prompt("Enter an agenda item");
  if (agendaItem) {
    agendaItems[agendaItem] = [];
    let addingSubitem = true;
    while (addingSubitem) {
      // These subitems go into callouts under each heading
      const subItem = await tp.system.prompt("Any sub-items to add?");
      if (subItem) {
        agendaItems[agendaItem].push(subItem);
      } else {
        addingSubitem = false;
      }
    }
  } else {
    addingAgenda = false;
  }
}
// console.log(agendaItems);
const agendaList = Object.keys(agendaItems).map(item => `- ${item}`).join("\n");
const formattedAgenda = Object.entries(agendaItems).map(([heading, subItems]) => {
  const subItemList = subItems.map(subItem => `> - ${subItem}`).join('\n');
  return `${"#".repeat(headingLevel)} ${heading}\n\n > [!${calloutType}]+ ${calloutHeader}\n ${subItemList}`;
}).join('\n\n');
%>

## Agenda

<% agendaList %>

## Minutes

<% formattedAgenda %>

To escape out of the modals, just press enter with an empty input field, or press escape.

1 Like

Thank you.

ChatGPT was a bit of a desperation move. I never get much luck with it, tbh… but no amount of Googling was helping me out.

This did exactly what I needed, thank you :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.