Creating and Using Templates

Templates allow you to create new notes with pre-filled content in Agenda. This is great for standard forms, meeting notes, shopping lists, standard inventories, and anything else where you typically want to begin from a common set of content.

Imagine, for example, that you have a regular meeting each week, and you have setup a recurring calendar event for the meeting. With Agenda templates, you can create a new note for each meeting, with some pre-filled content, and link it to that week’s meeting event.

Templates are a premium feature. You need to purchase the premium feature pack to unlock them.

Creating Templates

You can create a template in two main ways: first, you can take an existing note, and make a template from it; and second, you can use the Template Manager.

Creating a Template from an Existing Note

To do this on macOS, select the note and choose Save as Template… from the Note menu, or the cog button menu at the bottom of the note.

On iOS, tap the cog button at the bottom to save the note as a new template.

Creating a Template from Scratch

Creating a template from an existing note is a common approach, but you can also build a template up by hand, entering the text and styles directly. For this, you use the Template Manager.

To bring up the Template Manager on macOS, choose the Window > Template Manager menu item. You can also click and hold the main + button at the top of the notes list, and open the manager from in there.

On iOS and iPadOS, you tap and hold down on the + button in order to show the option to bring up the Template Manager.

Once the Template Manager is showing, you can tap the + to add a new template, name it, and enter some content.

Making Notes from Templates

Once you have a template, you can make new notes from it. This will create a new note in the project of your choosing, and copy in the template content.

On macOS, you do this using the File > New Note from Template… menu, or by using a click and hold on the main + button at the top of the notes list.

On iOS and iPadOS, you can tap and hold on the + button to make a new note from a template.

Click/Tap and hold the plus button to make a new note from a template.

Managing Templates

As discussed above, the Template Manager is a place to organize your templates. You can create new templates and edit them directly, but you can also remove, rename and edit existing templates.

To bring up the Template Manager on iOS and iPadOS, tap and hold down on the + button. On macOS, click and hold on the main + button.

The Template Manager allows you to create, edit, rename, and delete templates. Click/Tap and hold the plus button to reach the Template Manager.

You can also set certain properties for a template, like the background color or whether notes created from it should be pinned on top by clicking/tapping the dot button next to the title:

Template Placeholders and Text Actions

Text Action placeholders allows you to insert short commands that upon converting the template to a new note get dynamically converted and expanded into plain text. Similar to typing \date in a regular note to insert the current date, you can type \date in a template to make it insert the date at the time of creating a new note from the template. You can insert the placeholders by clicking/tapping the button in the lower right corner of the note:

Alternatively, you’ll find a complete overview of all actions that you can type into your templates in the post below.

Examples

For some more create examples of how you could make use of templates in your daily workflows, check out this Talk article:

8 Likes

Template Placeholders and Text Actions

Text Actions in Agenda allows you to type short commands that upon completion get dynamically converted and expanded into plain text. Think about it as a quick way to trigger an action like typing \remind to insert a reminder or \date to insert the current date.

Text Actions work in both normal notes and templates. In addition, Agenda also supports a set of template-specific Text Actions, a kind of special placeholders in your templates that get replaced when a new note is created from a template.

Many of these actions can take so called parameters inside parenthesis (similar to how you can add value parameters to tags), to further refine the behaviour of these actions. For example, \date(in: 2 weeks) inserts the date two weeks from now instead of the current date.

Below you’ll find a complete overview of the Text Actions that Agenda currently supports inside templates.

Tip: An even wider range of Text Actions are supported in regular notes, see Text Actions Cheat Sheet

Supported Text Actions

\date

  • action: inserts the current date into the note title or text:
    Parameters
  • parameters: full, long, medium, short - a standard date format in the given form
  • parameter: format - a custom formatted date, see tip and note below
  • parameter: locale - the locale to use for formatting the date
  • parameter: timezone - the timezone to use for formatting the date
  • parameter: in / for / offset - a different date than today - New in version 11.2
    Examples
  • \date(full) - Wednesday, July 22, 2020
  • \date(short) - 7/22/20
  • \date(format: dd-MM-yy) - 22-07-20
  • \date(full, locale: no) - onsdag 22. juli 2020
    New in version 11.2:
  • \date(for: tomorrow) - 23-07-20
  • \date(in: 2 days) - 24-07-20
  • \date(offset: 3 weeks) - 12-08-20

