Creating and Using Templates and Actions

Templates allow you to create new notes with pre-filled content. 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.

Examples

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

2 Likes

Template Placeholders and Text Actions

New in Agenda version 11 is the ability to use so-called Text Actions (that work in both normal notes and templates), as well as 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.

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
    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

Tip: For a complete overview of supported date formats, see http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns. 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 https://gist.github.com/jacobbubu/1836273, for a list of timezone identifiers, see https://apphelp.readdle.com/calendars/index.php?pg=kb.page&id=588

\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

\remind

  • action: inserts and schedules a reminder in the Reminders app
    Parameters
  • parameters: none - inserts a placeholder reminder that is not scheduled
  • parameters: date string - a natural language string representing a date in the future
  • parameter: title - the title of the reminder to schedule
  • parameter: list - the list in the reminders app on to which to schedule the reminder
  • parameter: all-day - schedules the reminder as an all-day reminder
    Examples
  • \remind(today) - will schedule a reminder for today in 30 minutes
  • \remind(today at 6pm) - will schedule a reminder for today at 6 o’clock
  • \remind(tomorrow evening) - will schedule a reminder for tomorrow at 6 o’clock
  • \remind(in 3 weeks) - will schedule a reminder 21 days from now
  • \remind(25 dec 2020, at 8pm) - will schedule a reminder on the 25 dec 2020 at 8 o’clock
  • \remind(today at 6pm, list: important) - will schedule a reminder for today at 6 o’clock on the reminder list “important”
  • \remind(all-day: tomorrow) - will schedule an all-day reminder for tomorrow
4 Likes

Hi there, help please… I’m trying to use Text Commands. I typed “\date” in my note and I got “\date” - it didn’t expand as expected. What might I be doing wrong?

That’s because it’s part of the v11 update that is still in beta. Version 10 doesn’t support this yet.

2 Likes

Right. Well that explains that then. Thank you :grinning:
Thanks for your patience, I’ a newbie.

3 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