It is often handy to create a new draft based on some boilerplate template content to ease the creation of meetings notes, lists, or other content with repetitive structure. The New Draft with Template example action provides an easy way to do this based on templates maintained in other drafts. Let’s briefly discuss how to use this action to maintain a robust template system in Drafts.
Install the Action
Visit the New Draft with Template action in the Action Directory on a (iOS) device with Drafts installed. Tap the “install” link to install the action.
For the “New Draft with Template” action to work, you must first create one or more templates. Do the following:
- Create a new draft. Put in the text content you want to be used as a template for new drafts.
- Make sure the first line (title) of the draft is something identifiable, as it will be used to identify the template when the action is run.
- Assign the tag “template” (singular) to the draft.
- Assign any additional tags desired. When a new draft is created from the template, any tags (other than “template”) will be assigned to the new draft. So, for example, your “Meeting Notes” template might also have a “meeting” tag so it will automatically be filed away properly.
- Repeat for any additional templates you wish.
These template drafts can be in the archive or inbox, but I recommend moving them to the archive to avoid cluttering your inbox. The can also be flagged. When the action is run it sorts based on the text of the draft, but also sorts flagged templates to the top of the select list, so if you flag often used templates they will appear first.
NOTE: Template drafts can also contain drafts tags. They will be evaluated when new drafts are created using the template, so are great for inserting dynamic time stamps
Run the Action
Once you have created one or more templates, run the New Draft with Template action. You will be prompted to select from a list of all your templates. This list is dynamically generated by finding all drafts assigned the tag “template”. So, at any time you can add to or remove templates from the options simply by adding or removing the “template” tag from drafts.
After you select template, the action will do the following:
- Create a new draft with the content of the template
- Assign any additional tags from the template to the new draft
- Load the new draft in the editor, ready to edit.
Make a Template Workspace
If you plan to use this action, it’s a great idea to create a “Templates” workspace to keep up with your templates, so you can easily update them as needed. I recommend configuring the workspace with the following options:
Archive Sort Order:
Text - Ascending
Archive - Sort flagged to top:
- Select Archive : To automatically switch to archive when loading workspace.
When you need to edit your templates, you can open this workspace to access them all in one place easily.
With a few simple steps and just one action, you can manage a robust template system in Drafts. Have special requirements? Use this example as a starting point to modify to suit your needs.