Drafts has a great Apple Watch complication that allows you to dictate text really easily from your wrist. I wanted to create a way that allows me to do interstitial journaling on my watch through drafts and then easily import them into my daily notes in Obsidian at the end of the day with the click of a button.
Requirements
I managed to succeed, and it works very well. To replicate the workflow you will need the following:
- A working understanding of the Drafts Application and the watch complication and drafts actions.
- The Drafts App with a Pro Subscription so you can use Drafts Actions
- IOS or Mac
- Obsidian with Daily Notes enabled
- Advanced URI Plugin for Obsidian
- The below are Optional but make the workflow more fun:
- The MacStories Shortcuts Launcher Plugin for Obsidian
- The Buttons Plugin for Obsidian
The Setup
Here is a tip before we start. Create a few new Drafts entries to test with.
Step 1: Drafts to Obsidian Action
The first thing we need is a Drafts Action that will append a draft to our Obsidian Daily Note. I chose to use one that utilises the Obsidian Advanced URI because it makes things a lot easier. This is the action I decided to use: Append to Obsidian Daily Note | Drafts Directory
We need to make a few edits to the action. For testing purposes, change the after success action to, “Do nothing” (the default is to delete them). This way we don’t have to recreate our test Drafts every time we test. You can decide what you want this to be once you have everything working.
Next, we can tweak how we want the raw Draft transformed for when it pushes into Obsidian. Do this by editing the data tag template. This is ultimately up to you, but I added a “-” so that each entry is bulleted and a timestamp based on the creation date of the Draft.
Next add the name of the vault with your daily notes to the vaultName tag. And we’re done.
Test the action on one of your Test Drafts to see that it pushes through to your Daily note correctly. If it does, we are ready to move forward.
Step 2: Creating a Daily Log Workspace
The next step is to create a Workspace in Drafts that will query only our daily log drafts. This will be essential for the IOS shortcut we create later.
I my configuration is below. The main component is defining the filter of the start and end date. This will ensure that we are only pulling through logs that were created today. The tag filter is optional but very useful if you use drafts for more than daily logging. The tag filtering may also give you other ideas of how this could be used for different types of notes beyond daily logging. Set both to relative 0 days and enable query date.
Step 3: Creating the IOS Shortcut
Next we will create the IOS shortcut that will run the Draft Action on all of the drafts in our newly created workspace. Good news, it’s a super clean shortcut. It queries our daily log workspace, then runs our append draft to Obsidian daily note action on each of the returned Drafts. I would share an iCloud link, but it’s actually a lot easier to setup yourself based on the screenshot.
Run the shortcut and test that it pushes all of the desired drafts to your Obsidian daily note. If it works, congratulations! You now have a great way to send your draft daily logs to Obsidian. The next step will just make the process a bit sexier.
Step 4: Running the IOS Shortcut within from your Daily Note
I love the idea of going into my daily note at the end of the day, being able to press a button, and it will pull all of my daily logs in. We’re going to set this up now.
There is a fantastic new plugin called Shortcut Launcher courtesy of Finn Voorhees and @viticci of MacStories. It allows you to run IOS shortcuts from within Obsidian. Install the plugin. My setup is below. The action name can be whatever you want. The Shortcut Name MUST match the name of the shortcut we just made. Think of it as an ID.
We aren’t providing an input in this case, as we are not sending variables out of Obsidian, so just leave it as Selected Text. Save, then test your newly created command via the command palette. If it works, we are on the home stretch.
Next we are going to create a button that we can add to our Daily Notes template. This is the last step before you’ll be living that “click of a button” life. Make sure you have the Buttons plugin installed. Below is the code I used. Replace my action name with the one you made using Shortcut Launcher:
name Pull Daily Log
type command
action Shortcut Launcher: Pull Daily Log
color blue
Test the button. Add the button code to your daily notes template and you’re done! Daily logs from Drafts to Obsidian with the click of a button.
One annoying thing
One annoying thing about this workflow is that the log entries import into Obsidian in reverse order. I haven’t figured out how to fix this yet. If anyone has ideas, I would love to hear them. For the moment, my workaround is to use the Sort and Permute Plugin to reverse the order of the lines once they are imported.
Share your ideas
There are lots of different ways you could use this workflow beyond daily notes. Changing up the workspaces by using tags offers up a lot of possibilities. Please feel free to share your ideas or workflows here.