Tip: For a complete overview of supported date formats, see UTS #35: Unicode LDML: Dates. As an example: \date(EEE\, MMM d\, ''yy) will result in Wed, Jul 22, '20. Note how the comma’s in the pattern need to be escaped with a slash or it is seen as a next parameter. The same is true for colons, like in this example: \time(format: HH\:MM), resulting in 18:34.

Important: When a format is provided as a parameter, either a custom one or the full, long, medium, short ones, it also becomes the default format when you omit the parameter by just typing \date. To restore the format back to medium, you can type \date(default) once.

\time

  • action: inserts the current time into the note title or text:
    Parameters
  • parameters: full, long, medium, short - a standard time format in the given form
  • parameter: format - a custom formatted time, see tip and note above
  • parameter: locale - the locale to use for formatting the date
  • parameter: timezone - the timezone to use for formatting the date
    Examples
  • \time(full) - 12:27:15 PM Western European Summer Time
  • \time(short) - 12:27
  • \time(format: HH\:mm\:ss) - 12:27:33
  • \time(medium, locale: en_US_POSIX) - 12:27:15 PM

Tip: For a complete list of locale’s see iOS Locale Identifiers · GitHub, for a list of timezone identifiers, see iOS Time Zone list - Readdle Knowledge Base

\now

  • action: inserts the current date and time into the note title or text:
    Parameters
  • parameters: full, long, medium, short - a standard time format in the given form
  • parameter: format - a custom formatted date and time, see tip and note above
  • parameter: locale - the locale to use for formatting the date
  • parameter: timezone - the timezone to use for formatting the date
    Examples
  • \now(full) - Wednesday, July 22, 2020 at 2:29:53 AM Western European Summer Time
  • \now(short) - 7/22/20, 2:30 AM
  • \now(format: dd-MM-yy HH\:mm\:ss) - 22-07-20 02:30:30
  • \now(medium, locale: en_US_POSIX) - Jul 22, 2020 at 2:31:03 AM

Supported Template Placeholders

The following placeholders only work within templates and are added in the template manager. Upon creating a new note from a template they are replaced by the corresponding values.

\event-title

  • action: inserts the title of the calendar event linked to the note:
    Parameters
  • parameters: none
    Examples
  • \event-title - Team Meeting

\event-date

  • action: inserts the date of the calendar event linked to the note:
    Parameters
  • parameter: full, long, medium, short, custom format) a description of start and end date of the event
  • parameter: start (full, long, medium, short, custom format) the start date of the event, optionally in the given format
  • parameter: end (full, long, medium, short, custom format) the end date of the event, optionally in the given format
  • parameter: duration - the duration of the event
    Examples
  • \event-date(full) - Wednesday, July 22, 2020 (all-day event)
  • \event-date(start) - Jul 22, 2020 at 9:30:03 AM
  • \event-date(start: short) - 7/22/20, 9:30 AM
  • \event-date(end: dd-MM-yy) - 22-07-20
  • \event-date(duration) - 45 minutes

\event-notes

  • action: inserts the notes made in the calendar for the event linked to the note:
    Parameters
  • parameters: none - the notes in the same format as when manually linking
  • parameter: url - the url assigned to the calendar event, if any
  • parameter: location - the location assigned to the calendar event, if any
  • parameter: status - whether the meeting is confirmed, tentative etc
  • parameter: organizer - the name of the organizer of the event, if any
  • parameter: attendees / invitees - the names of the invitees or attendees of the event, if any
  • parameter: all - all textual notes of the event, including conference call details etc
    Examples
  • \event-notes - Standard set of notes, similar as to manual linking
  • \event-notes(url) - www.hightea-inc.com
  • \event-notes(location) - Kathmandu, Nepal
  • \event-notes(status) - Tentative
  • \event-notes(organizer) - Tom
  • \event-notes(attendees) - Christian, Janice

