TIP: Journaling in Drafts

Drafts comes with a number of example actions to journal by appending to files in Dropbox, iCloud Drive and other locations. This tip is about how to journal to other drafts with Drafts.

All of these examples are based on the idea you want to launch Drafts, type a quick journal entry, and tap an action to append that entry to a running journal for the month, and have the action automatically roll over and create new journals for each month as you go. These examples are starting points and can be customize if you prefer to have daily journals, or weekly journals. See customization notes later in this tip.

Try the Monthly Journal Action

Hop over to the action directory and install the Monthly Journal example action.

  • Open drafts and “This is my journal entry” in a new draft.
  • Run the “Monthly Journal” action.

A few things will happen when you do this:

  • A new draft will be created for the current month, with a title like “# 2019-11: Monthly Journal”, assigned the tag “journal”.
  • The text of your current draft, along with a timestamp, will be appended the the end of that new draft.
  • Your current draft will be moved to the archive (using the after success option).

Go look in the inbox and you will find a new draft with the text (with different dates and times, of course):

# 2019-11: Monthly Journal

#### 01 November 2019 03:13 PM

This is my journal entry

Now, create another new draft, and type “Another journal entry” and run the action. The second time you run it, the action will find the existing monthly journal entry, and append the text. So if you go look at that entry again, it will now have the text:

# 2019-11: Monthly Journal

#### 01 November 2019 03:13 PM

This is my journal entry

#### 01 November 2019 03:35 PM

Another journal entry

Each time you use the action in the same month, it will append to the journal. When a new month comes around, it will create a new entry for that month.

Create a Journal Workspace

If you plan to journal in drafts with this action, or a modified version it, it is very useful to setup a Workspace that will allow you to easily filter the drafts list to show only your journal entries.

The docs show options and configuration, but since this action assigns the tag “journal” automatically to each journal it creates, the workspace needs only have a tag filter of journal.

Customizing the Action

This examples is configured as described, but can be altered easily to meet your needs. There are two script steps in the action. The first contains only a set of configuration variable which control the naming conventions for the title of the journal drafts, how the content is appended, the tag that is assigned to journals, etc. There are comments explaining the usage in the script step. The content variables are run through the Drafts template engine, so alterations can be made to the template tags to alter date formats, etc. If you are just getting started with templates, this Using Templates article is a great introduction.

3 Likes