Journal/log workflow – Drafts-like "just start writing" for your daily notes (iOS)

In combination with a shortcut, this creates a Drafts-like “just start writing” button for your Obsidian Daily Notes.

This workflow requires the following plugins:

Set up

  1. Install, enable, and set up the above plugins
  2. Set up the following template for Templater:
<%*
if (this.app.workspace.activeLeaf.view.currentMode.type != "source"){this.app.commands.executeCommandById("markdown:toggle-preview");}
let editor = this.app.workspace.activeLeaf.view.editor;
let timestamp = tp.date.now("HH:mm");
let linePrefix = "\n- [ ] " + timestamp + " ";
editor.focus();
if (this.app.isMobile) {
editor.setCursor(editor.lastLine());
editor.replaceSelection(linePrefix)
editor.setCursor(editor.lastLine());;
} else {
const initialLines = editor.lineCount();
editor.setCursor({ line: initialLines, ch: 0 });
editor.replaceSelection(linePrefix);
const finalLines = editor.lineCount();
editor.setCursor({ ch: 0, line: finalLines });
}
%>
  1. Set up the template above as a command via Hotkeys for Templates
  2. Install and customize the shortcut on your iPhone/iPad
  3. Add the shortcut to your homescreen (click the … button when editing the shortcut and select “Add to home screen”)

That’s it!

22 Likes

Could be great if it could work for Android :slight_smile:

1 Like

I’m not sure what automation tools Android offers. You would just need to be able to build and launch a URL from the home screen.

This would be great for an ‘Inbox’ funtionality, to capture things like links and images in the text.

For sure. It should be trivial to reformat the shortcut to target a specific note instead of today’s date.

1 Like

This is a super underappreciated Forum post and workflow. Thanks so much for sharing @ryanjamurphy!

Q: is this supposed to yield a choice the way your does in the video when we click or hold on the Home Screen shortcut? It just opens the days note for me. And is it supposed to add a time stamp? It doesn’t do that for me?

I know it’s been forever since you posted this (awesome!) workflow, but I’ve hit a minor sticking point and I wonder if you have any insight.

It seems like, if I leave Obsidian for 15 minutes or longer, it wants to reload my vault, plug-ins, workspaces, themes, etc. on startup and then sync things like my Daily Notes Page.

Is there something in your workflow that gets Obsidian to load immediately for input? This is the last hurdle for me to get a Drafts-like instant-on workflow going with Obsidian Mobile. Until then, I’m still paying for Drafts Pro.

1 Like

Until Apple allows background sync for apps like Obsidian, I don’t think we’ll see a solution that beats Drafts for speed. Sorry! I, too, deal with the same speed bump you describe. I just accept it as a cost of not having to use an extra app.

In other news, I just noticed that I haven’t posted Lumberjack in this thread.

I built the workflow into a plugin: Lumberjack - Log your thoughts! :wood::axe:

1 Like

Between a rock and a hard place! I was using iCloud for syncing my Obsidian vaults, but iCloud Drive wants to make all the decisions about what gets saved locally and what gets offloaded to the cloud, leaving some links unresolved or inaccessible within Obsidian until their files were specifically requested. I like Obsidian Sync’s conflict resolution, but it does slow down quick input.

Lumberjack looks as close to perfection as we’re likely to get without resolutions to those technical obstacles. I will check it out today—thank you so much!

1 Like

Does this still work? I’m getting an error thrown when trying to use the Templater template suggested above.

Templater Error: Template parsing error, aborting. 
 Bad template syntax

Unexpected identifier
=====================
var tR='',__l,__lP,include=E.include.bind(E),includeFile=E.includeFile.bind(E)
function layout(p,d){__l=p;__lP=d}
const _prs = [];
if (this.app.workspace.activeLeaf.view.currentMode.type != "source"){this.app.commands.executeCommandById("markdown:toggle-preview");} let editor = this.app.workspace.activeLeaf.view.editor; let timestamp = tp.date.now("HH:mm"); let linePrefix = "\n- [ ] " + timestamp + " "; editor.focus(); if (this.app.isMobile) { editor.setCursor(editor.lastLine()); editor.replaceSelection(linePrefix) editor.setCursor(editor.lastLine());; } else { const initialLines = editor.lineCount(); editor.setCursor({ line: initialLines, ch: 0 }); editor.replaceSelection(linePrefix); const finalLines = editor.lineCount(); editor.setCursor({ ch: 0, line: finalLines }); }
const _rst = await Promise.all(_prs);
tR = tR.replace(/rJ2KqXzxQg/g, () => _rst.shift());
if(__l)tR=await includeFile(__l,Object.assign(tp,{body:tR},__lP))
if(cb){cb(null,tR)} return tR

Discovered the solution by reading the documentation! Surprise!

If anyone’s getting the same kind of error thrown when trying to use the Templater template, try the following tip:

When copying html text over to Obsidian, it adds unnecessary slashes and removes tabs. These slashes breaks the code. To avoid this, use Ctrl + Shift + V when pasting.

1 Like

Did “Hotkeys for templates” break? I installed and enabled it but the options menu is blank and no hotkeys for templates appear in the hotkeys section.

hmmm. I’m not sure! Templater added direct support for making Templates full commands (e.g., hotkeyable and targetable via Advanced URI).

That said, if you’re just looking to use the log workfow discussed in this thread, my Lumberjack plugin is purpose-built to encapsulate that workflow into a single plugin.

obsidian://show-plugin?id=lumberjack-obsidian

This is working for me, but 1) the insertion point is appearing on the next line, rather than next to the time as in the gif above, and 2) how do I get that menu with several options that shows up in the graphic? And how do you make it have the Obsidian icon?

Probably best to install and use the plugin I made for this workflow. See immediately above your reply.

The menu is the result of a homescreen Shortcut with menu options.

I managed to get it working with a KWGT komponent link and the following URI:

obsidian://advanced-uri?vault=vaultName&daily=true&heading=Journal&commandid=obsidian-hotkeys-for-templates%253Atemplater%253AtemplateName.md

Replace vaultName and templateName with your vault name (if you have more than one) and whatever you named your template, respectively.

Not sure if that’s how @ryanjamurphy did it, since I don’t have an Apple device to look at the shortcut, but it works.

1 Like