Important: To have the \event-notes actions populate with the details from the linked event use the option New note from Template after clicking/tapping the event in the inspector on the right:

\clipboard

  • action: inserts the text currently on the clipboard (i.e. copied in Agenda or a different app)
    Parameters
  • parameters: none
    Examples
  • \clipboard - Some copied text
    Note
  • Only textual clipboard content is support at the moment

\shared-content

  • action: inserts the content that was shared through the sharing extension, or input through the x-callback-url template-input parameter
    Parameters
  • parameters: none
    Examples
  • \shared-content - Something I shared
15 Likes

I am trying to understand how to use template placeholders, but must be missing something.

In the template manager, I’ve added the following actions to a new template called “client meeting”:

\event-title : \event-date(full)

Attendees
\event-notes(attendees)

I select File>>Add New Note From Template>>Client Meeting. The note is created blank, except for the the regular text (":" and “attendees”). When I link it to a calendar item that has a title and two invitees, none of the placeholders populate.

What am I doing wrong?

Apologies this wasn’t clear, but once a note has been created from a template it will no longer change, the trick to create a template with those event properties populated you will need to click the event and create a new note from a template by using the option in the menu:

Thank you. That works and I learned a better way to create a note from an event!

1 Like

Would it be possible to add a placeholder for the project name and perhaps also for the category/subcategory name, so that I can populate the note title with these as well?

I am trying to integrate Agenda with Fantastical starting with Agenda instead of the other way around where you first have a calendar entry and then link to that from within Agenda…

3 Likes

Will think about it, should be doable, thanks for the suggestion.

1 Like

Was wondering if anyone could help me figure something out regarding these placeholders.

I’m trying to just insert the event day (e.g. Wednesday) into my notes. I know I need to use the “\event-date” placeholder, but I’m not sure how to write the full placeholder test to just only display the day. I know if I use “\event-date(full)” I’ll get the full event day/date/time (e.g. Wednesday, July 22, 2020 from 9:30AM PT to 10:30AM PT) but I’m trying to figure out how to just return the day (Wednesday) and ignore everything else.

Does anyone have any ideas? Thanks!

Try either \event-date(format: EEE) or \event-date(format: EEEE) for Wed or Wednesday, respectively.

That’s what I thought as well. But when I try that, and then I click on a event on my calendar and “create a new note from template”, I see this:

Nov 5, 2020, from 11:30 AM to 12:30 PM

Oddly, the day doesn’t even show up now. So not sure what I might be doing wrong.

Ok, we’ll investigate what’s going on.

Here’s a bug tho, if I set \date(EEEE, MMM d), it will lose EEEE and became “Nov 30”, and if I set \date(EEEE,MMM d) and without a space between comma and letter “M”, it will be “Monday,Nov 30”,
it’s kinda ugly…

Yes, this is because comma’s are used to separate arguments in actions like dates, however you can escape them by using the explicit format parameter and preceding the comma with a backslash, then it should work:
\date(format: EEEE\, MMM d) -> Monday, Nov 30

2 Likes

Hey there. I am trying to insert a schedueld time from a linked calender event using the place holder \event-date(start). However I can only link an event after the template has been chosen. Then I click to link but it does not show a date in the field that the place holder was in.

Thanks.

You can create a new note from a template, linked to an event by clicking the event in the inspector:

So I Need to create an event first. Then once that is done I can select a "new note from template” and the identifier will be filled…

6 posts were split to a new topic: Relative dates in template actions

I’ve got a template that creates a new note with todays date in the title:

Plan for \date(EEE d MMM YYYY)

How can I edit this so it shows tomorrow’s date in the title?

I’ve already edited the related automation to associate the note with tomorrows date, but I can’t work out how to get tomorrows date, in a particular format, into the tite.

Try the following:

Plan for \date(format: EEE d MMM yyyy, offset: 1 day)

or

Plan for \date(format: EEE d MMM yyyy, for: tomorrow)

See the parameter examples for \date above.

Also note that you should use yyyy not YYYY or you’ll hit the same issue like some did in the last week of the year.

2 Likes

A post was split to a new topic: Reminders action in templates